/* ========================================================================
   PREMIUM COMPONENTS - ADMIN MODULE
   Wzorowane na stylingu billingów Allegro
   ======================================================================== */

/* ========== PREMIUM CARD BASE ========== */

.premium-card {
    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;
  padding: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(59, 130, 246, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.premium-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

/* ========== HERO SECTIONS ========== */

.hero-section {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(30, 64, 175, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(-10%, -10%); opacity: 0.8; }
}

.hero-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-amount {
  font-size: 2.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  margin: 8px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.hero-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* Hero variants */
.hero-section.hero-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.hero-section.hero-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.hero-section.hero-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
}

/* ========== PREMIUM INPUTS ========== */

.premium-input {
  background: rgba(31, 41, 55, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: #f3f4f6;
  font-size: 1rem;
  width: 100%;
  transition: all 0.3s ease;
  font-family: inherit;
}

.premium-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 0 20px rgba(59, 130, 246, 0.3);
  background: rgba(31, 41, 55, 0.8);
}

.premium-input::placeholder {
  color: rgba(156, 163, 175, 0.5);
}

.premium-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(31, 41, 55, 0.3);
}

/* Premium input group */
.premium-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.premium-input-group .premium-input {
  flex: 1;
}

.premium-input-currency {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f3f4f6;
  min-width: 40px;
}

/* ========== PREMIUM TABLES ========== */

.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(31, 41, 55, 0.4);
  border-radius: 12px;
  overflow: hidden;
}

.premium-table thead {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
}

.premium-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  color: #60a5fa;
  border-bottom: 2px solid rgba(59, 130, 246, 0.4);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.premium-table tbody tr {
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.2s ease;
}

.premium-table tbody tr:last-child {
  border-bottom: none;
}

.premium-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
  transform: translateX(4px);
  box-shadow: -4px 0 0 0 rgba(59, 130, 246, 0.4);
}

.premium-table tbody td {
  padding: 16px 20px;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.premium-table .number-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
  font-feature-settings: 'tnum' 1;
}

.premium-table .status-cell {
  text-align: center;
}

/* ========== STATUS BADGES ========== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 2px solid;
  transition: all 0.2s ease;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.status-badge.open {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.status-badge.closed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

/* ========== PREMIUM BUTTONS ========== */

.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 2px solid #3b82f6;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  text-decoration: none;
}

.btn-premium:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-premium:active {
  transform: translateY(0);
}

/* Button variants */
.btn-premium-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 2px solid #10b981;
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-premium-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #059669;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.btn-premium-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: 2px solid #ef4444;
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-premium-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #dc2626;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

.btn-premium-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.btn-premium-warning:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.25) 100%);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Button sizes */
.btn-premium-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-premium-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ========== PAYROLL PREMIUM ========== */

.week-card-payroll.premium-card {
  /* Inherit from .premium-card */
}

.week-card-payroll.premium-card.week-closed {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(16, 185, 129, 0.15);
}

.week-card-payroll.premium-card.week-closed:hover {
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(16, 185, 129, 0.25);
}

.payroll-hero {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
  position: relative;
  overflow: hidden;
}

.payroll-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

/* ========== COSTS PREMIUM ========== */

.costs-source-card {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  flex: 1;
}

