﻿/* ==========================================
   OPLEX MANAGEMENT SYSTEM - MAIN STYLESHEET
   Version: 3.0.0
   Compatible with: System ObrĂłt v3.0.7
   ========================================== */

/* === RESET & BASE === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors from System ObrĂłt v3.0.7 */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #06b6d4;
  --dark: #111827;
  --dark-bg: #181818;
  --dark-card: #1f2937;
  --light: #f3f4f6;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  
  /* Oplex Brand */
  --oplex-yellow: #facc15;
  --oplex-red: #ef4444;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 40px rgba(59, 130, 246, 0.25);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }

/* Admin Title Animation */
#adminTitle {
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

#adminTitle.is-changing {
  opacity: 0;
  transform: translateY(-6px);
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================
   LOGIN OVERLAY
   ========================================== */
#loginOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-card {
  background: var(--dark);
  padding: 48px 40px;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 0 80px rgba(59, 130, 246, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  margin-bottom: 24px;
}

.login-logo img {
  height: 70px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(250, 204, 21, 0.4));
  transition: all var(--transition-base);
}

.login-logo img:hover {
  filter: drop-shadow(0 8px 24px rgba(250, 204, 21, 0.6));
  transform: scale(1.05);
}

.login-card h3 {
  font-size: 1.5rem;
  margin-bottom: 32px;
  color: var(--text-primary);
}

.login-card input {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  background: rgba(31, 41, 55, 0.8);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
  outline: none;
}

.login-card input:focus {
  border-color: var(--primary);
  background: rgba(31, 41, 55, 1);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-card input::placeholder {
  color: var(--text-tertiary);
}

.login-card button {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.login-card button:active {
  transform: translateY(0);
}

/* ==========================================
    TOP BAR
    ========================================== */
.topbar {
  height: 56px;
  background: #202020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'Inter', system-ui, sans-serif;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-center {
  display: flex;
  align-items: center;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #E5E7EB;
}

.topbar-text {
  color: #E5E7EB;
  font-size: 20px;
}

.topbar-title .ui-icon {
  /* default size from .ui-icon */
}

.topbar-icon {
  width: 18px;
  height: 18px;
  stroke: #9CA3AF;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.topbar-action {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #9CA3AF;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 120ms ease, color 120ms ease;
}

.topbar-action:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #E5E7EB;
}

/* ==========================================
    HEADER BAR
    ========================================== */
.header-bar {
  display: flex;
  align-items: center;
}

.header-bar .right {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.topbar-logo .logo-small {
  height: 40px;
  width: auto;
  transition: all var(--transition-base);
  filter: drop-shadow(0 2px 4px rgba(250, 204, 21, 0.3));
}

.topbar-logo .logo-small:hover {
  filter: drop-shadow(0 4px 12px rgba(250, 204, 21, 0.6));
  transform: scale(1.05);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.user-info svg {
  color: var(--primary);
}

.user-info strong {
  color: var(--text-primary);
}

.logout-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: var(--danger);
  transform: translateY(-1px);
}

/* ==========================================
   ADMIN UI
   ========================================== */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.5);
  }
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.admin-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  background: rgba(17, 24, 39, 0.95);
  border: 2px solid var(--primary);
  border-radius: 12px;
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  display: none;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.tile-locked {
  position: relative;
}

.tile-locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 17, 0.7);
  border-radius: 16px;
  backdrop-filter: blur(2px);
}

.tile-locked .admin-lock {
  display: block;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 24px;
  padding: 48px 40px;
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.hero-content h1 {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hero-logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(250, 204, 21, 0.4));
  transition: all var(--transition-slow);
}

.hero-logo:hover {
  filter: drop-shadow(0 8px 32px rgba(250, 204, 21, 0.8)) 
          drop-shadow(0 0 48px rgba(250, 204, 21, 0.6));
  transform: scale(1.08);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    filter: drop-shadow(0 8px 32px rgba(250, 204, 21, 0.8)) 
            drop-shadow(0 0 48px rgba(250, 204, 21, 0.6));
  }
  50% {
    filter: drop-shadow(0 12px 40px rgba(250, 204, 21, 1)) 
            drop-shadow(0 0 64px rgba(250, 204, 21, 0.8));
  }
}

.hero-title {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-left: 100px;
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  min-width: 100px;
}

.stat-value {

  font-weight: 700;
  color: var(--primary-light);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================
   SECTION HEADERS
   ========================================== */
.section-header {
  margin: 48px 0 24px;
  position: relative;
}

.section-header h2 {
  display: inline-block;
  font-size: 1.5rem;
  color: var(--text-primary);
  padding-bottom: 8px;
  position: relative;
}

.section-line {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 2px;
  margin-top: 8px;
}

/* ==========================================
   TILES - MAIN MODULES (3 columns)
   ========================================== */
.tiles-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* ==========================================
    TILES - ADMIN MODULES (4 columns)
    ========================================== */
.tiles-admin {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* ==========================================
     MODULE TILES
     ========================================== */
.module-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.module-tile.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.4);
}

/* ==========================================
     MANAGEMENT SECTIONS
     ========================================== */
.tiles-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  justify-items: center;
}

/* Uniform tile sizing */
.module-tile {
  display: flex;
  flex-direction: column;
  height: 200px;
}

.module-tile .tile-icon {
  margin-bottom: 16px;
}

.module-tile .tile-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module-tile .tile-content h3 {
  margin-bottom: 8px;
}

.module-tile .tile-content p {
  flex: 1;
  overflow: hidden;
}

/* ==========================================
     BACK TO MENU BUTTON
     ========================================== */
.back-to-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  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;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin: 20px 0;
}

.back-to-menu-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);
}

/* ================================
   MANAGEMENT MENU â€“ CENTERED LAYOUT
   ================================ */

/* GĹ‚Ăłwny kontener menu zarzÄ…dzania */
.module-tiles {
  max-width: 1680px;
  margin: 0 auto;
  padding: 32px 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

/* Kontener sekcji (naglowek + kafelki) */
.module-tiles .section-container {
  max-width: none;
  margin: 0;
  min-width: 0;
}

/* Naglowki sekcji (Kadry / Finanse / Kontrola / System / Marketplace) */
.module-tiles .section-header {
  margin: 0 0 16px;
}

/* Siatka kafelkow w sekcji */
.module-tiles .tiles-admin {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
}

/* Wymuszenie symetrii kafelkow */
.module-tiles .module-tile {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

@media (max-width: 1500px) {
  .module-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .module-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .module-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  .module-tiles {
    grid-template-columns: 1fr;
    padding: 24px 12px;
  }

  .module-tiles .tiles-admin {
    gap: 16px;
  }
}
/* ==========================================
   TILE STYLES
   ========================================== */
.tile {
  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: 28px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(59, 130, 246, 0.15);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.tile:hover::before {
  transform: scaleX(1);
}

.tile: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);
}

/* Primary Tiles (Operational) */
.tile-primary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 24px;
}

