@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Common */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* DARK THEME (Default) */
  --bg-color: #03060b;
  --bg-dots: radial-gradient(#1e293b 1px, transparent 1px);
  --panel-bg: rgba(13, 17, 28, 0.7);
  --panel-border: rgba(255, 255, 255, 0.06);
  --panel-border-glow: rgba(99, 102, 241, 0.25);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #475569;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-secondary: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-glow: rgba(99, 102, 241, 0.3);
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.15);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --input-bg: rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(6, 9, 19, 0.8);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-color: #f8fafc;
  --bg-dots: radial-gradient(#cbd5e1 1px, transparent 1px);
  --panel-bg: #ffffff;
  --panel-border: rgba(0, 0, 0, 0.08);
  --panel-border-glow: rgba(79, 70, 229, 0.2);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-secondary: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --accent-glow: rgba(79, 70, 229, 0.15);
  --danger: #e11d48;
  --danger-bg: #fff1f2;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --input-bg: #f1f5f9;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(168, 85, 247, 0.08), transparent 40%);
  background-attachment: fixed;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.fade-in-down { animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }

/* Utils & Glassmorphism */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.glass-panel:hover {
  border-color: var(--panel-border-glow);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.05);
}

/* Typography */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
.accent-link { color: var(--accent); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.accent-link:hover { color: var(--accent-secondary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  white-space: nowrap;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-glow {
  background: var(--accent-gradient);
  border: none;
  font-weight: 600;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}
.btn-glow:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-large {
  padding: 14px 28px;
  font-size: 1rem;
}

/* Inputs */
input[type="number"],
input[type="text"],
input[type="password"],
input[type="email"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
  width: 100%;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  background: rgba(0, 0, 0, 0.5);
}
.input-group {
  position: relative;
  width: 100%;
}
.input-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
}
.input-group input {
  padding-left: 44px;
}

/* ZAAWANSOWANE FILTRY */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--input-bg);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  margin-bottom: 24px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.filter-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--accent); }
.filter-select option {
  background-color: #1e293b;
  color: #ffffff;
  padding: 8px;
}
.filter-input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid var(--panel-border) !important;
  color: var(--text-main) !important;
  padding: 8px 12px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 0.9rem !important;
  min-width: 250px;
}
.filter-input:focus { border-color: var(--accent) !important; }

.quick-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.quick-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.quick-filter-label:hover { color: var(--text-main); }
.quick-filter-label input[type="checkbox"] {
  appearance: none; width: 16px; height: 16px;
  border: 1px solid var(--text-muted); border-radius: 4px;
  background: transparent; cursor: pointer;
  position: relative; margin: 0; padding: 0 !important;
  transition: background 0.2s;
}
.quick-filter-label input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}

/* CUSTOM DROPDOWN (Masowe Akcje) */
.custom-dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px); left: 0;
  background: rgba(16, 21, 35, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  min-width: 320px;
  padding: 8px 0;
  z-index: 200;
  list-style: none;
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.custom-dropdown.active .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-item {
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.dropdown-item .material-icons-round {
  color: var(--accent); font-size: 18px;
}
.dropdown-item:hover { 
  background: rgba(255, 255, 255, 0.05); 
  color: var(--text-main);
}
.dropdown-divider {
  height: 1px; background: var(--panel-border);
  margin: 6px 0;
}

/* LOGIN LAYOUT */
.login-body {
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.login-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Abstract Orbs for Login background */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
}
.orb-1 {
  width: 400px; height: 400px;
  background: var(--accent);
  top: -100px; left: -100px;
  animation: float 10s infinite ease-in-out;
}
.orb-2 {
  width: 500px; height: 500px;
  background: var(--accent-secondary);
  bottom: -150px; right: -100px;
  animation: float 14s infinite ease-in-out reverse;
}
.orb-3 {
  width: 300px; height: 300px;
  background: #2dd4bf;
  bottom: 20%; left: 10%;
  opacity: 0.3;
  animation: float 12s infinite ease-in-out 2s;
}

.login-box {
  width: 100%;
  max-width: 440px;
  padding: 48px;
  text-align: center;
  position: relative;
  z-index: 10;
}
.login-logo {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 64px; height: 64px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.login-logo .icon-glow {
  font-size: 32px;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
}
.login-box h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.login-box p {
  color: var(--text-muted);
  margin-bottom: 32px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-footer {
  margin-top: 24px;
  font-size: 0.9rem;
}

/* DASHBOARD NAV */
.dashboard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 1px solid var(--panel-border);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: white;
  font-size: 0.9rem;
}
.user-info {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}
.user-role { font-weight: 600; color: var(--text-main); }
.user-email { color: var(--text-muted); }

/* ACCOUNT SELECTOR */
.account-selector-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px;
}
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.account-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--accent);
}
.account-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.pill-badge {
  background: rgba(0,0,0,0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  margin-left: 4px;
}

/* DASHBOARD CONTENT */
.dashboard-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}
.dashboard-content {
  padding: 32px 40px;
  flex: 1;
  width: 100%;
  max-width: 1560px; /* Nie rozciągaj w nieskończoność */
}