.costs-source-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.costs-source-icon {
  font-size: 48px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.costs-source-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.costs-source-content label {
  display: block;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.costs-source-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.costs-source-input {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  width: 300px;
  max-width: 100%;
  transition: all 0.3s ease;
  font-variant-numeric: tabular-nums;
}

.costs-source-input:focus {
  background: rgba(255,255,255,0.3);
  border-color: #fff;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
  outline: none;
}

.costs-source-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.costs-source-hint {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* ========== COSTS TOP ROW ========== */

.costs-top-row {
  display: flex;
  gap: 24px;
  align-items: stretch;
  flex-wrap: wrap;
}

/* Cost categories premium */
.cost-category.premium {
  background: rgba(31, 41, 55, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.cost-category.premium:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(31, 41, 55, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.cost-category.premium.readonly {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  border-style: dashed;
}

.cost-category.premium.readonly:hover {
  transform: none;
  box-shadow: none;
}

/* ========== PREMIUM SECTIONS ========== */

.premium-section {
  background: rgba(31, 41, 55, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.premium-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.premium-section-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #f3f4f6;
  font-weight: 600;
}

/* ========== STATS GRID ========== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-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.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.stat-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #3b82f6;
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}

.stat-card-label {
  font-size: 0.85rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .premium-card {
    padding: 20px;
  }
  
  .hero-section {
    padding: 24px;
  }
  
  .hero-amount {
    font-size: 2rem;
  }
  
  .costs-source-card {
    flex-direction: column;
    text-align: center;
  }
  
  .costs-source-input {
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== ANIMATIONS ========== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

/* ========== ACCESSIBILITY ========== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
.btn-premium:focus-visible,
.premium-input:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

/* ========== READONLY INPUTS ========== */

.premium-input[readonly] {
  background: rgba(59, 130, 246, 0.15) !important;
  cursor: not-allowed !important;
  opacity: 0.8;
}

.premium-input[readonly]:hover,
.premium-input[readonly]:focus {
  border-color: rgba(59, 130, 246, 0.3) !important;
  box-shadow: none !important;
}

.cost-category.premium.readonly .premium-input[readonly] {
  background: rgba(59, 130, 246, 0.2) !important;
  border: 2px solid rgba(59, 130, 246, 0.3);
}

/* ========== COST HINTS ========== */

.cost-hint {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 8px;
  line-height: 1.4;
}

.cost-category.premium .cost-hint {
  color: #6b7280;
}

.cost-category.premium.readonly .cost-hint {
  color: #93c5fd;
  font-style: italic;
}

/* ========== COST CATEGORY LABELS ========== */

.cost-category.premium label {
  display: block;
  color: #f3f4f6;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.cost-category.premium.readonly label {
  color: #93c5fd;
}

.cost-category.premium input.premium-input {
  width: 100%;
  background: rgba(17, 24, 39, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.2);
  color: #f3f4f6;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.cost-category.premium input.premium-input:focus {
  border-color: #3b82f6;
  background: rgba(17, 24, 39, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.cost-category.premium input.premium-input:hover:not([readonly]) {
  border-color: rgba(59, 130, 246, 0.4);
}

/* ========== NAVIGATION BAR ========== */

.navigation-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
  padding: 16px;
  background: rgba(31, 41, 55, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.btn-nav {
  padding: 10px 20px;
  background: #374151;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-nav:hover {
  background: #4b5563;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-nav:active {
  transform: translateY(0);
}

.btn-nav-current {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-nav-current:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.nav-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f3f4f6;
  min-width: 180px;
  text-align: center;
  padding: 0 16px;
}

/* ========== COMPARISON CARDS (COSTS) ========== */

.stat-card-blue {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: #3b82f6 !important;
}

.stat-card-blue .stat-card-value {
  color: #3b82f6 !important;
}

.stat-card-blue .stat-card-label {
  color: #93c5fd !important;
}

.stat-card-green {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: #10b981 !important;
}

.stat-card-green .stat-card-value {
  color: #10b981 !important;
}

.stat-card-green .stat-card-label {
  color: #6ee7b7 !important;
}

.interpretation-box {
  background: rgba(59, 130, 246, 0.05);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
  color: #93c5fd;
  font-size: 0.95rem;
  line-height: 1.6;
}

.premium-section-header {
  margin: 0 0 24px 0;
  color: #f3f4f6;
  font-size: 1.3rem;
  font-weight: 700;
}

/* ========== DISABLED STATES FOR BUTTONS ========== */

.btn-premium[disabled],
.btn-premium:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  filter: grayscale(30%);
}

.btn-premium-success[disabled],
.btn-premium-success:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  filter: grayscale(30%);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.btn-premium-danger[disabled],
.btn-premium-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  filter: grayscale(30%);
}

.btn-premium-warning[disabled],
.btn-premium-warning:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  filter: grayscale(30%);
}

/* Prevent hover effects on disabled */
.btn-premium[disabled]:hover,
.btn-premium-success[disabled]:hover,
.btn-premium-danger[disabled]:hover,
.btn-premium-warning[disabled]:hover {
  transform: none !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

/* ================================================================ */
/* COSTS MODULE REFACTOR - ALIGNED WITH DPD ANALYZER */
/* ================================================================ */

/* Costs Top Row */
#costsView .costs-top-row {
  display: flex;
  gap: 24px;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 24px auto;
}

/* Warning Hero Card */
#costsView .warning-hero {
  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;
  text-align: center;
  padding: 32px 40px;
  flex: 1;
  min-width: 300px;
}

#costsView .warning-hero .hero-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

#costsView .warning-hero h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

#costsView .warning-hero .hero-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* Costs Summary Card */
#costsView .costs-summary-card {
  flex: 1;
  min-width: 300px;
  display: flex;
  gap: 24px;
  align-items: center;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.25), rgba(30, 64, 175, 0.35));
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.45), 0 6px 24px rgba(59, 130, 246, 0.25);
  border: 2px solid rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

#costsView .costs-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

#costsView .costs-summary-card .costs-source-icon {
  font-size: 48px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

#costsView .costs-summary-card .costs-source-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

#costsView .costs-summary-card .costs-source-content label {
  display: block;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

#costsView .costs-total-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

#costsView .costs-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.1);
  padding: 12px 16px;
  border-radius: 8px;
}

#costsView .costs-total-label {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

#costsView .costs-total-value {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#costsView .costs-source-hint {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

/* Section Headers */
.section-header {
  margin: 48px auto 24px auto;
  max-width: 1200px;
}

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Costs Categories Container */
.costs-categories-container {
  max-width: 1200px;
  margin: 0 auto 24px auto;
     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);
  padding: 32px;
  border-radius: 16px;
}

#costsView .cost-integrations-toolbar {
  max-width: 1200px;
  margin: 8px auto 18px auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

#costsView .cost-integrations-status {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

#costsView #refreshCostIntegrationsBtn.is-loading {
  opacity: 0.7;
  cursor: wait;
}