.tile-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
}

.tile-content h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tile-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tile-arrow {
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform var(--transition-base);
}

.tile:hover .tile-arrow {
  transform: translateX(6px);
}

/* Secondary Tiles (Admin) */
.tile-secondary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.tile-icon-small {
  font-size: 2.2rem;
  line-height: 1;
}

.tile-secondary .tile-content h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.tile-secondary .tile-content p {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* Special Admin Tile */
.tile-admin {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.05);
}

.tile-admin:hover {
  border-color: var(--danger);
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.25);
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--info);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(220, 38, 38, 0.15);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer-info {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  text-align: center;
}

.footer-info p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.footer-info strong {
  color: var(--primary);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet (768px - 1200px) */
@media (max-width: 1200px) {
  .container {
    padding: 32px 24px;
  }
  
  .hero-section {
    padding: 36px 28px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-logo {
    height: 60px;
  }
  
  .hero-subtitle {
    margin-left: 80px;
    font-size: 1rem;
  }
  
  .tiles-main {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Admin grid: 4 columns â†’ 2x2 */
  .tiles-admin {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .topbar-logo .logo-small {
    height: 32px;
  }
  .user-info {
    font-size: 0.85rem;
  }
  
  .logout-btn {
    padding: 6px 16px;
    font-size: 0.85rem;
  }
  
  .container {
    padding: 24px 16px;
  }
  
  .hero-section {
    padding: 28px 20px;
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content h1 {
    flex-direction: column;
    gap: 16px;
  }
  
  .hero-logo {
    height: 50px;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    margin-left: 0;
    font-size: 0.95rem;
  }
  
  .hero-stats {
    width: 100%;
    justify-content: center;
  }
  
  .section-header h2 {
    font-size: 1.25rem;
  }
  
  /* Main tiles: 3 columns â†’ 1 column */
  .tiles-main {
    grid-template-columns: 1fr;
  }
  
  /* Admin tiles: 4 columns â†’ 1 column */
  .tiles-admin {
    grid-template-columns: 1fr;
  }
  
  .tile-primary {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  
  .tile-arrow {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  
  .tile-content {
    grid-column: 1 / -1;
  }
  
  .login-card {
    padding: 36px 28px;
    margin: 0 20px;
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
  .hero-logo {
    height: 40px;
  }
  
  .hero-title {
    font-size: 1.25rem;
  }
  
  .stat-item {
    padding: 12px 16px;
    min-width: 80px;
  }
  

  
  .stat-label {
    font-size: 0.75rem;
  }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
.tile:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================
   SUPER-ADMIN SPECIFIC STYLES
   ========================================== */

/* 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);
}

/* Session Card */
.session-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.session-card h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.session-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.session-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-item .label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.session-item .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timer-big {
  font-size: 2rem !important;
  color: var(--primary-light) !important;
  font-variant-numeric: tabular-nums;
}

.session-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-extend,
.btn-change-password,
.btn-logout-admin {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-extend {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-extend:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-change-password {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.btn-change-password:hover {
  background: rgba(245, 158, 11, 0.2);
}

.btn-logout-admin {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-logout-admin:hover {
  background: rgba(220, 38, 38, 0.2);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 16px;
  overflow-x: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-btn.active {
  color: white;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.tab-content {
  min-height: 400px;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  border-color: rgba(16, 185, 129, 0.5);
}

/* Info Box */
.info-box {
  background: rgba(59, 130, 246, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Employees Grid */

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.9rem;
}

.detail-row .label {
  color: var(--text-tertiary);
}

.detail-row .value {
  color: var(--text-primary);
  font-weight: 600;
}

.status-active {
  color: var(--success) !important;
}

.status-inactive {
  color: var(--danger) !important;
}

.btn-edit,
.btn-delete {
  flex: 1;
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-edit {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-edit:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.25) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-delete {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.15) 100%);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-delete:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.25) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: var(--dark);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  justify-content: flex-end;
}

.btn-cancel,
.btn-save {
  padding: 12px 24px;
  border-radius: 12px;
  border: 2px solid;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-cancel {
  background: rgba(71, 85, 105, 0.4);
  color: var(--text-secondary);
  border-color: rgba(100, 116, 139, 0.4);
}

.btn-cancel:hover {
  background: rgba(71, 85, 105, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  border-color: rgba(16, 185, 129, 0.6);
}

/* Settings → moved to css/settings.css */

/* Logs → moved to css/logs.css */

/* Admin Badge Active (in 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 var(--primary);
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  align-items: start; /* Allow cards to have different heights */
}

/* Responsive */
@media (max-width: 768px) {
  .employees-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .session-info {
    grid-template-columns: 1fr;
  }
  
  .session-actions {
    flex-direction: column;
  }
  
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

/* ================= PAYROLL ================= */

.form-card {
  background: var(--dark-card);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.form-card h3 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

.form-card label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-card select,
.form-card input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(31, 41, 55, 0.8);
  color: var(--text-primary);
  font-size: 1rem;
}

/* Finance Config Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(31, 41, 55, 0.8);
  color: var(--text-primary);
  font-size: 1rem;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.config-info {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  text-align: center;
}

.config-info small {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.payroll-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.payroll-card {
  background: var(--dark-card);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 20px;
  transition: all var(--transition-fast);
}

.payroll-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.payroll-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.payroll-header h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.payroll-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success);
}

.payroll-details {
  margin-bottom: 16px;
}

.payroll-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--text-secondary);
}

.payroll-row strong {
  color: var(--text-primary);
}

.payroll-row.saturdays {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  color: var(--primary-light);
}

.saturday-list {
  margin: 8px 0;
  padding: 12px;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
}

.saturday-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.saturday-item .badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.saturday-item.auto .badge {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.saturday-item.manual .badge {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.payroll-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.9rem;
}

/* Alert boxes */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--primary-light);
}

.alert-closed {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

.payroll-card.has-adjustment {
  border-color: var(--warning);
}

.adjustment-row input {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
  border-radius: 6px;
}

/* ================= SUB-TABS ================= */

.sub-tabs {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
  padding: 16px;
  background: rgba(31, 41, 55, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  width: fit-content;
}

.sub-tab {
  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;
}

.sub-tab:hover {
  background: #4b5563;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sub-tab.active {
  color: white;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.sub-tab.active:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ================= PERIOD WRAPPER ================= */

/* ================= WEEKS CONTAINER ================= */

.weeks-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin: 24px 0;
  justify-content: center;
}

.week-card-payroll {
  background: var(--dark-card);
  border: 2px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 24px;
  width: 375px;
  min-height: 400px;
  transition: all var(--transition-fast);
}

.week-card-payroll:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.week-card-payroll.week-open {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.1));
}

.week-card-payroll.week-open .week-status {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}

.week-card-payroll.week-closed {
  border-color: var(--success);
}

.week-card-payroll.week-closed .week-status {
  color: var(--success);
  background: rgba(34, 197, 94, 0.2);
}

.week-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.week-card-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.week-status {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.week-card-body {
  display: grid;
  gap: 12px;
}

.week-card-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--text-secondary);
}

.week-card-row strong {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.week-card-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid rgba(59, 130, 246, 0.2);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.week-card-total span:first-child {
  color: var(--text-secondary);
  font-size: 1rem;
}

.week-card-total span:last-child {
  color: var(--success);
  font-size: 1.3rem;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .weeks-cards {
    grid-template-columns: 1fr;
  }
  
  .period-info {
    min-width: 250px;
  }
}

/* ================= CONFIG CARD ================= */

.config-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1));
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.config-card h3 {
  margin: 0 0 16px 0;
  color: var(--primary-light);
  font-size: 1.1rem;
}

.config-card.locked {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.1));
  border-color: rgba(34, 197, 94, 0.3);
}

.config-card.locked h3 {
  color: var(--success);
}

.config-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.config-form label {
  font-weight: 600;
  color: var(--text-secondary);
}

.config-form select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: var(--dark-card);
  color: var(--text-primary);
  font-size: 1rem;
  min-width: 200px;
}

.config-locked-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.config-locked-info .info {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.config-locked-info .info strong {
  color: var(--text-primary);
  font-size: 1.1rem;
}

/* ================= PAYROLL HISTORY ================= */

.payroll-history-item {
  background: var(--dark-card);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.payroll-history-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.history-header h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.history-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.history-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success);
}

.history-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 12px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
}

/* ===============================================
   NOWE STYLE DLA MODUĹU WYPĹAT - KARTY PRACOWNIKĂ“W
   =============================================== */

/* Siatka kart pracownikĂłw w wypĹ‚atach */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(375px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

/* Karta pracownika w rozliczeniu */
.payroll-employee-card {
  position: relative;
}

/* Kompaktowa lista sobĂłt */
.saturday-list-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  background: var(--dark-card);
  border-radius: 6px;
}

/* Badge dla sobĂłt */
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-info {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Detail rows w kartach - juĹĽ istnieje, ale upewniamy siÄ™ */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  gap: 12px;
}

.detail-row .label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.detail-row .value {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* Responsive - na mniejszych ekranach 1 kolumna */
@media (max-width: 768px) {
  .employees-grid {
    grid-template-columns: 1fr;
  }
}

/* Hover effects dla inputĂłw */
input[type="number"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Checkbox styling */
input[type="checkbox"] {
  accent-color: var(--primary);
}

/* Button hover effects */
button:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-2px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

/* Disabled button state */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================
   COSTS MONTHLY (Analityczne koszty miesiÄ™czne)
   ========================================== */

.cost-category {
  background: #111827;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #374151;
  transition: all 0.2s;
  position: relative;
}

.cost-category.clickable {
  cursor: pointer;
}

.cost-category.clickable:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.cost-category:hover {
  border-color: #3b82f6;
}

.cost-category label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #f3f4f6;
  font-size: 0.9rem;
}

.cost-category input {
  width: 100%;
  padding: 10px;
  background: #0b0e11;
  border: 1px solid #374151;
  border-radius: 6px;
  color: #f3f4f6;
  font-size: 1.1rem;
  font-weight: 600;
}

.cost-category input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Nowe style dla wyĹ›wietlanej wartoĹ›ci */
.cost-value-display {
  width: 100%;
  padding: 10px;
  background: #0b0e11;
  border: 1px solid #374151;
  border-radius: 6px;
  color: #3b82f6;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.cost-details-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

.cost-category.clickable:hover .cost-details-btn {
  opacity: 1;
}

.cost-hint {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.3;
}

/* ==========================================
    COMMON FORM ELEMENTS STYLE - LIGHT BACKGROUND
    ========================================== */

input[type="text"],
input[type="date"],
input[type="number"],
textarea,
select {
  background: var(--light) !important;
  color: var(--dark) !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Ensure native form controls render in light mode */
.form-group input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}

.form-group select {
  color-scheme: light;
}
/* ==========================================
   DATE INPUT - HIDE CALENDAR ICON BUT KEEP CLICKABLE
   ========================================== */
input[type="date"] {
  position: relative;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ==========================================
   HISTORY PERIOD WRAPPER
   ========================================== */
.history-period-wrapper {
  background: rgba(30, 41, 59, 0.4);
  border: 2px solid rgba(100, 116, 139, 0.3);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.history-period-wrapper > .week-card-payroll {
  margin: 0;
  width: 100%;
  min-height: auto;
  height: 100%;
}

@media (max-width: 1080px) {
  .history-period-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
/* btn-primary */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 2px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  border-color: rgba(16, 185, 129, 0.6);
}

/* ==========================================
    GLOBAL CLOCK SYSTEM
    ========================================== */

.digital-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  opacity: 0.85;
}

#clockTime {
  font-size: 18px;
  font-weight: bold;
}

#clockWeek,
#clockDate {
  font-size: 11px;
}

/* ===== SYSTEM CLOCK (1:1 jak DASH) ===== */



.digital-clock {
  display: flex;
  gap: 14px;
  align-items: center;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

#clockTime {
  font-size: 1.2rem;
}

#clockWeek,
#clockDate {
  opacity: 0.85;
}

/* ==========================================
   MODUĹ ANALIZATOR
   ========================================== */

.analyzer-upload-card {
  background: linear-gradient(135deg, rgba(31,41,55,0.95) 0%, rgba(17,24,39,0.98) 100%);
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin-bottom: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(59, 130, 246, 0.15);
  position: relative;
  overflow: hidden;
}

.analyzer-upload-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);
}

.analyzer-upload-card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-4px);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(59, 130, 246, 0.25);
}

.analyzer-upload-card h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.analyzer-upload-card input[type="file"] {
  display: none;
}

.upload-label {
  display: inline-block;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.upload-label:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.analyzer-summary-card {
  background: var(--dark-card);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.analyzer-summary-card h3 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.summary-item.summary-total {
  grid-column: 1 / -1;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  font-weight: 700;
}

.summary-item .label {
  color: var(--text-secondary);
}

.summary-item .value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.analyzer-report-card {
  background: var(--dark-card);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.analyzer-report-card h3 {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.report-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.report-section:last-child {
  border-bottom: none;
}

.report-section h4 {
  margin-bottom: 16px;
  color: var(--primary-light);
  font-size: 1.1rem;
}

.report-item {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
}

.report-item p {
  margin: 4px 0;
  color: var(--text-secondary);
}

.report-item strong {
  color: var(--text-primary);
}

.report-ids {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* ==========================================
   MODUĹ ADS ANALYZER
   ========================================== */

/* Sub-tabs secondary (dla trybĂłw ADS) */
.sub-tabs-secondary {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 20px auto;
  padding: 16px;
  background: rgba(31, 41, 55, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  width: fit-content;
  max-width: 1200px;
}

  .sub-tabs-secondary {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}


/* Integrations → moved to css/integrations.css */

/* ==========================================
   BILLING SUMMARY - PREMIUM EXTENSION
   Append to admin/css/style.css
   ========================================== */

/* === 1. KARTA PODSUMOWANIA - EXECUTIVE DASHBOARD === */

.analyzer-summary-card {
  /* Overrides existing */
  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;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(59, 130, 246, 0.08);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay */
.analyzer-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.5),
    transparent
  );
}

.analyzer-summary-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* === 2. HERO SECTION - SUMA OPĹAT === */

.summary-hero {
  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;
  padding: 24px 28px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.summary-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.15) 0%,
    transparent 70%
  );
  pointer-events: 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;
}

/* === 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);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* === 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: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  flex: 1;
}

/* Kwota - zawsze wyrĂłwnana do prawej */
.summary-row > span:last-child {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 120px;
  padding-left: 16px;
  white-space: nowrap;
}

/* === 5. KOLORYSTYKA KWOT === */

/* Struktura opĹ‚at - wszystkie kwoty czerwone (koszty) */
.summary-section:not(.uznania) .summary-row > span:last-child {
  color: var(--danger);
  font-weight: 600;
}

/* Sekcja UZNANIA - wszystkie kwoty zielone */
.summary-section.uznania .summary-row > span:last-child {
  color: var(--success);
  font-weight: 700;
}

/* 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: '\2713';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

/* === 7. ACCORDION - ROZWIJANE UZNANIA === */
/* Pracuje z obecnÄ… strukturÄ… HTML (onclick inline) */

/* Ikona accordion - ID z JS */
#rebates-icon {
  display: inline-block;
  margin-right: 8px;
  transition: transform var(--transition-fast);
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 700;
  width: 16px;
  text-align: center;
}

/* Wiersz z rozwijanym contentem */
.summary-row:has(#rebates-icon) {
  cursor: pointer;
  user-select: none;
}

.summary-row:has(#rebates-icon):hover {
  background: rgba(16, 185, 129, 0.08);
}

/* Rozwijana zawartoĹ›Ä‡ - ID z JS */
#rebates-details {
  /* Nadpisanie inline styles przez transition */
  padding-left: 40px !important;
  font-size: 0.875rem !important;
  color: var(--text-tertiary) !important;
  margin-top: 8px;
  opacity: 1;
  transition: 
    opacity var(--transition-base),
    margin-top var(--transition-base);
}

/* Stan zwiniÄ™ty (display: none ustawiane przez JS) */
#rebates-details[style*="display: none"] {
  opacity: 0;
  margin-top: 0;
}

/* SzczegĂłĹ‚owe wiersze wewnÄ…trz accordion */
#rebates-details > div {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 8px;
  border-left: 2px solid rgba(16, 185, 129, 0.3);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background var(--transition-fast);
}

#rebates-details > div:hover {
  background: rgba(16, 185, 129, 0.1);
}

#rebates-details > div:last-child {
  margin-bottom: 0;
}