/* TOOLBAR V2 */
.toolbar-v2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  background: rgba(13, 17, 28, 0.4);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}
.pill-select:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
}
.pill-select option {
  background-color: #1e293b; /* Ciemne tło dla opcji (Slate-800) */
  color: #fff;               /* Biały tekst */
  padding: 10px;
}
.pill-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  outline: none;
  transition: all 0.2s;
}
.pill-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.06);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-v2 {
  position: relative;
  width: 320px;
}
.search-v2 .material-icons-round {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
}
.search-v2 input {
  padding-left: 44px;
  background: rgba(0,0,0,0.2);
  border-radius: 30px;
  font-size: 0.9rem;
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.fade-in-left { animation: fadeInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
}
.title-section h2 {
  font-size: 2rem;
  margin-bottom: 4px;
}
.title-section p.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}
.filters {
  display: flex;
  gap: 12px;
}

/* TABLE */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  padding: 1px; /* border hack for some browsers */
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}
th {
  padding: 20px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(0,0,0,0.3);
  white-space: nowrap;
}
th:first-child { border-top-left-radius: var(--radius-lg); }
th:last-child { border-top-right-radius: var(--radius-lg); }

td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  vertical-align: top;
  transition: background 0.2s;
}
.table-row:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.table-row:last-child td { border-bottom: none; }

/* RESPONSIVENESS */
@media (max-width: 1200px) {
  .dashboard-content { padding: 20px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .toolbar-group { flex-wrap: wrap; }
}

@media (max-width: 800px) {
  .top-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .header-actions { flex-wrap: wrap; width: 100%; }
  .navigation-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .nav-tabs { width: 100%; overflow-x: auto; padding-bottom: 8px; }
  
  th:nth-child(4), td:nth-child(4), /* Konkurencja */
  th:nth-child(7), td:nth-child(7)  /* Status */ {
    display: none;
  }
}

@media (max-width: 600px) {
  .dashboard-nav { padding: 12px 20px; }
  .nav-user { display: none; }
  .btn span { font-size: 14px; }
  .btn { padding: 8px 12px; font-size: 0.8rem; }
}

/* Custom Checkbox */
.custom-checkbox {
  appearance: none;
  width: 20px; height: 20px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.custom-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.custom-checkbox:checked::after {
  content: "✔";
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
}

/* Sub-components in table */
.product-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}
.product-img-wrapper {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: #1e293b;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.product-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-info h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.offer-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  color: #f5f7fb;
}

.offer-account-badge {
  background: rgba(255, 90, 0, 0.12);
  color: #ff7a1a;
  border: 1px solid rgba(255, 122, 26, 0.24);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
}

.offer-meta-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.offer-meta-pill {
  min-height: 58px;
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.offer-meta-label {
  font-size: 0.72rem;
  color: #7f8aa3;
}

.offer-meta-value {
  font-size: 0.96rem;
  color: #93a5c6;
  line-height: 1.15;
  word-break: break-word;
}
.product-meta {
  display: flex;
  gap: 8px;
}
.badge {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge-dark {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.05);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-promo {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(249, 115, 22, 0.15));
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  animation: pulse-promo 2s infinite;
}
@keyframes pulse-promo {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.promo-input {
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  font-weight: 600;
}
.promo-input:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.dropdown-menu {
  font-size: 1.15rem;
  font-weight: 600;
}
.price-tag {
  font-size: 1.15rem;
  font-weight: 600;
}
.highlight {
  color: #c084fc;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.4);
}

/* TOGGLE SWITCH */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  vertical-align: middle;
}
.toggle-switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.1);
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-main);
  transition: .4s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider {
  background: var(--accent);
  border-color: var(--accent);
}
input:checked + .slider:before {
  transform: translateX(22px);
}