#costsView .costs-categories-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 32px;
}

/* Cost Category Cards */
#costsView .cost-category-card {
  padding: 20px;
  position: relative;
  cursor: default;
  width: auto !important;
  display: block !important;
}

#costsView .cost-category-card.clickable {
  cursor: pointer;
}

#costsView .cost-category-card.clickable:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

#costsView .cost-category-card.readonly {
  opacity: 0.8;
  cursor: not-allowed;
}

#costsView .cost-category-card.readonly.clickable {
  cursor: pointer;
}

#costsView .cost-category-card label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

#costsView .cost-category-card .cost-value-display {
  width: 100%;
  padding: 12px;
  background: rgba(11, 14, 17, 0.6);
  border: 1px solid rgba(55, 65, 81, 0.5);
  border-radius: 8px;
  color: var(--primary-light);
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

#costsView .cost-category-card .cost-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  line-height: 1.4;
  min-height: 36px;
}

#costsView .cost-category-card .cost-details-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-light);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#costsView .cost-category-card.clickable:hover .cost-details-btn {
  opacity: 1;
}

#costsView .payroll-settlement-item {
  padding: 14px 16px;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid #374151;
  border-radius: 10px;
  transition: all 0.2s ease;
}

#costsView .payroll-settlement-item:hover {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(17, 24, 39, 0.75);
}

#costsView .payroll-settlement-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#costsView .payroll-settlement-label {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

#costsView .payroll-settlement-value {
  margin-top: 2px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

#costsView .payroll-settlement-amount-wrap {
  min-width: 170px;
  text-align: right;
}

#costsView .payroll-settlement-amount {
  margin-top: 2px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1.2;
}

#costsView .payroll-details-meta {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  line-height: 1.35;
}

#costsView .payroll-details-employees {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(59, 130, 246, 0.25);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#costsView .payroll-details-employees-title {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

#costsView .payroll-details-employee {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

#costsView .payroll-details-employee span:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-weight: 600;
}

/* Notes Section */
#costsView .costs-notes-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
}

#costsView .costs-notes-section label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

#costsView .costs-notes-section textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(55, 65, 81, 0.5);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#costsView .costs-notes-section textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: rgba(17, 24, 39, 0.8);
}

#costsView .costs-notes-section textarea::placeholder {
  color: var(--text-tertiary);
}

/* Save Section */
#costsView .costs-save-section {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
  #costsView .costs-top-row {
    flex-direction: column;
  }

  #costsView .cost-integrations-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #costsView .warning-hero,
  #costsView .costs-summary-card {
    width: 100%;
    min-width: auto;
  }
  
  #costsView .costs-categories-grid {
    grid-template-columns: 1fr !important;
  }
  
  #costsView .costs-categories-container {
    padding: 20px;
  }
}

/* Section Headers for Costs */
#costsView .section-header {
  margin: 48px auto 24px auto;
  max-width: 1200px;
}

#costsView .section-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

#costsView .section-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}



/* ========== FIX: Równa wysokość kafelków w costs-top-row ========== */

/* Ustawienie kolumnowego flexbox dla obu kart */
#costsView .warning-hero,
#costsView .costs-summary-card {
  display: flex;
  flex-direction: column;
}

/* Wyśrodkowanie zawartości w warning-hero */
#costsView .warning-hero {
  justify-content: center;
  align-items: center;
}

/* Dla costs-summary-card zachowaj poziomy layout wewnątrz */
#costsView .costs-summary-card {
  flex-direction: row; /* nadpisuje column z powyższego */
  align-items: center;
}


/* ENTERPRISE PATCH — HARD EDGES */
*,
*::before,
*::after {
  border-radius: 0 !important;
}