/* Kwoty w szczegĂłĹ‚ach */
#rebates-details > div::after {
  content: attr(data-amount);
  font-variant-numeric: tabular-nums;
  color: var(--success);
  font-weight: 600;
  margin-left: auto;
  padding-left: 16px;
}

/* === 8. MICRO-DETAILS & UX === */

/* Hover tylko na nazwie, kwota stabilna */
.summary-row:hover > span:first-child {
  color: var(--text-primary);
  transform: translateX(2px);
  transition: all var(--transition-fast);
}

.summary-row:hover > span:last-child {
  /* Kwota nie zmienia pozycji */
  transform: none;
}

/* Separator wizualny miÄ™dzy sekcjami */
.summary-section + .summary-section {
  position: relative;
}

.summary-section + .summary-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.2),
    transparent
  );
}

/* === 9. RESPONSYWNOĹšÄ† === */

@media (max-width: 768px) {
  .analyzer-summary-card {
    padding: 24px 20px;
  }

  .summary-hero {
    padding: 20px;
  }

  .hero-amount {
    font-size: 1.75rem !important;
  }

  .summary-row > span:last-child {
    min-width: 100px;
    font-size: 0.95rem;
  }

  .summary-section.uznania {
    padding: 16px;
  }
}

/* === 10. ACCESSIBILITY === */