.automation-cell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.automation-rules {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s;
}
.rule-select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: 'Outfit', sans-serif;
  outline: none;
  cursor: pointer;
}
.rule-select:disabled { cursor: not-allowed; opacity: 0.6; }

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-range-inputs .input-icon {
  position: relative;
}
.price-range-inputs input {
  width: 85px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 500;
}
.range-divider {
  color: var(--text-muted);
  font-weight: bold;
}

.competitor-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.offers-header-row th {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
}

.offers-col-product { width: 34%; }
.offers-col-price { width: 18%; }
.offers-col-competition { width: 16%; }
.offers-col-automation { width: 22%; }
.offers-col-limits { width: 10%; }

.offer-price-cell {
  min-width: 230px;
}

.offer-price-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.offer-price-unit {
  font-size: 0.86rem;
  opacity: 0.6;
  font-weight: 600;
  color: var(--text-main);
}

.offer-stats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  opacity: 0.72;
}

.offer-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
}

.offer-competition-cell {
  min-width: 170px;
}

.offer-market-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offer-market-seller {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.offer-market-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.offer-market-refresh {
  border-radius: 10px;
}

.offer-market-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.offer-automation-cell {
  min-width: 300px;
}

.offer-automation-card,
.offer-limits-card {
  border-radius: 16px;
  background: rgba(255,255,255,0.025) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.offer-automation-top {
  justify-content: space-between;
}

.offer-automation-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.offer-automation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offer-automation-icon-row {
  display: flex;
  gap: 6px;
}

.offer-automation-icon {
  border-radius: 999px;
}

.offer-automation-pills {
  margin-top: 2px;
}

.offer-limits-cell {
  min-width: 120px;
}
.comp-price {
  font-weight: 600;
  font-size: 1.05rem;
}
.comp-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.text-danger { color: var(--danger); }

.competitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
}
.status-win {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-lose {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* MODAL */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
  overflow-y: auto;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  width: 100%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100vh - 48px);
  overflow: hidden;
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-lg {
  max-width: 900px !important;
}
.modal-close {
  position: absolute;
  top: 24px; right: 24px;
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 24px; transition: color 0.2s;
}
.modal-close:hover { color: var(--text-main); }

.modal-header { text-align: center; margin-bottom: 24px; }
.modal-header h2 { margin-bottom: 8px; font-size: 1.5rem; }
.modal-header p { color: var(--text-muted); font-size: 0.95rem; }
.modal-body { min-height: 0; }
.modal-footer { flex-shrink: 0; }

.bulk-modal {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  padding: 28px 28px 20px 28px;
}

.bulk-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  margin-bottom: 14px;
}

.bulk-modal-header h2 {
  margin-bottom: 6px;
}

.bulk-modal-desc {
  margin: 0;
}

.bulk-modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(15,23,42,0.45));
}

.bulk-modal-selection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.bulk-modal-selection .material-icons-round {
  color: var(--accent);
}

.bulk-modal-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: right;
}

.bulk-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 6px;
}

.bulk-modal-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(11,15,25,0) 0%, rgba(11,15,25,0.92) 22%);
}

.bulk-field-group {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
}

.bulk-field-group-accent {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--accent-glow);
}

.bulk-field-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  font-weight: 600;
}

.bulk-field-toggle-accent {
  color: var(--accent);
}

.bulk-field-content {
  padding-left: 28px;
}

.bulk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bulk-subfield-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bulk-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bulk-input {
  width: 100%;
  padding: 10px;
  font-size: 0.95rem;
}

.bulk-input-sm {
  width: 96px;
}

.bulk-field-help {
  margin: 8px 0 0 28px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .bulk-modal {
    padding: 22px 18px 18px 18px;
  }

  .bulk-modal-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .bulk-modal-hint {
    text-align: left;
  }

  .bulk-grid {
    grid-template-columns: 1fr;
  }

  #bulkActions {
    width: calc(100vw - 24px);
    left: 12px !important;
    right: 12px;
    bottom: 12px !important;
    transform: translateY(120%);
  }

  #bulkActions > div {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 12px;
  }

  .modal-content {
    padding: 20px;
    max-height: calc(100vh - 24px);
  }

  .bulk-modal-footer {
    flex-direction: column-reverse;
  }

  .bulk-modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .bulk-field-content {
    padding-left: 0;
  }
}

