/* Import premium components from Admin module.
   Path is relative to THIS file (obrot/css/style.css), so going up two
   levels reaches /frontend, then down into admin/. The previous single
   `../admin/...` resolved to /obrot/admin/... which doesn't exist and
   the SPA fallback served index.html with text/html, triggering a
   "Refused to apply style — MIME mismatch" browser error. */
@import url('../../admin/css/premium-components.css');

/* Import Management View styles */
@import url('./management-styles.css');

/* =================================================
   GLOBAL
   ================================================= */

* {
  box-sizing: border-box;
}

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #06b6d4;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
}

body {
  margin: 0;
  text-shadow:
    0 15px 15px rgba(0, 0, 0, 0.25),
    0 18px 18px rgba(0, 0, 0, 0.25);

  font-family:
    Manrope,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Ubuntu,
    sans-serif;
	
	
	
  background: #181818;
  color: #111827;
}

h1 {
  margin: 10px 0 20px;
}

h3 {
  margin: 0 0 12px;
}

h4 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #ffffff;
}

/* =================================================
   OBRÓT LAYOUT
   ================================================= */

.obrot-layout {
  display: flex;
  height: calc(100vh - 56px);
  margin-top: 56px;
  overflow: hidden;
}

.obrot-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  background: #181818;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
  overscroll-behavior-y: contain;
}

/* =================================================
   OBRÓT SIDEBAR - Zgodny z dashboard-home.css
   ================================================= */

.obrot-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;
}

.obrot-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;
}

.obrot-sidebar:hover::after {
  opacity: 1;
}

.obrot-sidebar:hover {
  width: 220px;
}

.obrot-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.obrot-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;
}

.obrot-sidebar .sidebar-item:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

.obrot-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);
}

.obrot-sidebar .sidebar-item.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Separator */
.obrot-sidebar .sidebar-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 16px;
  flex-shrink: 0;
}

/* Bottom section */
.obrot-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;
}

/* Ikony SVG */
.obrot-sidebar .s-icon {
  width: 18px;
  height: 18px;
  stroke: #9ca3af;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.obrot-sidebar .sidebar-item.active .s-icon {
  stroke: #3b82f6;
}

.obrot-sidebar .sidebar-item:hover .s-icon {
  stroke: #d1d5db;
}

/* Label */
.obrot-sidebar .s-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1px;
  display: none;
  white-space: nowrap;
}

.obrot-sidebar:hover .s-label {
  display: inline;
}

.obrot-sidebar .sidebar-item.active .s-label {
  font-weight: 600;
  color: #93c5fd;
}

/* =================================================
   TOPBAR
   ================================================= */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  min-height: 56px;
  background: #202020;
  border-bottom: 1px solid rgba(59,130,246,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  font-family: 'Inter', system-ui, sans-serif;
}

.topbar-left {
  gap: 10px;
}

.topbar-right {
  gap: 12px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.075rem;
  color: #e5e7eb;
}

.topbar-title .ui-icon {
  width: 22px;
  height: 22px;
}

.topbar-text {
  color: #e5e7eb;
}

.topbar-title .ui-icon {
  /* brak ograniczeń - używa domyślnego rozmiaru .ui-icon (32x32px) */
}

.topbar-icon {
  width: 16px;
  height: 16px;
  stroke: #9CA3AF;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.topbar-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  color: #9CA3AF;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: color 150ms, border-color 150ms, background 150ms;
}

.topbar-action:hover {
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.10);
  background: rgba(255, 255, 255, 0.04);
}

/* Usunięte: h1 w topbarze, .back-btn */
h1 {
  margin: 0;
}


.topbar button {
  background: #ef4444;
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
  border: 2px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.25) 100%);
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* =================================================
   VIEW TOOLBAR (DAY / WEEK)
   ================================================= */

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 16px 0;
}

.view-title {
  font-size: 18px;
  font-weight: 600;
  color: #E5E7EB;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 6px;
}

.view-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.view-nav {
  display: flex;
  align-items: center;
}

/* =================================================
   TABS
   ================================================= */

.tabs {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: rgba(31, 41, 55, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  width: fit-content;
}

.tabs button {
  padding: 10px 20px;
  background: #374151;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
}

.tabs button.active {
  background: #3b82f6;
}



.sub-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(38, 38, 38, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 4px;
}

.sub-tab {
  background: transparent;
  border: none;
  color: #9CA3AF;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.sub-tab:hover {
  background: rgba(255,255,255,0.05);
  color: #E5E7EB;
}

.sub-tab.active {
  background: rgba(59,130,246,0.22);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow:
    inset 0 0 0 1px rgba(59,130,246,0.35);
}

/* =================================================
   INPUTS / LABELS
   ================================================= */

label {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 12px; /* reguluj wartość */
  display: block;      /* konieczne, jeśli label jest inline */
  text-align: center;

}


/* =================================================
    DAY VIEW
    ================================================= */

#dayView {
  max-width: 1600px;
  margin: 0 auto;
}