.summary-row:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

.accordion-icon {
  transition: transform var(--transition-fast);
}

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .summary-row,
  .accordion-content,
  .accordion-icon {
    transition: none;
  }
}

/* === 11. PRINT STYLES === */

@media print {
  .analyzer-summary-card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .accordion-content {
    max-height: none !important;
    opacity: 1 !important;
  }
}
/* ==========================================
   BILLING REPORT - PREMIUM EXTENSION
   Append to admin/css/style.css
   ========================================== */

/* === 1. KARTA RAPORTU - EXECUTIVE STYLE === */

.analyzer-report-card {
  /* Override existing */
  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;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(59, 130, 246, 0.08);
  position: relative;
  overflow: hidden;
}

/* Top gradient line */
.analyzer-report-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.5),
    transparent
  );
}

.analyzer-report-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* === 2. SEKCJE RAPORTU === */

.report-section {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  position: relative;
}

.report-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Separator gradient */
.report-section::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.3),
    transparent
  );
}

.report-section:last-child::after {
  display: none;
}

.report-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Decorative bar */
.report-section h4::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.8),
    rgba(59, 130, 246, 0.3)
  );
  border-radius: 2px;
}

/* === 3. TABELE - PREMIUM FINANCE STYLE === */

.report-section table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* === 4. THEAD - GRADIENT HEADER === */