/* Oczekiwane Dane w KROKU 1 */
.expected-data-table {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 24px;
}
.expected-data-table table {
  width: 100%; border-collapse: collapse;
}
.expected-data-table th, .expected-data-table td {
  padding: 12px 16px;
  font-size: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  white-space: nowrap;
}
.expected-data-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Mapowanie kolumn w KROKU 2 */
.mapping-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mapping-row {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.mapping-header {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--panel-border);
  border-radius: 0;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.mapping-col {
  flex: 1;
}
.mapping-col.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
}

.dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  cursor: pointer;
  margin-bottom: 24px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.spinner { display: inline-block; vertical-align: middle; }
.dropzone.drag-over, .dropzone:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: scale(1.02);
}
.dropzone-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px auto;
}
.dropzone h3 { font-size: 1.1rem; margin-bottom: 6px; }
.dropzone p { color: var(--text-muted); font-size: 0.85rem; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* KONTROLKI TABELI (Zmiany zbiorcze / Paginacja) */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 4px;
  position: relative;
  z-index: 100;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.3s;
}

.selected-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  min-width: 110px;
  text-align: center;
}

.bulk-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}
.bulk-select:focus, .bulk-select:hover {
  border-color: var(--accent);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.show-count-select {
  padding: 6px 8px;
  width: auto;
}

/* PAGINACJA DOLNA */
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid var(--panel-border);
  background: rgba(0,0,0,0.15);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  background: transparent;
  color: var(--text-main);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.page-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}
.page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}
.page-btn.next-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--panel-border);
}
.page-dots {
  color: var(--text-muted);
  user-select: none;
}

/* 2FA STYLES */
.otp-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}
.otp-input {
  width: 50px !important;
  height: 60px;
  font-size: 24px !important;
  text-align: center;
  padding: 0 !important;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* --- NEW CLEAN DASHBOARD LAYOUT --- */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 24px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.action-divider {
  width: 1px;
  height: 24px;
  background: var(--panel-border);
  margin: 0 8px;
}
.navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
}
.nav-tabs {
  display: flex;
  gap: 8px;
}
.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
}
.nav-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}
.nav-tab.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  font-weight: 600;
}
.nav-tab .material-icons-round {
  font-size: 18px;
}

.sync-info-box {
  font-size: 0.8rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--success-bg);
  padding: 6px 14px;
  border-radius: 40px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-weight: 500;
}

/* TOOLBAR SYSTEM */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 32px;
  gap: 20px;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.search-box .material-icons-round {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
}
.search-box input {
  padding-left: 44px !important;
  height: 42px;
  background: rgba(0, 0, 0, 0.2) !important;
}