/* === Day KPI Strip === */
.day-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.day-kpi-card {
  background: rgba(30, 30, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
}

.day-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.day-kpi-value-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.day-kpi-icon {
  display: inline-flex;
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.day-kpi-icon .ui-icon {
  width: 32px;
  height: 32px;
}

.day-kpi-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-kpi-card--returns .day-kpi-value { color: #f87171; }

/* === Day Inputs Grid === */
.day-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.day-inputs-stations {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.day-inputs-shipping {
  align-self: stretch;
}

/* === Section Header === */
.day-section-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* === Status Dot === */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(107, 114, 128, 0.4);
  transition: background 0.2s ease;
}

.status-dot.complete { background: #10b981; }
.status-dot.partial  { background: #f59e0b; }
.status-dot.empty    { background: rgba(107, 114, 128, 0.4); }

@media (max-width: 1200px) { .day-kpi-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .day-inputs-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px)  { .day-kpi-strip { grid-template-columns: repeat(2, 1fr); } }

.day-grid-4 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.day-col {
background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.15);
  position: relative;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Hover effect for day cards */

/* Stan kafelków dnia — walidacja tylko przez status-dot, nie przez border/tło karty */
.day-col.tile-empty,
.day-col.tile-partial,
.day-col.tile-complete {
  background: rgba(30, 30, 30, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
}

.day-col strong {
  display: block;
  font-size: 20px;
  margin-bottom: 10px;
}

.day-col hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 14px 0;
}

/* =================================================
   WEEK VALIDATION STATUS BAR
   ================================================= */

.week-validation-status {
  max-width: 1600px;
  margin: 0 auto 20px;
  padding: 16px 20px;
  background: rgba(30, 30, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  box-shadow: none;
}

.week-validation-status .status-header {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.week-validation-status .status-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status colors */
.week-validation-status.status-none .status-label {
  color: #6b7280;
}

.week-validation-status.status-none .status-progress-fill {
  background: #6b7280;
}

.week-validation-status.status-partial .status-label {
  color: #f59e0b;
}

.week-validation-status.status-partial .status-progress-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.week-validation-status.status-complete .status-label {
  color: #16a34a;
}

.week-validation-status.status-complete .status-progress-fill {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.week-validation-status .status-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.week-validation-status .status-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.week-validation-status .status-description {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}

/* Edytor karty - prawy dolny róg */
.card-editor-info {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.7;
  pointer-events: none;
}

/* Last editor - prawy dolny róg karty */
.last-editor {
  font-size: 11px;
  color: #6b7280;
  text-align: right;
}

/* Przyciski akcji dnia */

/* Wyśrodkowanie inputów numerycznych w kafelkach */
.day-col input[type="number"],
.day-card input[type="number"] {
  text-align: center;
  width: 100%;
  max-width: 250px;
}

/* Usuń spinnery z inputów numerycznych w kafelkach */
.day-col input[type="number"]::-webkit-outer-spin-button,
.day-col input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.day-col input[type="number"] {
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

/* =================================================
   WEEK VIEW
   ================================================= */

#weekView {
  max-width: 1600px;
  margin: 0 auto;
}

.week-title-card {
  margin-bottom: 24px;
  pointer-events: none; /* Wyłącz hover */
}

.week-title-card .day-card-body {
  padding-top: 6px;
}

.week-title-card .day-card-title {
  font-size: 26px;
  color: #ffffff;
  text-align: center;
}

.week-title-period {
  font-size: 22px;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
}



.week-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  justify-content: center;
  width: 100%;
}

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

/* ============================================
   DAY CARDS - Unified with stats-card-unified
   ============================================ */

.day-card {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;

  /* Statyczna poświata (jak stats-card-unified) */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgb(55 167 212 / 30%),
    0 0 20px rgb(55 125 212 / 20%);

  /* Smooth transitions */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clickable day cards - pulsing animation */
.day-card-clickable {
  cursor: pointer;
  animation: oplexSubtlePulse 2s ease-in-out infinite;
}

/* Stop animation on hover */
.day-card-clickable:hover {
  animation: none;
}

/* Hover effect - lift + enhanced glow */
.day-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 4px 16px rgb(55 167 212 / 40%),
    0 0 30px rgb(55 125 212 / 30%);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Active state - slight press */
.day-card-clickable:active {
  transform: translateY(-2px) scale(1.01);
}

/* Form cards for day view */
.form-card {
  background: rgba(30, 30, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
  box-shadow: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  width: 100%;
}

.form-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(40, 40, 40, 0.98);
}

.form-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.form-card .card-title {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-card .status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-card .status-badge.complete {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.form-card .status-badge.partial {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.form-card .status-badge.empty {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.4);
}

.form-card .status-badge.day-off {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.form-card .status-badge.future {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.form-card .card-metrics {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-card .metric-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);
}

.form-card .metric-row:last-child {
  border-bottom: none;
}

.form-card .metric-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.form-card .metric-row input {
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
  width: 120px;
  flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-card .metric-row input:focus {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

/* Wyłącz gradient top-line na kartach inputowych */
.form-card::before { display: none; }

/* Lock form-card — tile state widoczny TYLKO przez status-dot, nie przez border/tło */
.form-card.tile-success,
.form-card.tile-warning,
.form-card.tile-danger,
.form-card.tile-partial,
.form-card.tile-complete,
.form-card.tile-empty,
.form-card.tile-success:hover,
.form-card.tile-warning:hover,
.form-card.tile-danger:hover,
.form-card.tile-partial:hover,
.form-card.tile-complete:hover {
  background: rgba(30, 30, 30, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
}

.form-card .card-footer {
  text-align: right;
  font-size: 11px;
  color: #6b7280;
  padding-top: 6px;
}

/* Uniwersalna struktura metryczna dla wszystkich kafelków */
.card-header {
  text-align: center;
  margin-bottom: 8px;
}

.card-title {
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 2px;
}

.card-subtitle {
  font-size: 14px;
  color: #9ca3af;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.metric-label {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.metric-value.muted {
  color: #6b7280;
}

.metric-value.returns {
  color: #dc2626;
}

.card-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  text-align: center;
}

.sales-value {
  font-size: 16px;
  font-weight: 700;
  color: #059669;
}

/* Zachowaj stare nazwy dla kompatybilności */
.day-card-header,
.day-name,
.day-date,
.day-card-metrics,
.day-card-footer {
  /* Używane przez istniejący kod, mapowane na uniwersalne klasy */
}


/* side */
.week-side {
  display: grid;
  gap: 14px;
}

/* =================================================
   BUTTONS / ERRORS
   ================================================= */

button {
  cursor: pointer;
}


.error {
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
}

/* =================================================
   STATS VIEW - NOWA MODULARNA STRUKTURA
   ================================================= */



/* Sekcja wyboru okresu */
.stats-period-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
margin-top: 20px;
  padding-bottom: 24px;
}

.period-item {
     background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;

    position: relative;
    overflow: hidden;
  padding: 16px 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.period-item:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.period-item:hover h4 {
  opacity: 0.9;
}

.period-item.active-period {
  border-color: rgba(59, 130, 246, 0.6);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(17, 24, 39, 0.98) 100%);
}

.period-item.active-period h4 {
  opacity: 1;
  color: #3b82f6;
}

.period-item h4 {
  margin: 0;
  font-size: 18px;
  opacity: 0.65;
}

.period-item input, .period-item select {
    background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, border-width 0.2s ease;

  font-size: 15px;
  font-weight: 600;
  color: #ffffff;

  text-align: center;

  outline: none;
}

.period-item input:hover, .period-item select:hover {
  border-color: rgba(255, 255, 255, 0.9);
}

.period-item input:focus, .period-item select:focus {
  border-color: rgba(59, 130, 246, 0.9);
}

/* Sekcja wyników */
.stats-results {
  display: grid;
  gap: 24px;
}

/* Tabele liczbowe */
.stats-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.stats-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}

.stats-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #111827;
}

/* Wykresy */
.stats-charts {
  display: grid;
  gap: 20px;
}

.chart-container {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.chart-container h4 {
  margin: 0 0 16px;
  font-size: 15px;
}

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

/* Analiza */
.stats-analysis {
  margin-top: 8px;
}

.stats-analysis .stats-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}


/* Grid metryk dla kart statystyk */
.card-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.metric-tile {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.metric-label {
  font-size: 16px;
  opacity: 0.75;
}

.metric-value {
  font-size: 16px;
  font-weight: 600;
}

.metric-subvalue {
  font-size: 16px;
  font-weight: 700;
color: #ffffff;
}

.metric-tile.best .metric-label { color: #10b981; }
.metric-tile.worst .metric-label { color: #ef4444; }

.card-footer {
  margin-top: 14px;
  text-align: center;
}

/* =================================================
    WEEK DASHBOARD DAY STATUSES
    ================================================= */

.day-status-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
  font-size: 13px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border: 2px solid transparent;
}

.day-status-item.day-status-today {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.day-status-item.day-status-none {
  /* Domyślny - szary */
  background: #f3f4f6;
  color: #6b7280;
}

.day-status-item.day-status-partial {
  /* Pomarańczowy dla częściowych */
    background: linear-gradient(135deg, rgb(185 145 16 / 38%) 0%, rgb(150 112 5 / 31%) 100%);
    border: 2px solid rgb(185 116 16 / 40%);
    box-shadow: rgb(222 227 15 / 15%) 0px 4px 12px;
  color: #ffffff;
}

.day-status-item.day-status-complete {
  /* Zielony dla kompletnych */
     background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 2px solid rgba(16, 185, 129, 0.4);
    box-shadow: rgba(16, 185, 129, 0.15) 0px 4px 12px;
  color: #ffffff;
}

.day-status-item.day-status-holiday {
  /* Czerwony dla świąt */
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
  color: #991b1b;
}

.day-status-item.day-status-future {
  /* Niebieski dla przyszłości */
background: linear-gradient(135deg, #3b82f67d 0%, #2563eb85 100%) !important;
    border: 3px solid #1d4ed89c !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4) !important;
  color: #ffffff;
}

/* =================================================
    RESPONSIVE
    ================================================= */

@media (max-width: 1200px) {
  .day-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .week-layout {
    grid-template-columns: 1fr;
  }

  .week-days {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-period-selector {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .day-grid-4,
  .week-days,
  .stats-period-selector {
    grid-template-columns: 1fr;
  }

  .stats-numbers {
    grid-template-columns: 1fr;
  }
}

/* =================================================
   ZARZĄDZANIE
   ================================================= */

.manage-container {
  display: grid;
  gap: 20px;
  max-width: 1600px;
}

.manage-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

.manage-card h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.manage-card p {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 14px;
}

.generator-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.generator-controls label {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}



.generator-controls span {
  font-weight: 600;
  color: #3b82f6;
  font-size: 15px;
}

.btn-generate {
  margin-top: 10px;
  padding: 12px 20px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-generate:hover {
  background: #2563eb;
}

.btn-danger {
  padding: 12px 20px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-export,
.btn-import {
  padding: 12px 20px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s;
}

.btn-export:hover,
.btn-import:hover {
  background: #15803d;
}

.generator-status {
  margin-top: 20px;
  padding: 16px;
  background: #f3f4f6;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =================================================
   TYGODNIE BIEŻĄCEGO MIESIĄCA
   ================================================= */

.current-month-weeks {
  margin: 24px 0;
}

.month-weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Gdy 5 tygodni - zmniejsz minimalną szerokość */
.month-weeks-grid:has(> :nth-child(5)) {
  grid-template-columns: repeat(5, 1fr);
}

/* Responsywność dla 5 tygodni */
@media (max-width: 1400px) {
  .month-weeks-grid:has(> :nth-child(5)) {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .month-weeks-grid:has(> :nth-child(5)) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.week-tile {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 2px solid #e5e7eb;
  transition: all 0.2s;
}

.week-tile:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border-color: #111827;
}

.week-tile-empty {
  background: #fef3c7;
  border-color: #f59e0b;
  border-style: solid;
  border-width: 2px;
}

.week-tile-empty:hover {
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.week-tile-header {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.week-tile-key {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.week-tile-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.week-tile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.week-tile-row span {
  color: #6b7280;
}

.week-tile-row strong {
  color: #111827;
}

.week-tile-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.week-tile-total {
  font-weight: 600;
}

.week-tile-total strong {
  color: #3b82f6;
  font-size: 14px;
}

.week-tile-final {
background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
  margin: 4px -8px -4px -8px;
  padding: 6px 8px;
}

.week-tile-final strong {
  color: #92400e;
  font-size: 14px;
}

.week-tile-empty-text {
  text-align: center;
  padding: 40px 0;
  color: #f59e0b;
  font-weight: 600;
  font-size: 14px;
}

.stats-info {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-size: 14px;
  background: #f9fafb;
  border-radius: 10px;
}

@media (max-width: 1200px) {
  .month-weeks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .month-weeks-grid {
    grid-template-columns: 1fr;
  }
}

/* =================================================
   DASHBOARD TYGODNIA
   ================================================= */

.dashboard-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
}

.dashboard-card h4 {
  margin: 0 0 8px 0;
  color: #1e40af;
  font-size: 16px;
}

.dashboard-card p {
  margin: 0 0 12px 0;
  color: #6b7280;
  font-size: 14px;
}

/* =================================================
   ENTERPRISE DAY-OFF STATUS
   ================================================= */

.dashboard-status {
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 2px solid transparent;
}

.dashboard-status .status-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-status .status-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.dashboard-status .status-meta {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.dashboard-status .status-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Hard block - Niedziela (danger) */
.dashboard-status.status-sunday {
  background: rgba(185, 28, 28, 0.08);
  border-color: rgba(185, 28, 28, 0.3);
}

.dashboard-status.status-sunday .status-header h4 {
  color: #ef4444;
}

.dashboard-status.status-sunday .status-icon {
  color: #ef4444;
}

.dashboard-status.status-sunday .status-note {
  color: #b91c1c;
}

/* Soft block - Święto (warning) */
.dashboard-status.status-holiday {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

.dashboard-status.status-holiday .status-header h4 {
  color: #f59e0b;
}

.dashboard-status.status-holiday .status-icon {
  color: #f59e0b;
}

.dashboard-status.status-holiday .status-note {
  color: #b45309;
}

/* =================================================
   ENTERPRISE FORM DISABLED STATE
   ================================================= */

.form-disabled {
  opacity: 0.7;
}

.form-disabled input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.form-disabled input:focus {
  outline: none;
  box-shadow: none;
}

.week-days-status {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.day-status-item {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: none;
}

.day-status-complete {
  background: #dcfce7;
  color: #166534;
  border-color: #16a34a;
}

.day-status-partial {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
}

.day-status-none {
  background: #fee2e2;
  color: #991b1b;
  border-color: #ef4444;
}

.day-status-today {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.7);
  transform: scale(1.08);
  position: relative;
  z-index: 10;
  animation: oplexGlowPulse 2s ease-in-out infinite;
}

.day-status-today small {
  color: #e0e7ff !important;
}

/* @keyframes glow-pulse → przeniesione do OPLEXMotion jako oplexGlowPulse */

@media (max-width: 900px) {
  .week-days-status {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .week-days-status {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =================================================
   PRZYSZŁE DNI - BLOKADA
   ================================================= */

.dashboard-future {
    background: linear-gradient(135deg, rgb(185 145 16 / 38%) 0%, rgb(150 112 5 / 31%) 100%);
    border: 2px solid rgb(185 116 16 / 40%);
    box-shadow: rgb(222 227 15 / 15%) 0px 4px 12px;
}

.dashboard-future h4 {
  color: #92400e;
}

.day-status-future {
  background: #e5e7eb;
  color: #6b7280;
  border-color: #9ca3af;
  cursor: not-allowed;
}

.day-status-future:hover {
  transform: none;
  box-shadow: none;
}


/* ========== NOWE STYLE V3.0 ========== */



/* Czerwone kafelki dla świąt */
.day-status-holiday {
  background: #fee2e2;
  color: #991b1b;
  border-color: #dc2626;
}

.day-status-holiday:hover {
  background: #fecaca;
  transform: translateY(-2px);
}

/* Grid dla wykresów 2x2 */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.chart-tile {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  min-height: 300px;
}

.chart-tile canvas {
  max-height: 250px !important;
}

/* Stats numbers w jednym rzędzie */
.stats-numbers {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.stats-numbers > div {
  flex: 1;
  min-width: 200px;
}

/* Responsive dla wykresów */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-numbers {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-numbers {
    flex-direction: column;
  }
  
  .day-status-item {
    width: 45px !important;
    height: 45px !important;
    font-size: 9px !important;
  }
}

/* Aktywny kafelek statystyk */
.active-period {
  background: linear-gradient(
    180deg,
    rgba(59,130,246,0.25),
    rgba(30,64,175,0.35)
  ) !important;

  box-shadow:
    0 0 0 1px rgba(59,130,246,0.45),
    0 6px 24px rgba(59,130,246,0.25);
}

.active-period h4 {
  color: #ffffff;
}

/* =================================================
   PRZYCISK POMOC
   ================================================= */

.btn-help {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: 2px solid #1e40af;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-help:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.btn-help:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}


/* Admin Badge w topbar */
.admin-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.3));
  border: 1px solid #3b82f6;
  color: #60a5fa;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ================= ZEGAR CYFROWY ================= */
.digital-clock {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.digital-clock span {
  display: inline-block;
}

#clockTime {
  font-size: 22px;
  letter-spacing: 2px;
}

#clockDate {
  font-size: 13px;
  opacity: 0.85;
  font-weight: normal;
}

/* ==================== EFEKTY HOVER DLA PRZYCISKÓW ==================== */

/* Przyciski nawigacji (Wcześniej, DZIŚ, Później) */
button[onclick*="prevDay"],
button[onclick*="goToToday"],
button[onclick*="nextDay"] {
  transition: all 0.3s ease;
}

button[onclick*="prevDay"]:hover,
button[onclick*="nextDay"]:hover {
  background: #1f2937 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

button[onclick*="goToToday"]:hover {
  background: rgba(59,130,246,0.22) !important;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(59,130,246,0.35);
  transform: translateY(-2px);
}

/* Zakładki (Dzień, Tydzień, Statystyki, Zarządzanie) */
.tabs button,
button[id*="Tab"] {
  transition: all 0.3s ease;
}

.tabs button:hover,
button[id*="Tab"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tabs button.active:hover,
button[id*="Tab"].active:hover {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* Przyciski "Poprzedni tydzień" i inne */
button[onclick*="prevWeek"],
button[onclick*="nextWeek"],
button[onclick*="Week"] {
  transition: all 0.3s ease;
}

button[onclick*="prevWeek"]:hover,
button[onclick*="nextWeek"]:hover {
  background: #1f2937 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Przyciski akcji (Zapisz, Anuluj, itp.) */
button[class*="btn"],
.btn-primary,
.btn-danger,
.btn-success {
  transition: all 0.3s ease;
}

button[class*="btn"]:hover,
.btn-primary:hover,
.btn-success:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.btn-danger:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
  filter: brightness(1.1);
}

/* Efekt kliknięcia */
button:active {
  transform: translateY(0) scale(0.98) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Cursor pointer dla wszystkich przycisków */
button {
  cursor: pointer;
}

/* ==================== EFEKTY HOVER DLA KAFELKÓW TYGODNIA ==================== */
/* Usunięte - zastąpione nową strukturą .day-tile z .day-tile-state */

/* Karta wysyłki i podsumowania */
.week-summary:hover,
.week-side .day-col:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4) !important;
  border-color: #1d4ed89c  !important;
}

.week-summary,
.week-side .day-col {
  transition: all 0.3s ease;
}

/* ==================== KLIKALNE KAFELKI DNI ==================== */
/* Usunięte - zastąpione nowym kontraktem hover dla .day-tile-state */

/* ==================== KALENDARZ MIESIĄCA ==================== */

.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  max-width: 1600px;
  margin: 0 auto;
}

.month-day-empty {
  /* Puste miejsce w kalendarzu */
}

.month-day-card {
  background: rgba(30, 30, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 150ms;
  cursor: pointer;
}

.month-day-card:hover {
  background: rgba(40, 40, 40, 0.98);
  transform: none;
  box-shadow: none;
}

.month-day-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.month-day-card .day-number {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.month-day-card .badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.month-day-card .badge.today {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.month-day-card .badge.future {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.month-day-card .badge.weekend {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.4);
}

.month-day-card .badge.holiday {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.month-day-card .badge.disabled {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.4);
}

.month-day-card .card-body {
  text-align: center;
  font-size: 14px;
  color: #ffffff;
}

.month-day-card .card-body strong {
  font-size: 16px;
  font-weight: 700;
}

.month-day-card .placeholder {
  color: #6b7280;
  font-style: italic;
}

/* Left-border accent strips — status zakodowany lewą krawędzią */
.month-day-today-border {
  border-left-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.08) !important;
  box-shadow: none;
}

.month-day-today-border:hover {
  background: rgba(59, 130, 246, 0.12) !important;
}

.month-day-data-border {
  border-left-color: #10b981;
}

.month-day-empty-border {
  border-left-color: rgba(239, 68, 68, 0.45);
}

.month-day-future-border {
  border-left-color: rgba(255, 255, 255, 0.08);
}

.month-day-weekend-border,
.month-day-holiday-border,
.month-day-disabled-border {
  border-left-color: rgba(255, 255, 255, 0.08);
  opacity: 0.4;
  cursor: not-allowed;
}

.month-day-weekend-border:hover,
.month-day-holiday-border:hover,
.month-day-disabled-border:hover {
  background: rgba(30, 30, 30, 0.98);
}

/* ==================== KAFELEK OBRÓT CAŁKOWITY ==================== */

.week-total-card {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 3px solid #1d4ed8;
  border-radius: 20px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  animation: oplexCardGlow 3s ease-in-out infinite;
}

.week-total-card h3 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.week-total-value {
  color: #ffffff;
  font-size: 32px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: oplexScalePulse 2s ease-in-out infinite;
}

/* @keyframes week-total-glow → oplexCardGlow w OPLEXMotion */
/* @keyframes week-total-pulse → oplexScalePulse w OPLEXMotion */

/* ==================== KARTA WYNIKI - NIEBIESKI PREMIUM ==================== */

.day-results-premium {
background: linear-gradient(135deg, #3b82f67d 0%, #2563eb85 100%) !important;
    border: 3px solid #1d4ed89c !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4) !important;
  animation: oplexCardGlow 3s ease-in-out infinite;
}



.day-results-premium label {
  color: #e0e7ff !important;
}

.day-results-premium strong:not(label strong) {
  color: #ffffff !important;
  display: block;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 4px;
  margin-bottom: 12px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.day-total-value {
  font-size: 24px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* @keyframes results-glow → oplexCardGlow w OPLEXMotion */

/* ==================== KAFELKI STATYSTYK - JEDNOLITY STYL ==================== */

.stats-card-unified {
   background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
  padding: 16px;
  transition: all 0.3s ease;
}

.stats-card-unified:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: #9ca3af;
}

.stats-card-unified.clickable {
  cursor: pointer;
  animation: oplexSubtlePulse 2s ease-in-out infinite;
}

.stats-card-unified.clickable:hover {
  animation: none;
}

.stats-card-unified.clickable:active {
  transform: translateY(-2px) scale(1.01);
}

/* @keyframes stats-gold-pulse → oplexSubtlePulse w OPLEXMotion */

/* @keyframes day-card-pulse → oplexSubtlePulse w OPLEXMotion */

/* Wspólny kontrakt strukturalny dla .stats-card-unified */
.stats-card-unified .card-header {
  margin-bottom: 12px;
}

.stats-card-unified .card-title {
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  text-align: center;
}

.stats-card-unified .card-subtitle {
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
  margin-top: 4px;
}

.stats-card-unified .card-body {
  /* Elastyczny kontener dla treści */
}

.stats-card-unified .card-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  text-align: center;
}

.chart-aggregate {
  font-size: 14px;
  color: #059669;
  font-weight: 500;
}

/* Modyfikator .week-tile - mniejsza gęstość */
.stats-card-unified.week-tile {
  padding: 12px;
}

.stats-card-unified.week-tile .card-title {
  font-size: 14px;
}

.stats-card-unified.week-tile .card-subtitle {
  font-size: 12px;
}

/* Zachowane istniejące style dla kompatybilności wstecznej */
.week-tile-header {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  font-weight: 700;
  margin-bottom: 8px;
}

.week-tile-key {
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 8px;
}

.week-tile-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.week-tile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.week-tile-row span {
  color: #9ca3af;
  font-size: 14px;
}

.week-tile-row strong {
  color: #ffffff;
  font-weight: 600;
}

.week-tile-divider {
  height: 1px;
  background: rgba(59, 130, 246, 0.2);
  margin: 8px 0;
}

.week-tile-total {
  font-weight: 600;
}

.week-tile-total strong {
  color: #3b82f6;
}

.week-tile-final {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
  padding: 6px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

.week-tile-final strong {
  color: #92400e;
  font-weight: 700;
}

/* ==================== VALIDATION ERROR MODAL ==================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.modal-content h2 {
  margin: 0 0 16px 0;
  color: #dc2626;
  font-size: 18px;
  font-weight: 700;
}

.modal-content p {
  margin: 0 0 20px 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

#validationErrorList {
  text-align: left;
  margin: 0 0 24px 0;
  padding: 0;
  list-style: none;
}

#validationErrorList li {
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-size: 14px;
}

#validationErrorList li:before {
  content: "• ";
  color: #dc2626;
  font-weight: bold;
}

#validationErrorOkBtn {
  padding: 12px 24px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#validationErrorOkBtn:hover {
  background: #2563eb;
}

/* Field highlighting for validation errors */
/* ========================================
   KOMPAKTOWE KAFELKI TYDZIEŃ - v3.1
   ======================================== */

/* Główny kontener kafelków - mniejsze odstępy */
.week-side {
  display: grid;
  gap: 10px; /* było 14px */
}

/* Kafelki - mniejszy padding i czcionki */
.week-side .day-col {
  padding: 12px 14px; /* było 18px */
  border-radius: 12px; /* było 16px */
}

.week-side .day-col h4 {
  font-size: 13px; /* było 15px */
  margin: 0 0 8px 0;
  font-weight: 700;
}

.week-side .day-col label {
  font-size: 11px; /* było 13px */
  color: #92400e;
  display: block;
  margin-top: 6px; /* było 8px */
  margin-bottom: 2px;
  font-weight: 500;
}

.week-side .day-col strong {
  font-size: 16px; /* było 20px */
  display: block;
  margin-bottom: 6px; /* było 10px */
  color: #92400e;
}

/* Sekcje wewnętrzne kafelka sklep - kompakt */
.week-side .day-col > div {
  margin-bottom: 10px; /* było 15px */
}

.week-side .day-col > div:last-child {
  margin-bottom: 0;
}

/* Wiersze w kafelku sklep - mniejsze odstępy */
.week-side .day-col > div > div {
  display: flex;
  justify-content: space-between;
  margin-top: 4px; /* było 5px */
  font-size: 11px; /* było 13px */
}	

.week-side .day-col > div > div span {
  font-size: 11px;
}

.week-side .day-col > div > div strong {
  font-size: 14px; /* było 16px */
  margin-bottom: 0;
}

/* Nagłówki sekcji w kafelku sklep */
.week-side .day-col > div > label:first-child {
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 4px;
}

/* Divider w kafelku sklep */
.week-side .day-col > div[style*="border-top"] {
  border-top: 2px solid #D4AF37 !important;
  padding-top: 8px !important; /* było 10px */
  margin-top: 8px !important; /* było 10px */
}

.week-side .day-col > div[style*="border-top"] label {
  font-size: 11px;
  margin-bottom: 4px;
}

.week-side .day-col > div[style*="border-top"] strong {
  font-size: 17px; /* było 18px - podsumowanie */
  font-weight: 700;
}

/* Kafelek WARTOŚĆ SPRZEDAŻY - kompaktowy */
.week-total-card {
  padding: 12px 16px; /* było 16px 20px */
  border-radius: 16px; /* było 20px */
  margin-top: 0; /* bez dodatkowego odstępu */
}

.week-total-card h3 {
  font-size: 13px; /* było 15px */
  margin: 0 0 6px 0; /* było 8px */
  letter-spacing: 0.3px; /* było 0.5px */
}

.week-total-value {
  font-size: 28px; /* było 32px */
  font-weight: 900;
}

/* Responsywność - jeszcze mniejsze na mobile */
@media (max-width: 768px) {
  .week-side .day-col {
    padding: 10px 12px;
  }
  
  .week-side .day-col h4 {
    font-size: 12px;
  }
  
  .week-side .day-col strong {
    font-size: 14px;
  }
  
  .week-total-value {
    font-size: 24px;
  }
}

/* ========================================
   POPRAWKI v3.2 - CZARNA CZCIONKA
   ======================================== */

/* Wartości w kafelkach złotych (Wyniki wysyłek, sklep) - CZARNA */
.week-side .day-col strong {
  color: #111827 !important;
  font-weight: 700;
}

/* Wartości w sekcjach stanowisk - CZARNA */
.week-side .day-col > div > div strong {
  color: #111827 !important;
  font-weight: 600;
}

/* Podsumowanie "Obrót sklep" - CZARNA */
.week-side .day-col > div[style*="border-top"] strong {
  color: #111827 !important;
  font-weight: 700;
}

/* Wartości w kafelkach tygodni (statystyki) - CZARNA */
.week-tile-stats strong {
  color: #111827 !important;
}

/* Wyjątek: wartość sprzedaży (żółty box) - brązowa */
.week-tile-final strong[style*="background"] {
  color: #92400e !important;
}

/* Etykiety pozostają jak są */
.week-side .day-col label,
.week-side .day-col h4 {
  color: #92400e;
}

/* ==========================================
    GLOBAL CLOCK SYSTEM
    ========================================== */

.system-clock-tile {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 14px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-dashboard-tile {
     padding: 8px 16px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    margin-right: 16px;
}

/* ==========================================
    STATISTICS PANEL SYSTEM
    ========================================== */

.statistics-panel {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.panel-header {
  margin-bottom: 32px;
}

.panel-header h2 {
  margin: 0;
  color: #ffffff;
}

.panel-subtitle {
  opacity: 0.7;
  font-size: 14px;
  color: #ffffff;
}

.panel-section {
  margin-bottom: 32px;
}

.panel-section:last-child {
  margin-bottom: 0;
}

/* Management Panel */
.management-panel {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.management-panel .panel-header {
  margin-bottom: 32px;
}

.management-panel .panel-subtitle {
  opacity: 0.7;
  font-size: 14px;
}

.management-panel .panel-section {
  margin-bottom: 32px;
}

.management-panel .panel-section:last-child {
  margin-bottom: 0;
}

.management-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.management-panel .panel-section {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
}

.management-panel .panel-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* (week-status-card usunięte) */
.status-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 12px;
  opacity: 0.6;
}

.metric-value {
  font-size: 16px;
  font-weight: 600;
}

.metric-value.error {
  color: #ef4444;
}

/* ================= DAY HEADER PREMIUM ================= */

.day-header-premium {
  max-width: 1600px;
  margin: 12px auto 20px auto;
  padding-bottom: 12px;
  position: relative;
  text-align: center;
}

.day-header-premium::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 520px;
    height: 2px;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0),
        rgba(255,255,255,0.55),
        rgba(255,255,255,0)
    );
    box-shadow:
        0 0 6px rgba(255,255,255,0.12),
        0 0 14px rgba(59,130,246,0.12);
}

#dayHeaderText, #weekHeaderText {
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #ffffff;
}

/* SUPER-ADMIN section - warning style */
.management-panel .panel-section.admin {
  border-left: 4px solid #f59e0b;
}

.management-panel .panel-section h4 {
  color: #ffffff;
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.management-panel .panel-section p {
  color: #9ca3af;
  font-size: 14px;
  margin: 0 0 20px;
}

.management-panel .panel-section.admin h4 {
  color: #f59e0b;
}

.management-panel .panel-section.admin p {
  color: #d97706;
}


@media (min-width: 768px) {
  .topbar-dashboard-tile:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  }
}

/* Styl dla wartości sprzedaży w podsumowaniu tygodnia */
#sumNetSales {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
}

/* Specjalny styl dla wartości sprzedaży w dniu */
#netSales {
  background: #f0f0f0 !important;
  color: #333333 !important;
}

/* Specjalny styl dla obrotu całkowitego w dniu */
#dayTotal {
  background: transparent;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
}

/* === BILLING ANALYZER STYLES - FOR WEEK SUMMARY === */

.analyzer-summary-card {
  background: rgba(30, 30, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  margin-top: 14px;
}

.analyzer-summary-card.day-summary-premium {
  margin-top: 15px;
}

.analyzer-summary-card::before {
  display: none;
}

.analyzer-summary-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
    color: #9ca3af;

}

/* === 2. HERO SECTION - SUMA OPŁAT === */

.summary-hero {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.summary-hero::after {
  display: none;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero-row > span:first-child {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-amount {
  font-size: 2rem !important;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-desc {
  font-size: 0.875rem !important;
  color: var(--text-tertiary) !important;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

/* === 2.5 HERO ITEMS - PRIMARY/SECONDARY === */

.summary-hero-item .label {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 6px;
}

/* Specific colors for summary cards */
.analyzer-summary-card.day-summary-premium .summary-hero-item.primary .label,
.analyzer-summary-card.week-summary-premium .summary-hero-item.primary .label {
  color: #16a34a;
}

.analyzer-summary-card.day-summary-premium .summary-hero-item.secondary .label,
.analyzer-summary-card.week-summary-premium .summary-hero-item.secondary .label {
  color: #ffffff;
}

.summary-hero-item .value {
  display: block;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.summary-hero-item.primary .value-xl {
  font-size: 32px;
  font-weight: 800;
}

.summary-hero-item.secondary .value-lg {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.9;
}

/* === 3. SEKCJA STRUKTURY OPŁAT === */

.summary-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.summary-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.summary-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* =================================================
   PREMIUM STAGGER REVEAL - DAY CARDS ANIMATION
   ================================================= */

.day-cards-enter {
  opacity: 0;
}

.day-cards-enter .form-card {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(2px);
}



.day-cards-active .form-card {

  transform: translateY(0);
  filter: blur(0);
  transition:
    opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 600ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.day-cards-active .form-card:nth-child(1) { transition-delay: 60ms; }
.day-cards-active .form-card:nth-child(2) { transition-delay: 120ms; }
.day-cards-active .form-card:nth-child(3) { transition-delay: 180ms; }
.day-cards-active .form-card:nth-child(4) { transition-delay: 240ms; }
.day-cards-active .form-card:nth-child(5) { transition-delay: 300ms; }
.day-cards-active .form-card:nth-child(6) { transition-delay: 360ms; }


/* === 4. FLEX ROW - NAZWA | KWOTA === */

.summary-grid-2 {
  /* Override existing grid */
  display: flex;
  flex-direction: column;
  gap: 0;
}

.summary-row {
  /* Override display: contents */
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  transition: background var(--transition-fast);
  position: relative;
}

.summary-row:hover {
  background: rgba(59, 130, 246, 0.05);
}

/* Nazwa kategorii */
.summary-row > span:first-child {
  font-size: 16px;
  color: #9ca3af;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  flex: 1;
}

/* Kwota - zawsze wyrównana do prawej */
.summary-row > span:last-child {
  font-size: 18px;
  color: #16a34a;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 120px;
  padding-left: 16px;
  white-space: nowrap;
}



/* Hero amount - kolor zależny od znaku */
.hero-amount {
  /* Domyślnie biały */
  color: var(--text-primary);
}

/* Jeśli zawiera minus - czerwony (obsługiwane przez inline wartość) */
/* Nie możemy wykryć w CSS, więc pozostawiamy biały uniwersalny */

/* === 6. GRUPA UZNANIA - SPECJALNA SEKCJA === */

.summary-section.uznania {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.05) 0%,
    rgba(16, 185, 129, 0.02) 100%
  );
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 28px;
  position: relative;
}

/* Zielona linia/badge */
.summary-section.uznania::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--success),
    transparent
  );
  border-radius: 12px 12px 0 0;
}

.summary-section.uznania h4 {
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-section.uznania h4::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.15);
}


.summary-row > span.negative {
    color: #dc2626;
}
.summary-row > #sumShippingCount {
    color: #ffffff;
}

.day-grid-4 h4 {
    text-align: center;
    font-size: 20px;
    padding: 12px;

    border-radius: 8px 8px 0 0;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
}




.month-calendar-grid {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
}

#statsView {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
}

.day-status-future {
  opacity: 0.5;
  cursor: not-allowed;
}

.day-status-future:hover {
  transform: none;
  box-shadow: inherit;
}

/* @keyframes slideIn → oplexSlideUpFade w OPLEXMotion */

/* ============================================
   WEEK STATUS CARD (Premium Design)
   ============================================ */

.week-status-card {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.week-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.2);
}

/* Header */
.week-status-header {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.week-status-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e5e7eb;
  letter-spacing: 0.5px;
}

/* (week-status-card premium design usunięte) */

.week-total-value,
.day-total-value {
  font-size: 18px;
}

/* Nagłówki dni tygodnia w kalendarzu miesiąca */
.month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  max-width: 1600px;
  margin-bottom: 12px;
}

.month-weekday {
  text-align: center;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
  pointer-events: none;
}

/* ENTERPRISE PATCH — HARD EDGES */
*,
*::before,
*::after {
  border-radius: 0 !important;
}

/* =================================================
   DAY OFF STATE - ENTERPRISE UI
   ================================================= */

/* Enterprise Info Panel - Dzień wolny */
.day-off-info-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: #1f2933;
  border-radius: 8px;
  border-left: 4px solid #64748b;
  margin-bottom: 24px;
}

.day-off-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #94a3b8;
}

.day-off-icon svg {
  width: 100%;
  height: 100%;
}

.day-off-content {
  flex: 1;
}

.day-off-content h4 {
  margin: 0 0 8px 0;
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 600;
}

.day-off-content p {
  margin: 0 0 4px 0;
  color: #94a3b8;
  font-size: 14px;
}

/* Formularze w stanie dnia wolnego */
.view--day-off .form-card {
  opacity: 0.5;
}

.view--day-off .metric-input input {
  background: #374151 !important;
  border-color: #4b5563 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
}

.view--day-off .metric-input input::placeholder {
  color: #6b7280 !important;
}

.view--day-off .metric-input input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.view--day-off .status-badge.day-off {
  background: #374151;
  color: #9ca3af;
}

/* Status badges dla dnia wolnego */
.status-badge.day-off {
  background: #374151;
  color: #9ca3af;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}


/* ================= STATS VIEW SUMMARY CARDS ================= */
.stats-summary-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  
}

.stats-summary-empty {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  opacity: 0.6;
}

.summary-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin-top: -8px;
  margin-bottom: 16px;
}

.summary-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #334155;
}



/* Stats Summary Cards - Compact styling for statsView */
.stats-numbers .analyzer-summary-card.stats-summary-card {
  max-width: 700px;
  margin: 0 auto 20px auto;
  padding: 20px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-subtitle {
  font-size: 13px;
  margin-bottom: 12px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero {
  gap: 12px;
  margin-bottom: 16px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item {
  padding: 12px 16px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .label {
  font-size: 13px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .value-xl {
  font-size: 24px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .value-lg {
  font-size: 20px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-section-title {
  font-size: 12px;
  margin: 16px 0 10px 0;
  padding-bottom: 6px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-section {
  gap: 8px;
  margin-bottom: 12px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row {
  padding: 10px 0;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row .label {
  font-size: 13px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row .value {
  font-size: 14px;
}

/* Compact vertical spacing for stats cards */
.stats-numbers .analyzer-summary-card.stats-summary-card {
  padding: 16px 20px;
  margin-bottom: 16px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card h3 {
  font-size: 16px;
  margin-bottom: 2px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-subtitle {
  font-size: 12px;
  margin-top: -4px;
  margin-bottom: 10px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero {
  gap: 8px;
  margin-bottom: 12px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item {
  padding: 8px 12px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .label {
  font-size: 12px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .value-xl {
  font-size: 22px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .value-lg {
  font-size: 18px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-section-title {
  font-size: 11px;
  margin: 12px 0 8px 0;
  padding-bottom: 4px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-section {
  gap: 4px;
  margin-bottom: 8px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row {
  padding: 6px 0;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row .label {
  font-size: 12px;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row .value {
  font-size: 13px;
}

/* AGGRESSIVE height reduction for stats summary cards */
.stats-numbers .analyzer-summary-card.stats-summary-card {
  padding: 14px 18px !important;
  margin-bottom: 14px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card h3 {
  font-size: 17px !important;
  
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-subtitle {
  font-size: 13px !important;
  margin-top: -2px !important;
  margin-bottom: 8px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero {
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
  gap: 6px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero::after {
  display: none !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item {
  padding: 6px 10px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .label {
  font-size: 13px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .value-xl {
  font-size: 24px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-hero-item .value-lg {
  font-size: 20px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-section-title {
  font-size: 12px !important;
  margin: 10px 0 6px 0 !important;
  padding-bottom: 3px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-section {
  gap: 2px !important;
  margin-bottom: 6px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top-width: 1px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-section:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row {
  padding: 5px 0 !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row .label {
  font-size: 13px !important;
}

.stats-numbers .analyzer-summary-card.stats-summary-card .summary-row .value {
  font-size: 14px !important;
}

/* Empty state compact styling */
.stats-numbers .stats-summary-empty {
  padding: 14px 18px !important;
  margin-bottom: 14px !important;
      margin: 0 auto 20px auto;
  max-width: 700px;
}

.stats-numbers .stats-summary-empty h3 {
  font-size: 15px !important;
  margin-bottom: 8px !important;
}

.stats-numbers .stats-summary-empty .summary-hero {
  padding: 12px !important;
  margin-bottom: 0 !important;
}

.stats-numbers .stats-summary-empty .summary-hero-item {
  padding: 12px 16px !important;
}

.stats-numbers .stats-summary-empty .label {
  font-size: 14px !important;
}

/* ===============================================
   STATS DATE PICKER — Dark Theme Contract
   Spójne z rentownosc / costs / obrot
   =============================================== */

/* Overlay — zaciemniony background */
.stats-date-modal {
  background: rgba(0, 0, 0, 0.6) !important;
}

/* Karta modala */
.stats-date-picker {
  max-width: 320px !important;
  width: 90% !important;
  background: rgba(22, 22, 22, 0.99) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 !important;
  padding: 20px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  text-align: left !important;
}

/* Header — tytuł + strzałki */
.stats-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Przyciski prev/next */
.stats-picker-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #9ca3af);
  border-radius: 0;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
  flex-shrink: 0;
}

.stats-picker-nav:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-primary, #e5e7eb);
}

.stats-picker-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.stats-picker-nav:disabled:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #9ca3af);
}

/* Tytuł okresu */
.stats-picker-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #e5e7eb);
  letter-spacing: -0.01em;
}

/* Kontener siatki */
.stats-picker-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.stats-picker-grid::-webkit-scrollbar { width: 4px; }
.stats-picker-grid::-webkit-scrollbar-track { background: transparent; }
.stats-picker-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0;
}

/* Nagłówki kolumn (dni tygodnia) */
.stats-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 6px;
}

.stats-grid-header span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 0;
}

/* Siatka dni */
.stats-grid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

/* Siatki tygodni / miesięcy / lat — lista pionowa */
.stats-grid-body.stats-week-grid,
.stats-grid-body.stats-month-grid,
.stats-grid-body.stats-year-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Komórka siatki — flat dark */
.stats-grid-cell {
  padding: 8px 4px;
  text-align: center;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary, #9ca3af);
  transition: background 120ms, color 120ms, border-color 120ms;
  background: transparent;
  border: 1px solid transparent;
  line-height: 1.3;
}

.stats-grid-cell:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #e5e7eb);
  border-color: rgba(255, 255, 255, 0.07);
}

/* Pusta komórka (offset kalendarza) */
.stats-grid-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

/* Aktualnie zaznaczony */
.stats-grid-cell.selected {
  background: rgba(59, 130, 246, 0.12) !important;
  border-color: rgba(59, 130, 246, 0.40) !important;
  color: #60a5fa !important;
  font-weight: 600;
}

/* Dzisiaj */
.stats-grid-cell.today {
  border-color: rgba(59, 130, 246, 0.30);
  color: #93c5fd;
}

/* Niedostępne (poza zakresem) */
.stats-grid-cell.disabled {
  opacity: 0.2;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Komórki list (tydzień, miesiąc, rok) */
.stats-grid-cell.week,
.stats-grid-cell.month,
.stats-grid-cell.year {
  text-align: left;
  padding: 10px 14px;
  border-radius: 0;
}

/* Footer */
.stats-picker-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: center;
}

/* Przycisk "Dzisiaj" */
.btn-stats-today {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #60a5fa;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}

.btn-stats-today:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}