.report-section thead tr {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15) 0%,
    rgba(59, 130, 246, 0.08) 100%
  );
  border: none;
}

.report-section thead th {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  border: none;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  position: relative;
}

/* Column separators */
.report-section thead th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(59, 130, 246, 0.2);
}

/* Text alignment */
.report-section thead th:nth-child(1) { text-align: left; }
.report-section thead th:nth-child(2) { text-align: left; }
.report-section thead th:nth-child(3) { text-align: center; }
.report-section thead th:nth-child(4) { text-align: right; }

/* === 5. TBODY - DATA ROWS === */

.report-section tbody tr {
  background: rgba(31, 41, 55, 0.4);
  transition: all var(--transition-fast);
  border: none;
}

.report-section tbody tr:nth-child(even) {
  background: rgba(31, 41, 55, 0.6);
}

.report-section tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateX(4px);
  box-shadow: -4px 0 0 rgba(59, 130, 246, 0.5);
}

.report-section tbody td {
  padding: 14px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border: none;
  border-bottom: 1px solid rgba(59, 130, 246, 0.05);
  transition: color var(--transition-fast);
}

.report-section tbody tr:hover td {
  color: var(--text-primary);
}

/* Kod - monospace */
.report-section tbody td:nth-child(1) {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--primary-light);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Nazwa - primary text */
.report-section tbody td:nth-child(2) {
  color: var(--text-primary);
  font-weight: 500;
}

/* IloĹ›Ä‡ - center, tabular */
.report-section tbody td:nth-child(3) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--info);
}

/* Kwota - right, tabular, bold */
.report-section tbody td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

/* Last row no border */
.report-section tbody tr:last-child td {
  border-bottom: none;
}

/* === 6. TABELA PER OBSZAR (2 kolumny) === */

/* Obszar - wyrĂłwnanie lewo */
.report-section tbody td:only-child ~ td:first-child,
.report-section table:has(th:nth-child(2):last-child) tbody td:nth-child(1) {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

/* IloĹ›Ä‡ obszaru - center, highlight */
.report-section table:has(th:nth-child(2):last-child) tbody td:nth-child(2) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--success);
  font-size: 1.05rem;
}

/* === 7. MICRO-DETAILS === */

/* Badge dla najwyĹĽszych wartoĹ›ci */
.report-section tbody tr:nth-child(-n+3) td:nth-child(1)::before {
  content: '\2605';
  margin-right: 8px;
  color: var(--warning);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Tooltip on hover (opcjonalne) */
.report-section tbody td[title] {
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-color: rgba(59, 130, 246, 0.3);
}

/* === 8. SUMMARY ROW (jeĹ›li dodane przez JS) === */

.report-section tfoot tr {
  background: rgba(59, 130, 246, 0.15);
  border-top: 2px solid rgba(59, 130, 246, 0.4);
}

.report-section tfoot td {
  padding: 16px 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}

/* === 9. EMPTY STATE === */

.report-section table:empty::after,
.report-section tbody:empty::after {
  content: 'Brak danych do wy\015bwietlenia';
  display: block;
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
  font-style: italic;
}

/* === 10. LOADING STATE === */

.report-section.loading table {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.report-section.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === 11. RESPONSYWNOĹšÄ† === */

@media (max-width: 1024px) {
  .analyzer-report-card {
    padding: 24px 20px;
  }

  .report-section table {
    font-size: 0.875rem;
  }

  .report-section thead th,
  .report-section tbody td {
    padding: 12px 16px;
  }

  /* Ukryj kolumnÄ™ Nazwa na mobile */
  @media (max-width: 640px) {
    .report-section tbody td:nth-child(2) {
      display: none;
    }
    .report-section thead th:nth-child(2) {
      display: none;
    }
  }
}

/* === 12. SCROLL SHADOW === */

.report-section {
  position: relative;
}

.report-section table {
  overflow-x: auto;
  display: block;
}

.report-section table::-webkit-scrollbar {
  height: 8px;
}

.report-section table::-webkit-scrollbar-track {
  background: rgba(31, 41, 55, 0.5);
  border-radius: 4px;
}

.report-section table::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

.report-section table::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* === 13. PRINT STYLES === */

@media print {
  .analyzer-report-card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .report-section table {
    box-shadow: none;
  }

  .report-section tbody tr:hover {
    transform: none;
    box-shadow: none;
  }

  .report-section tbody tr:nth-child(-n+3) td:nth-child(1)::before {
    content: '';
  }
}

/* === 14. ACCESSIBILITY === */

.report-section tbody tr:focus-within {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .report-section tbody tr,
  .report-section tbody td,
  .report-section.loading::before {
    transition: none;
    animation: none;
  }
}

/* === 15. DARK MODE ENHANCEMENT === */

@media (prefers-color-scheme: dark) {
  .report-section table {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }

  .report-section tbody tr:hover {
    box-shadow: -4px 0 0 rgba(59, 130, 246, 0.7);
  }
}

/* ========== MODULE NAVIGATION BAR (przycisk ZarzÄ…dzanie) ========== */
.module-nav-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  padding: 0;
}

.module-nav-bar .back-to-menu-btn {
  margin: 0;
}

/* ========== INTEGRATIONS VIEW SPECIFIC ========== */
#integrationsView .sub-tabs {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== UNIFIED MODULE LAYOUT - max-width dla spĂłjnoĹ›ci ========== */
.tab-content .sub-tabs,
.tab-content .navigation-bar {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Weeks container teĹĽ powinien byÄ‡ wyrĂłwnany */
.weeks-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Employees grid wyrĂłwnany */
.employees-grid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  gap: 12px;
}

/* Costs view content - wszystkie gĹ‚Ăłwne elementy */
#costsView > div:not(.navigation-bar) {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Payroll hero container */
#payrollHeroContainer {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Payroll results */
#payrollResults {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Profitability views */
#profitabilityBusinessView > div,
#profitabilityOfferView > div {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Analyzer views */
#analyzerInPostView > div:not(.sub-tabs-secondary),
#analyzerDPDView > div,
#analyzerAdsView > div:not(.sub-tabs-secondary),
#analyzerBillingView > div {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Audit view */
#auditView > div {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== ICON SIZE NORMALIZATION ========== */
/* WyrĂłwnanie wielkoĹ›ci emoji w sub-tabs i sub-tabs-secondary */
.sub-tab,
.sub-tab-secondary {
  font-size: 0.95rem;
}

/* Emoji powinny byÄ‡ tej samej wielkoĹ›ci */
.sub-tab::first-letter,
.sub-tab-secondary::first-letter {
  font-size: 1.1em;
}

/* ========== COSTS WARNING BOX ========== */
.costs-warning-box {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  color: #000000;
  border: 2px solid #fbbf24;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  flex: 1;
}


/* ========== COSTS VIEW - WYĹšRODKOWANIE ELEMENTĂ“W ========== */
#costsView .navigation-bar {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#costsView .costs-warning-box {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Rozbicie analityczne teĹĽ musi byÄ‡ wyĹ›rodkowane */
#costsView > div[style*="background: #1f2937"] {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================
   COST SUBCATEGORIES MODAL
   ========================================== */

.subcategories-modal-content {
  max-width: 600px;
  margin: 0 auto;
  white-space: normal;
}

.subcategories-list {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subcategory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid #374151;
  border-radius: 8px;
  transition: all 0.2s;
}

.subcategory-item:hover {
  border-color: #3b82f6;
  background: rgba(17, 24, 39, 0.8);
}

.subcategory-item-title {
  flex: 1;
  color: #f3f4f6;
  font-weight: 600;
  font-size: 0.95rem;
}

.subcategory-item-amount {
  color: #3b82f6;
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 12px;
}

.subcategory-item-actions {
  display: flex;
  gap: 8px;
}

.subcategory-item-actions button {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.subcategory-item-actions button:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.subcategory-total {
  padding: 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  text-align: right;
  margin: 20px 0;
  color: #f3f4f6;
  font-size: 1rem;
}

.subcategory-total strong {
  color: #3b82f6;
  font-size: 1.3rem;
  margin-left: 8px;
}

.add-subcategory-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.add-subcategory-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.subcategory-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.subcategory-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subcategory-form-group label {
  color: #f3f4f6;
  font-weight: 600;
  font-size: 0.9rem;
}

.subcategory-form-group input {
  width: 100%;
  padding: 12px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #f3f4f6;
  font-size: 1rem;
}

.subcategory-form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.subcategory-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.subcategory-empty-state {
  text-align: center;
  padding: 12px;
  color: #6b7280;
}

.subcategory-empty-state-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.subcategory-empty-state-text {
  font-size: 0.95rem;
  line-height: 1.6;
}


/* ============================================
   PREMIUM MODAL SYSTEM
   UĹĽywa istniejÄ…cych .modal + .modal-content
   z dodatkowymi wariantami dla confirm/alert
   ============================================ */

/* Warianty kolorystyczne dla modal-content */
.modal-content.premium-info {
  border-color: rgba(6, 182, 212, 0.4);
}

.modal-content.premium-success {
  border-color: rgba(16, 185, 129, 0.4);
}

.modal-content.premium-warning {
  border-color: rgba(245, 158, 11, 0.5);
}

.modal-content.premium-danger {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 20px 60px rgba(239, 68, 68, 0.2);
}

/* Premium modal header z ikonÄ… */
.premium-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 24px 24px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  gap: 16px;
}

.premium-modal-icon {
  font-size: 3rem;
  line-height: 1;
}

.premium-modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-align: center;
}