.account-tabs-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}
.account-tab {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.account-tab:hover {
  border-color: var(--accent);
  color: var(--text-main);
}
.account-tab.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-outline {
  background: transparent;
  border-color: var(--panel-border);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}
/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  background: rgba(13, 17, 28, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.5s ease 4.5s forwards;
  pointer-events: auto;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.info { border-left: 4px solid var(--accent); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.error { border-left: 4px solid var(--danger); }

.toast-icon {
  font-size: 20px;
}
.toast-success-icon { color: var(--success); }
.toast-info-icon { color: var(--accent); }
.toast-warning-icon { color: var(--warning); }
.toast-error-icon { color: var(--danger); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}
/* --- UI OVERHAUL: NEW COMPONENTS --- */
.price-main {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.profit-pill {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.profit-pill.success { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.profit-pill.warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.profit-pill.danger { background: rgba(244, 63, 94, 0.15); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.3); }

.financial-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.financial-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.financial-item strong {
    color: var(--text-main);
    font-weight: 500;
}

.profit-card {
    margin-top: 6px;
    padding: 12px 12px 10px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(14, 20, 33, 0.98) 0%, rgba(10, 15, 25, 0.96) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.profit-card-success {
    border-color: rgba(46, 224, 160, 0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 22px rgba(14, 20, 33, 0.22);
}

.profit-card-warning {
    border-color: rgba(251, 191, 54, 0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 22px rgba(14, 20, 33, 0.20);
}

.profit-card-danger {
    border-color: rgba(244, 63, 94, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 22px rgba(14, 20, 33, 0.20);
}

.profit-card-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.profit-card-row-input {
    margin-bottom: 8px;
}

.profit-card-label {
    color: #7f8aa3;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    max-width: 64px;
}

.profit-card-value {
    color: #f5f7fb;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: right;
}

.profit-card-value-main {
    font-size: 0.95rem;
}

.profit-card-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profit-card-input {
    width: 44px;
    min-width: 44px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f5c04d;
    font-weight: 800;
    border-radius: 6px;
    padding: 3px 6px;
    text-align: center;
    outline: none;
}

.profit-card-unit {
    color: #f5c04d;
    font-size: 0.8rem;
    font-weight: 800;
}

.profit-card-divider {
    height: 1px;
    margin: 8px 0 10px;
    background: rgba(255,255,255,0.07);
}

.profit-card-row-accent {
    margin-bottom: 10px;
}

.profit-card-label-accent,
.profit-card-value-accent {
    color: #ffbf35;
    font-weight: 800;
}

.profit-card-value-accent {
    font-size: 0.98rem;
}

.profit-card-profit {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.profit-card-profit-icon-wrap {
    padding-top: 1px;
}

.profit-card-profit-icon {
    color: #38d39f;
    font-size: 1rem;
}

.profit-card-profit-body {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 10px;
    row-gap: 0;
    align-items: baseline;
}

.profit-card-profit-label {
    grid-column: 1;
    color: #2fe0a0;
    font-size: 0.78rem;
    font-weight: 800;
}

.profit-card-profit-value {
    grid-column: 2;
    color: #2fe0a0;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: right;
}

.profit-card-profit-percent {
    grid-column: 1 / span 2;
    color: #2fe0a0;
    font-size: 0.72rem;
    font-weight: 900;
    margin-top: -1px;
}

.profit-card-warning .profit-card-profit-icon,
.profit-card-warning .profit-card-profit-label,
.profit-card-warning .profit-card-profit-value,
.profit-card-warning .profit-card-profit-percent {
    color: #ffbf35;
}

.profit-card-danger .profit-card-profit-icon,
.profit-card-danger .profit-card-profit-label,
.profit-card-danger .profit-card-profit-value,
.profit-card-danger .profit-card-profit-percent {
    color: #ff6b81;
}

.profit-card-commission {
    margin-top: 8px;
    color: #69748d;
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: center;
}

.profit-card-commission span {
    display: block;
}

.profit-card-net {
    margin-top: 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
    align-items: baseline;
}

.profit-card-net span {
    color: #98a3b8;
    font-size: 0.68rem;
    font-weight: 700;
}

.profit-card-net strong {
    color: #2fe0a0;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: right;
}

.profit-card-net small {
    grid-column: 1 / span 2;
    color: #7f8aa3;
    font-size: 0.66rem;
    font-weight: 700;
}

.profit-card-net-warning strong {
    color: #ffbf35;
}

.profit-card-net-danger strong {
    color: #ff6b81;
}

.profit-card-details-toggle {
    width: 100%;
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: #8ea0ff;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}

.profit-card-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255,255,255,0.10);
}

.profit-card-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    color: #7f8aa3;
    font-size: 0.66rem;
}

.profit-card-detail-row strong {
    color: #dce3f2;
    font-weight: 800;
    text-align: right;
}

.profit-card-formula {
    margin-top: 6px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(129,140,248,0.08);
    color: #aeb8ff;
    font-size: 0.64rem;
    line-height: 1.25;
}

.automation-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.automation-pills-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.limit-range-ui {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.limit-input {
    width: 75px;
    background: var(--input-bg) !important;
    border: 1px solid var(--panel-border) !important;
    padding: 4px 8px !important;
    font-size: 0.9rem !important;
    text-align: center;
    font-weight: 600;
    color: var(--text-main) !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.limit-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent-glow) !important;
    outline: none;
}

.limit-input:focus {
    box-shadow: none !important;
}

.limit-input::placeholder { color: rgba(255,255,255,0.15); }

.range-divider-v2 {
    color: rgba(255,255,255,0.15);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Updated Table Row Spacing */
.table-row td {
    padding: 24px 16px !important;
}

.comp-price-main {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.comp-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.03em;
}

.comp-status-badge.winner { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3); }
.comp-status-badge.loser { background: rgba(248, 113, 113, 0.15); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }

.product-meta-v2 {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.meta-pill {
    background: var(--input-bg);
    color: var(--text-muted);
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--panel-border);
}