/* Premium modal content */
.premium-modal-content {
  padding: 24px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
  white-space: pre-line; /* Zachowaj \n jako nowe linie */
}

/* Premium modal footer - uĹĽywa istniejÄ…cych .modal-footer */
.modal-footer.premium-modal-footer {
  justify-content: center;
  gap: 16px;
}

/* Premium buttons - rozszerzenie istniejÄ…cych */
.btn-premium-confirm {
  padding: 12px 32px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-premium-confirm.info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
}

.btn-premium-confirm.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-premium-confirm.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-premium-confirm.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn-premium-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  filter: brightness(1.1);
}

.btn-premium-cancel {
  padding: 12px 32px;
  border-radius: 12px;
  background: rgba(75, 85, 99, 0.3);
  border: 1px solid rgba(156, 163, 175, 0.3);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-cancel:hover {
  background: rgba(75, 85, 99, 0.5);
  transform: translateY(-2px);
  border-color: rgba(156, 163, 175, 0.5);
}

/* Animacje - rozszerzenie istniejÄ…cych */
.modal.premium-fade-in {
  animation: premiumFadeIn 200ms ease-out;
}

.modal.premium-fade-out {
  animation: premiumFadeOut 200ms ease-out;
}

.modal-content.premium-slide-in {
  animation: premiumSlideIn 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes premiumFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes premiumFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes premiumSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .premium-modal-header {
    padding: 24px 16px 16px 16px;
  }
  
  .premium-modal-content {
    padding: 16px;
    font-size: 0.95rem;
  }
  
  .premium-modal-icon {
    font-size: 2.5rem;
  }
  
  .btn-premium-confirm,
  .btn-premium-cancel {
    padding: 10px 24px;
    font-size: 0.95rem;
  }
}

/* ENTERPRISE PATCH â€” HARD EDGES */
*,
*::before,
*::after {
  border-radius: 0 !important;
}

/* ==========================================
   ADMIN DASHBOARD — ENTERPRISE CARD LAYOUT
   ========================================== */

.admin-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-section {
  margin-bottom: 36px;
}

.admin-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary, #64748b);
  margin-bottom: 12px;
  padding-left: 2px;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

/* === BASE CARD === */
.admin-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px;
  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: 0 !important;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 10px rgba(59,130,246,0.06);
}

/* Top highlight line — matches tree-dashboard pattern */
.admin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.35), transparent);
  transition: opacity 0.25s ease;
}

/* === CATEGORY BORDER COLORS === */
.admin-card--blue   { border-color: rgba(59,  130, 246, 0.35); }
.admin-card--green  { border-color: rgba(34,  197,  94, 0.35); }
.admin-card--violet { border-color: rgba(139,  92, 246, 0.35); }
.admin-card--amber  { border-color: rgba(245, 158,  11, 0.35); }
.admin-card--red    { border-color: rgba(239,  68,  68, 0.35); }
.admin-card--cyan   { border-color: rgba(  6, 182, 212, 0.35); }

/* === HOVER === */
.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px rgba(59,130,246,0.12);
}

.admin-card--blue:hover   { border-color: rgba(59,  130, 246, 0.7); box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px rgba(59, 130,246,0.18); }
.admin-card--green:hover  { border-color: rgba(34,  197,  94, 0.7); box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px rgba(34, 197, 94,0.15); }
.admin-card--violet:hover { border-color: rgba(139,  92, 246, 0.7); box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px rgba(139, 92,246,0.15); }
.admin-card--amber:hover  { border-color: rgba(245, 158,  11, 0.7); box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px rgba(245,158, 11,0.15); }
.admin-card--red:hover    { border-color: rgba(239,  68,  68, 0.7); box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px rgba(239, 68, 68,0.15); }
.admin-card--cyan:hover   { border-color: rgba(  6, 182, 212, 0.7); box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px rgba(  6,182,212,0.15); }

/* === ICON === */
.admin-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-card-icon svg {
  width: 24px;
  height: 24px;
}

.admin-card--blue   .admin-card-icon { color: #3b82f6; }
.admin-card--green  .admin-card-icon { color: #22c55e; }
.admin-card--violet .admin-card-icon { color: #8b5cf6; }
.admin-card--amber  .admin-card-icon { color: #f59e0b; }
.admin-card--red    .admin-card-icon { color: #ef4444; }
.admin-card--cyan   .admin-card-icon { color: #06b6d4; }

/* === BODY === */
.admin-card-body {
  flex: 1;
  min-width: 0;
}

.admin-card-title {
  font-size: 0.925rem;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-desc {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === ARROW === */
.admin-card-arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: #4b5563;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.25s ease, color 0.25s ease;
}

.admin-card:hover .admin-card-arrow {
  transform: translateX(4px);
  color: #9ca3af;
}

@media (max-width: 640px) {
  .admin-dashboard { padding: 20px 16px; }
  .admin-cards { grid-template-columns: 1fr; }
}

/* ==========================================
   ADMIN MENU DARK SHELL REFACTOR
   Scoped to admin index shell only
   ========================================== */

body.admin-shell-page {
  color-scheme: dark;
  background: #181818;
  color: #e5e7eb;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

html {
  overflow-y: auto;
}

body.admin-shell-page::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

body.admin-shell-page::-webkit-scrollbar-track {
  background: transparent;
}

body.admin-shell-page::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
}

body.admin-shell-page::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

body.admin-shell-page .topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  padding: 0 24px;
  background: rgba(32, 32, 32, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

body.admin-shell-page .topbar-left,
body.admin-shell-page .topbar-right {
  gap: 10px;
}

body.admin-shell-page .topbar-center {
  display: none;
}

body.admin-shell-page .topbar-title {
  gap: 12px;
}

body.admin-shell-page .topbar-title .ui-icon {
  width: 22px;
  height: 22px;
  color: #9ca3af;
}

body.admin-shell-page .topbar-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.admin-shell-page .topbar-text {
  display: block;
  color: #f3f4f6;
  font-size: 1rem;
  line-height: 1.1;
}

body.admin-shell-page .topbar-context {
  color: #6b7280;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.admin-shell-page .topbar-action {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.02);
  color: #9ca3af;
}

body.admin-shell-page .topbar-action:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.1);
}

body.admin-shell-page .topbar-action:focus-visible,
body.admin-shell-page .admin-card:focus-visible {
  outline: none;
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16), 0 14px 36px rgba(0, 0, 0, 0.22);
}

body.admin-shell-page #managementView {
  position: relative;
  min-height: calc(100vh - 60px);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.05), transparent 24%),
    #181818;
}

body.admin-shell-page .admin-menu-shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 32px 24px 52px;
}

body.admin-shell-page .admin-menu-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, auto);
  gap: 24px;
  align-items: end;
  margin-bottom: 30px;
  padding: 28px 30px;
  background: linear-gradient(180deg, rgba(31, 31, 31, 0.98) 0%, rgba(27, 27, 27, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

body.admin-shell-page .admin-menu-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.45), transparent);
}

body.admin-shell-page .admin-menu-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 36%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.08), transparent 32%);
  pointer-events: none;
}

body.admin-shell-page .admin-menu-hero-copy,
body.admin-shell-page .admin-menu-stats {
  position: relative;
  z-index: 1;
}

body.admin-shell-page .admin-menu-eyebrow {
  margin: 0 0 10px;
  color: #74819a;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.admin-shell-page .admin-menu-title {
  margin: 0;
  font-size: clamp(1.85rem, 2vw, 2.35rem);
  letter-spacing: -0.03em;
  color: #f9fafb;
}

body.admin-shell-page .admin-menu-subtitle {
  max-width: 66ch;
  margin: 10px 0 0;
  color: #9ca3af;
  font-size: 0.96rem;
  line-height: 1.7;
}

body.admin-shell-page .admin-menu-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 12px;
}

body.admin-shell-page .admin-menu-stat {
  min-width: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.admin-shell-page .admin-menu-stat-label {
  display: block;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.admin-shell-page .admin-menu-stat-value {
  display: block;
  margin-top: 8px;
  color: #f3f4f6;
  font-size: 1.35rem;
  line-height: 1;
}

body.admin-shell-page .admin-dashboard {
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 30px;
}

body.admin-shell-page .admin-section {
  margin: 0;
}

body.admin-shell-page .admin-section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

body.admin-shell-page .admin-section-label {
  margin: 0;
  padding: 0;
  color: #74819a;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.admin-shell-page .admin-section-desc {
  margin: 0;
  color: #6b7280;
  font-size: 0.92rem;
}

body.admin-shell-page .admin-cards {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

body.admin-shell-page .admin-card {
  --admin-card-accent: #3b82f6;
  --admin-card-border: rgba(59, 130, 246, 0.34);
  --admin-card-glow: rgba(59, 130, 246, 0.12);
  min-height: 106px;
  padding: 22px 24px;
  gap: 18px;
  background: linear-gradient(180deg, rgba(31, 31, 31, 0.98) 0%, rgba(26, 26, 26, 0.98) 100%);
  border: 1px solid var(--admin-card-border);
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

body.admin-shell-page .admin-card::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--admin-card-border), transparent);
}

body.admin-shell-page .admin-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, var(--admin-card-glow), transparent 44%);
  pointer-events: none;
}

body.admin-shell-page .admin-card:hover {
  transform: translateY(-3px);
  border-color: var(--admin-card-accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

body.admin-shell-page .admin-card--blue {
  --admin-card-accent: #3b82f6;
  --admin-card-border: rgba(59, 130, 246, 0.42);
  --admin-card-glow: rgba(59, 130, 246, 0.13);
}

body.admin-shell-page .admin-card--green {
  --admin-card-accent: #10b981;
  --admin-card-border: rgba(16, 185, 129, 0.42);
  --admin-card-glow: rgba(16, 185, 129, 0.12);
}

body.admin-shell-page .admin-card--violet {
  --admin-card-accent: #8b5cf6;
  --admin-card-border: rgba(139, 92, 246, 0.4);
  --admin-card-glow: rgba(139, 92, 246, 0.11);
}

body.admin-shell-page .admin-card--amber {
  --admin-card-accent: #d4a72c;
  --admin-card-border: rgba(212, 167, 44, 0.4);
  --admin-card-glow: rgba(212, 167, 44, 0.11);
}

body.admin-shell-page .admin-card--red {
  --admin-card-accent: #ef4444;
  --admin-card-border: rgba(239, 68, 68, 0.36);
  --admin-card-glow: rgba(239, 68, 68, 0.1);
}

body.admin-shell-page .admin-card--cyan {
  --admin-card-accent: #06b6d4;
  --admin-card-border: rgba(6, 182, 212, 0.38);
  --admin-card-glow: rgba(6, 182, 212, 0.1);
}

body.admin-shell-page .admin-card-icon {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--admin-card-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.admin-shell-page .admin-card-icon svg {
  width: 24px;
  height: 24px;
}

body.admin-shell-page .admin-card-title {
  color: #f3f4f6;
  font-size: 1rem;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

body.admin-shell-page .admin-card-desc {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

body.admin-shell-page .admin-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.03);
  color: #6b7280;
  font-size: 1.15rem;
}

body.admin-shell-page .admin-card:hover .admin-card-arrow {
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1080px) {
  body.admin-shell-page .admin-menu-hero {
    grid-template-columns: 1fr;
  }

  body.admin-shell-page .admin-menu-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.admin-shell-page .topbar {
    height: 56px;
    padding: 0 14px;
  }

  body.admin-shell-page .topbar-context {
    display: none;
  }

  body.admin-shell-page #managementView {
    min-height: calc(100vh - 56px);
  }

  body.admin-shell-page .admin-menu-shell {
    padding: 22px 16px 36px;
  }

  body.admin-shell-page .admin-menu-hero {
    padding: 22px 20px;
    gap: 18px;
    margin-bottom: 24px;
  }

  body.admin-shell-page .admin-menu-title {
    font-size: 1.6rem;
  }

  body.admin-shell-page .admin-menu-subtitle,
  body.admin-shell-page .admin-section-desc {
    font-size: 0.88rem;
  }

  body.admin-shell-page .admin-menu-stats {
    grid-template-columns: 1fr;
  }

  body.admin-shell-page .admin-cards {
    grid-template-columns: 1fr;
  }

  body.admin-shell-page .admin-card {
    padding: 20px 18px;
    gap: 14px;
  }
}

/* ==========================================
   ADMIN MENU CONTRACT ALIGNMENT
   Literal override to match dark-theme-contract
   ========================================== */

body.admin-shell-page {
  --bg: #181818;
  --card-bg: #1e1e1e;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.10);
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --radius: 0px;
}

body.admin-shell-page .topbar {
  height: 56px;
  padding: 0 20px;
  background: #202020;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: none;
}

body.admin-shell-page .topbar-title {
  gap: 8px;
  font-weight: 600;
  font-size: 1.075rem;
  color: var(--text-primary);
}

body.admin-shell-page .topbar-text {
  color: var(--text-primary);
  font-size: inherit;
  line-height: 1;
}

body.admin-shell-page .topbar-action {
  gap: 6px;
  padding: 6px 12px;
  border-radius: 0 !important;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 150ms, border-color 150ms, background 150ms;
}

body.admin-shell-page .topbar-action:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
}

body.admin-shell-page #managementView {
  min-height: calc(100vh - 56px);
  background: var(--bg);
}

body.admin-shell-page .admin-menu-shell {
  max-width: 1400px;
  padding: 84px 28px 48px;
}

body.admin-shell-page .admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

body.admin-shell-page .page-eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.admin-shell-page .page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

body.admin-shell-page .page-subtitle {
  margin: 6px 0 0;
  max-width: 720px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

body.admin-shell-page .admin-dashboard {
  gap: 28px;
}

body.admin-shell-page .admin-section-heading {
  gap: 4px;
  margin-bottom: 12px;
}

body.admin-shell-page .admin-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.admin-shell-page .admin-section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

body.admin-shell-page .admin-cards {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

body.admin-shell-page .admin-card,
body.admin-shell-page .admin-menu-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius) !important;
}

body.admin-shell-page .admin-card {
  --admin-card-icon-bg: rgba(59, 130, 246, 0.12);
  --admin-card-icon-color: #60a5fa;
  min-height: 0;
  padding: 22px;
  gap: 16px;
  box-shadow: none;
  transform: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

body.admin-shell-page .admin-card::before,
body.admin-shell-page .admin-card::after {
  content: none;
}

body.admin-shell-page .admin-card:hover {
  transform: none;
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.admin-shell-page .admin-card--blue {
  --admin-card-icon-bg: rgba(59, 130, 246, 0.12);
  --admin-card-icon-color: #60a5fa;
}

body.admin-shell-page .admin-card--green {
  --admin-card-icon-bg: rgba(250, 204, 21, 0.12);
  --admin-card-icon-color: #facc15;
}

body.admin-shell-page .admin-card--violet {
  --admin-card-icon-bg: rgba(167, 139, 250, 0.12);
  --admin-card-icon-color: #a78bfa;
}

body.admin-shell-page .admin-card--amber {
  --admin-card-icon-bg: rgba(245, 158, 11, 0.12);
  --admin-card-icon-color: #fbbf24;
}

body.admin-shell-page .admin-card--red {
  --admin-card-icon-bg: rgba(239, 68, 68, 0.12);
  --admin-card-icon-color: #f87171;
}

body.admin-shell-page .admin-card--cyan {
  --admin-card-icon-bg: rgba(251, 146, 60, 0.12);
  --admin-card-icon-color: #fb923c;
}

body.admin-shell-page .admin-card-icon {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 0 !important;
  background: var(--admin-card-icon-bg);
  color: var(--admin-card-icon-color);
  box-shadow: none;
}

body.admin-shell-page .admin-card-icon svg {
  width: 21px;
  height: 21px;
}

body.admin-shell-page .admin-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

body.admin-shell-page .admin-card-desc {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

body.admin-shell-page .admin-card-arrow {
  width: auto;
  height: auto;
  margin-left: auto;
  border: none;
  border-radius: 0 !important;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
}

body.admin-shell-page .admin-card:hover .admin-card-arrow {
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  body.admin-shell-page .admin-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.admin-shell-page .admin-menu-shell {
    padding: 76px 16px 28px;
  }

  body.admin-shell-page .admin-page-header {
    margin-bottom: 24px;
  }
}

