/* ============================================
   ManagementModule - Unified Styles
   ============================================ */

/* ============================================
   1. CSS Variables (Design Tokens)
   ============================================ */
:root {
  --background: hsl(210 20% 98%);
  --foreground: hsl(220 20% 10%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(220 20% 10%);
  --primary: hsl(152 55% 40%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(210 15% 96%);
  --secondary-foreground: hsl(220 15% 30%);
  --muted: hsl(210 15% 94%);
  --muted-foreground: hsl(215 15% 50%);
  --accent: hsl(152 45% 95%);
  --accent-foreground: hsl(152 55% 30%);
  --destructive: hsl(0 72% 55%);
  --destructive-foreground: hsl(0 0% 100%);
  --success: hsl(152 55% 45%);
  --success-foreground: hsl(0 0% 100%);
  --warning: hsl(38 92% 50%);
  --warning-foreground: hsl(0 0% 100%);
  --popover: hsl(0 0% 100%);
  --popover-foreground: hsl(220 20% 10%);
  --border: hsl(214 20% 90%);
  --input: hsl(214 20% 88%);
  --ring: hsl(152 55% 40%);
  --radius: 0.5rem;
  --gradient-page: linear-gradient(135deg, hsl(210 20% 98%) 0%, hsl(210 25% 96%) 100%);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Comfort mode - cieplejsze barwy dla długiej pracy */
html.comfort {
  --background: hsl(40 30% 96%);
  --foreground: hsl(30 20% 15%);
  --card: hsl(45 25% 98%);
  --card-foreground: hsl(30 20% 15%);
  --popover: hsl(45 25% 98%);
  --popover-foreground: hsl(30 20% 15%);
  --primary: hsl(152 45% 38%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(40 20% 92%);
  --secondary-foreground: hsl(30 15% 25%);
  --muted: hsl(40 15% 90%);
  --muted-foreground: hsl(30 15% 45%);
  --accent: hsl(45 35% 94%);
  --accent-foreground: hsl(152 45% 30%);
  --destructive: hsl(0 65% 50%);
  --destructive-foreground: hsl(0 0% 100%);
  --success: hsl(152 45% 42%);
  --warning: hsl(38 85% 48%);
  --border: hsl(40 20% 85%);
  --input: hsl(40 20% 88%);
  --ring: hsl(152 45% 38%);
  --gradient-page: linear-gradient(135deg, hsl(40 30% 96%) 0%, hsl(45 25% 94%) 100%);
  --shadow-card: 0 1px 3px rgba(80, 60, 40, 0.04), 0 4px 12px rgba(80, 60, 40, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(80, 60, 40, 0.06), 0 8px 24px rgba(80, 60, 40, 0.06);
}

/* Dark mode */
html.dark {
  --background: hsl(220 20% 8%);
  --foreground: hsl(210 20% 98%);
  --card: hsl(220 18% 12%);
  --card-foreground: hsl(210 20% 98%);
  --popover: hsl(220 18% 12%);
  --popover-foreground: hsl(210 20% 98%);
  --primary: hsl(152 55% 45%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(220 15% 18%);
  --secondary-foreground: hsl(210 15% 85%);
  --muted: hsl(220 15% 16%);
  --muted-foreground: hsl(215 15% 60%);
  --accent: hsl(152 35% 18%);
  --accent-foreground: hsl(152 55% 75%);
  --destructive: hsl(0 62% 45%);
  --destructive-foreground: hsl(0 0% 100%);
  --success: hsl(152 55% 45%);
  --warning: hsl(38 92% 50%);
  --border: hsl(220 15% 20%);
  --input: hsl(220 15% 18%);
  --ring: hsl(152 55% 45%);
  --gradient-page: linear-gradient(135deg, hsl(220 20% 8%) 0%, hsl(220 18% 10%) 100%);
}

/* ============================================
   2. Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Płynne przejścia kolorów dla wszystkich elementów */
html {
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--gradient-page);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

/* Płynne przejścia dla kart, przycisków i inputów */
.wizard-card,
.card,
.btn,
input,
select,
textarea,
.wizard-sidebar,
.wizard-navbar,
.wizard-dropdown-menu {
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

/* ============================================
   Global Form Control Sizing
   ============================================ */
input.input,
select.select,
.tree-select-trigger {
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

input.input.input-sm,
select.select.select-sm,
.input-sm.tree-select-trigger {
  height: 34px;
  min-height: 34px;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
}

/* ============================================
   3. Animations
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseSubtle {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.animate-fade-in {
  /* animation removed */
}

.animate-slide-up {
  /* animation removed */
}

.delay-100 {
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.delay-200 {
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

.delay-300 {
  animation-delay: 0.3s;
  animation-fill-mode: both;
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ============================================
   4. Layout
   ============================================ */
.page {
  min-height: 100vh;
  padding: 1rem;
}

@media (min-width: 640px) {
  .page {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .page {
    padding: 2rem;
  }
}

.container {
  max-width: 72rem;
  margin: 0 auto;
}

/* ============================================
   4.1 Wizard Layout (navbar + sidebar + content)
   ============================================ */
body.wizard-layout {
  background: var(--gradient-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Wizard Navbar */
.wizard-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: 3.5rem;
}

@media (min-width: 640px) {
  .wizard-navbar {
    height: 4rem;
  }
}

.wizard-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 0.75rem;
}

@media (min-width: 640px) {
  .wizard-navbar-inner {
    padding: 0 1.5rem;
  }
}

.wizard-navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

@media (min-width: 640px) {
  .wizard-navbar-brand {
    gap: 0.75rem;
  }
}

.wizard-navbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--primary);
}

@media (min-width: 640px) {
  .wizard-navbar-logo {
    width: 7rem;
    height: 3rem;
  }
}

.wizard-navbar-logo svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 640px) {
  .wizard-navbar-logo svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.wizard-navbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wizard-navbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

@media (min-width: 640px) {
  .wizard-navbar-title {
    font-size: 1.125rem;
  }
}

.wizard-navbar-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .wizard-navbar-nav {
    display: flex;
  }
}

.wizard-navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

@media (min-width: 640px) {
  .wizard-navbar-actions {
    gap: 0.5rem;
  }
}

.btn.wizard-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

@media (min-width: 640px) {
  .btn.wizard-sidebar-toggle {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .btn.wizard-sidebar-toggle {
    display: none;
  }
}

.btn.wizard-navbar-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

@media (min-width: 640px) {
  .btn.wizard-navbar-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
  }
}

.btn.wizard-navbar-icon-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .btn.wizard-navbar-icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.wizard-notification-badge {
  position: absolute;
  top: 0.125rem;
  right: 0.125rem;
  width: 0.875rem;
  height: 0.875rem;
  background: var(--destructive);
  color: var(--primary-foreground);
  border-radius: 9999px;
  font-size: 0.5625rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .wizard-notification-badge {
    width: 1rem;
    height: 1rem;
    font-size: 0.625rem;
  }
}

.btn.wizard-navbar-avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 2.5rem;
  padding: 0;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  box-sizing: border-box;
}

@media (max-width: 639px) {
  .btn.wizard-navbar-avatar {
    height: 2.25rem;
  }
}

@media (min-width: 640px) {
  .btn.wizard-navbar-avatar {
    height: 2.5rem;
    gap: 0.5rem;
    padding-left: 0.25rem;
    padding-right: 0.5rem;
  }
}

.wizard-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .wizard-avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }
}

.wizard-chevron-down {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--muted-foreground);
  display: none;
}

@media (min-width: 640px) {
  .wizard-chevron-down {
    display: block;
    width: 1rem;
    height: 1rem;
  }
}

.btn.wizard-mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

@media (min-width: 640px) {
  .btn.wizard-mobile-menu-btn {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (min-width: 768px) {
  .btn.wizard-mobile-menu-btn {
    display: none;
  }
}

.btn.wizard-mobile-menu-btn svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 640px) {
  .btn.wizard-mobile-menu-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Wizard Main Layout */
.wizard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .wizard-main {
    flex-direction: row;
  }
}

/* Wizard Sidebar */
.wizard-sidebar-placeholder {
  display: none;
}

@media (min-width: 1024px) {
  .wizard-sidebar-placeholder {
    display: none;
    width: 0;
  }
}

.wizard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 16rem;
  background: var(--card);
  border-right: 1px solid var(--border);
  z-index: 50;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.wizard-sidebar.open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .wizard-sidebar {
    position: sticky;
    top: 4rem;
    left: auto;
    bottom: auto;
    width: auto;
    min-width: 14rem;
    flex-shrink: 0;
    transform: none;
    z-index: 30;
    background: var(--card);
    height: calc(100vh - 4rem);
    border-right: 1px solid var(--border);
  }
}

.wizard-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
}

@media (min-width: 1024px) {
  .wizard-sidebar-header {
    display: none;
  }
}

.wizard-sidebar-close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-sidebar-close:hover {
  color: var(--foreground);
}

.wizard-sidebar-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.wizard-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.wizard-sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .wizard-sidebar-overlay {
    display: none;
  }
}

.wizard-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

/* Sidebar Groups */
.wizard-sidebar-group {
  margin-bottom: 0.25rem;
}

.wizard-sidebar-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.wizard-sidebar-group-btn:hover {
  background: var(--muted);
}

.wizard-sidebar-group-btn.active {
  color: var(--primary);
}

.wizard-sidebar-group-btn.visited {
  color: var(--muted-foreground);
}

.wizard-sidebar-chevron {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.wizard-sidebar-chevron.expanded {
  transform: rotate(90deg);
}

.wizard-sidebar-group-items {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0.5rem;
  transition: all 0.2s ease;
}

.wizard-sidebar-group-items.expanded {
  max-height: 24rem;
  opacity: 1;
  padding-top: 0.25rem;
}

.wizard-sidebar-group-items-inner {
  padding-left: 0.5rem;
  border-left: 1px solid var(--border);
}

/* Sidebar Steps */
.wizard-sidebar-step {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.wizard-sidebar-step:hover {
  background: var(--muted);
}

.wizard-sidebar-step.active {
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
}

.wizard-sidebar-step.visited:not(.active) {
  color: var(--muted-foreground);
}

.wizard-sidebar-step.visited:not(.active):hover {
  background: var(--accent);
}

.wizard-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.wizard-sidebar-step:not(.active):not(.visited) .wizard-step-icon {
  background: var(--muted);
  color: var(--muted-foreground);
}

.wizard-sidebar-step.active .wizard-step-icon {
  background: hsla(0, 0%, 100%, 0.2);
  color: var(--primary-foreground);
}

.wizard-sidebar-step.visited:not(.active) .wizard-step-icon {
  background: hsla(152, 55%, 40%, 0.2);
  color: var(--primary);
}

.wizard-step-icon svg {
  width: 0.75rem;
  height: 0.75rem;
}

.wizard-step-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Wizard Content */
.wizard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.wizard-content-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

@media (min-width: 640px) {
  .wizard-content-header {
    padding: 0.75rem 1.5rem 1rem;
  }
}

.wizard-content-integration {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.wizard-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wizard-integration-name {
  color: var(--foreground);
  font-weight: 600;
  font-size: 0.75rem;
}

.wizard-integration-details {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  font-size: 0.75rem;
}

.wizard-breadcrumb-row {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.wizard-integration-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.wizard-integration-item span {
  color: var(--foreground);
  font-weight: 500;
}

.wizard-integration-icon {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
}

.wizard-integration-arrow {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
}

.data-flow-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--primary);
  animation: dataFlow 1.5s ease-in-out infinite;
}

.data-flow-dot:nth-child(1) {
  animation-delay: 0s;
}

.data-flow-dot:nth-child(2) {
  animation-delay: 0.3s;
}

.data-flow-dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dataFlow {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.wizard-breadcrumb-separator {
  color: var(--muted-foreground);
  margin: 0 0.5rem;
}

.wizard-breadcrumb-current {
  font-weight: 500;
  color: var(--muted-foreground);
}

.wizard-content-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .wizard-content-title {
    font-size: 1.125rem;
  }
}

.wizard-content-body {
  flex: 1;
  padding: 1rem;
}

@media (min-width: 640px) {
  .wizard-content-body {
    padding: 1.5rem;
  }
}

.wizard-content-inner {
  max-width: 64rem;
  margin: 0 auto;
}

.wizard-content-card {
  background: var(--card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  padding: 1rem;
}

@media (min-width: 640px) {
  .wizard-content-card {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .wizard-content-card {
    padding: 2rem;
  }
}

.wizard-content-placeholder {
  text-align: center;
  padding: 2rem;
}

.wizard-content-placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: hsla(152, 55%, 40%, 0.1);
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .wizard-content-placeholder-icon {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
  }
}

.wizard-content-placeholder-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .wizard-content-placeholder-title {
    font-size: 1.25rem;
  }
}

.wizard-content-placeholder-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 28rem;
  margin: 0 auto;
}

/* Global Portal Tooltip System */
.global-custom-tooltip {
    position: absolute;
    padding: 0.5rem 0.75rem;
    background: var(--popover);
    color: var(--popover-foreground);
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 0.375rem;
    z-index: 99999;
    pointer-events: none;
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
    box-shadow: var(--shadow-card);
    opacity: 0;
    transition: opacity 0.15s ease;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

/* ============================================
   5. Navigation (index-app.html)
   ============================================ */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
}

.navbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
}

.navbar-logo svg {
  width: 1.25rem;
  height: 1.25rem;
}

.navbar-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--foreground);
}

.navbar-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    display: none;
  }

  .navbar-menu.open {
    display: flex;
  }

  .navbar-menu .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   6. Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn svg {
  width: 1rem;
  height: 1rem;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: none;
}

.btn-ghost:hover {
  background: var(--secondary);
}

.btn-outline {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--secondary);
}

.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: hsl(152 55% 35%);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-social:hover {
  background: var(--secondary);
}

.btn-social svg {
  width: 1.125rem;
  height: 1.125rem;
}

.social-buttons {
  display: flex;
  gap: 0.75rem;
}

/* ============================================
   7. Forms
   ============================================ */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.input-wrapper {
  position: relative;
}

.input,
.select {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.input:focus,
.select:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input-error,
.select-error {
  border-color: var(--destructive) !important;
}

.input-error:focus,
.select-error:focus {
  box-shadow: 0 0 0 3px hsla(0, 72%, 55%, 0.15) !important;
  border-color: var(--destructive) !important;
}

.field-error {
  display: block;
  font-size: 0.75rem;
  color: var(--destructive);
  margin-top: 0.25rem;
  line-height: 1.3;
}

.input-with-icon {
  padding-right: 2.75rem;
}

.toggle-password {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--foreground);
}

.toggle-password svg {
  width: 1.125rem;
  height: 1.125rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--foreground);
  cursor: pointer;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================
   8. Links
   ============================================ */
.link {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.link:hover {
  color: hsl(152 55% 30%);
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--foreground);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
}

/* ============================================
   9. Divider
   ============================================ */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   10. Messages (Error, Success)
   ============================================ */
.error-message {
  display: none;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: hsla(0, 72%, 55%, 0.1);
  border: 1px solid hsla(0, 72%, 55%, 0.2);
  border-radius: var(--radius);
  color: var(--destructive);
  font-size: 0.875rem;
}

.error-message.show {
  display: block;
}

.success-message {
  display: none;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: hsla(152, 55%, 45%, 0.1);
  border: 1px solid hsla(152, 55%, 45%, 0.2);
  border-radius: var(--radius);
  color: var(--success);
  font-size: 0.875rem;
}

.success-message.show {
  display: block;
}

/* ============================================
   11. Auth Pages (login, register, reset-password)
   ============================================ */
body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-container {
  width: 100%;
  max-width: 24rem;
  /* animation removed */
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: var(--primary-foreground);
  margin-bottom: 1.5rem;
}

.auth-logo svg {
  width: 1.5rem;
  height: 1.5rem;
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.auth-icon svg {
  width: 2rem;
  height: 2rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-footer-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

/* Password Strength (register.html) */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.strength-fill.weak {
  width: 33%;
  background: var(--destructive);
}

.strength-fill.medium {
  width: 66%;
  background: var(--warning);
}

.strength-fill.strong {
  width: 100%;
  background: var(--success);
}

.strength-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Success View (reset-password.html) */
.success-view {
  display: none;
  text-align: center;
}

.success-view.show {
  display: block;
}

.form-view.hide {
  display: none;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--success);
  margin-bottom: 1.5rem;
}

.success-icon svg {
  width: 2rem;
  height: 2rem;
}

.success-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.success-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.email-highlight {
  font-weight: 600;
  color: var(--foreground);
}

.resend-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
}

/* ============================================
   12. Hero Section (index-app.html)
   ============================================ */
.page.with-navbar {
  min-height: calc(100vh - 4rem);
  padding: 2rem 1rem;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--accent);
  color: var(--accent-foreground);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions .btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ============================================
   13. Features Section (index-app.html)
   ============================================ */
.features {
  padding: 4rem 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--foreground);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.feature-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ============================================
   14. Footer
   ============================================ */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ============================================
   15. Wizard Page (wizard.html)
   ============================================ */
.main-card {
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  /* animation removed */
}

/* Wizard Header */
.header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: hsla(152, 55%, 40%, 0.1);
  color: var(--primary);
}

.header-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.header-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .header-title {
    font-size: 1.125rem;
  }
}

.header-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

/* Header Integration Info */
.header-integration {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.integration-label {
  color: var(--muted-foreground);
}

.integration-source,
.integration-target {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.integration-source span,
.integration-target span {
  color: var(--foreground);
  font-weight: 500;
}

.integration-icon {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
}

.integration-arrow {
  color: var(--muted-foreground);
}

.header-badge {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  background: var(--secondary);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 1.5rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.step-item {
  display: flex;
  align-items: center;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  color: var(--muted-foreground);
  cursor: pointer;
}

.step.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.step.visited {
  background: var(--accent);
  color: var(--accent-foreground);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.2s ease;
}

.step:not(.active):not(.visited) .step-number {
  border-color: hsla(215, 15%, 50%, 0.3);
  color: var(--muted-foreground);
}

.step.active .step-number {
  background: hsla(0, 0%, 100%, 0.2);
  border-color: hsla(0, 0%, 100%, 0.3);
  color: var(--primary-foreground);
}

.step.visited .step-number {
  background: hsla(152, 55%, 40%, 0.1);
  border-color: hsla(152, 55%, 40%, 0.3);
  color: var(--primary);
}

.step-label {
  display: none;
}

@media (min-width: 640px) {
  .step-label {
    display: inline;
  }
}

.step-connector {
  width: 1rem;
  height: 1px;
  margin: 0 0.25rem;
  background: var(--border);
  transition: background 0.2s ease;
}

.step-connector.visited {
  background: hsla(152, 55%, 40%, 0.5);
}

/* Wizard Content */
.content {
  padding: 1.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  /* animation removed */
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Connection Card */
.connection-card {
  background: var(--card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.3s ease;
}

.connection-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.form-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: var(--secondary);
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--muted-foreground);
  transition: background 0.3s ease;
}

.status-dot.connecting {
  background: var(--warning);
  animation: pulseSubtle 2s ease-in-out infinite;
}

.status-dot.success {
  background: var(--success);
}

.status-dot.error {
  background: var(--destructive);
}

.status-dot.neutral {
  background: var(--muted-foreground);
}

.status-text {
  font-weight: 500;
  color: var(--foreground);
}

.last-attempt {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.button-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Wizard Footer */
.footer.wizard-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.footer.wizard-footer .footer-text {
  font-size: 0.75rem;
}

/* ============================================
   16. Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 420px;
  pointer-events: auto;
  /* animation removed */
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-1rem);
  }
}

.toast.hide {
  /* animation removed */
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

.toast.toast-success .toast-icon {
  background: hsla(152, 55%, 45%, 0.15);
  color: var(--success);
}

.toast.toast-error .toast-icon {
  background: hsla(0, 72%, 55%, 0.15);
  color: var(--destructive);
}

.toast.toast-warning .toast-icon {
  background: hsla(38, 92%, 50%, 0.15);
  color: var(--warning);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.125rem;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.toast-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.toast-close svg {
  width: 0.875rem;
  height: 0.875rem;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 var(--radius) var(--radius);
  animation: toastProgress linear forwards;
}

.toast.toast-success .toast-progress {
  background: var(--success);
}

.toast.toast-error .toast-progress {
  background: var(--destructive);
}

@keyframes toastProgress {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/* ============================================
   17. Confirmation Dialog
   ============================================ */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: hsla(220, 20%, 10%, 0.5);
  backdrop-filter: blur(2px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.dialog-overlay.show {
  opacity: 1;
  visibility: visible;
}

.dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 24rem;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.dialog-overlay.show .dialog {
  transform: scale(1);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.dialog-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: visible;
}

.dialog-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dialog-icon.dialog-icon-warning {
  background: hsla(38, 92%, 50%, 0.15);
  color: var(--warning);
}

.dialog-icon.dialog-icon-danger {
  background: hsla(0, 72%, 55%, 0.15);
  color: var(--destructive);
}

.dialog-icon.dialog-icon-info {
  background: hsla(152, 55%, 40%, 0.15);
  color: var(--primary);
}

.dialog-header-content {
  flex: 1;
}

.dialog-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.dialog-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.dialog-body {
  padding: 1.25rem;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-radius: 0 0 0.75rem 0.75rem;
}

.btn-danger {
  background: var(--destructive);
  color: var(--primary-foreground);
  border: 1px solid var(--destructive);
}

.btn-danger:hover {
  background: hsl(0 72% 50%);
}

/* Icon-only danger button (ghost) */
.btn-danger-ghost {
  background: transparent;
  border: none;
  color: var(--destructive);
}

.btn-danger-ghost:hover {
  background: hsla(0, 72%, 55%, 0.12);
}

/* ============================================
   18. Import Tab Content
   ============================================ */
.import-section {
  margin-bottom: 1.5rem;
}

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

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.section-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background: hsla(152, 55%, 40%, 0.1);
  color: var(--primary);
}

.section-header-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

.section-title-small {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Category Tree Select */
.tree-select {
  position: relative;
}

.tree-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.tree-select-trigger:hover {
  border-color: var(--ring);
}

.tree-select-trigger.active {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.tree-select-value {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  overflow: hidden;
}

.tree-select-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-select-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 9999px;
}

.tree-select-placeholder {
  color: var(--muted-foreground);
}

.tree-select-arrow {
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.tree-select-trigger.active .tree-select-arrow {
  transform: rotate(180deg);
}

.tree-select-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.tree-select-dropdown.show {
  display: block;
  /* animation removed */
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tree-item:hover {
  background: var(--secondary);
}

.tree-item-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.tree-item-label {
  flex: 1;
  font-size: 0.875rem;
  color: var(--foreground);
}

.tree-item-level-1 {
  padding-left: 0.75rem;
}

.tree-item-level-2 {
  padding-left: 1.5rem;
}

.tree-item-level-3 {
  padding-left: 2.25rem;
}

.tree-item-level-4 {
  padding-left: 3rem;
}

.tree-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border: none;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tree-expand.expanded {
  transform: rotate(90deg);
}

.tree-expand svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Selected Tags */
.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--foreground);
}

.selected-tag.excluded {
  background: hsla(0, 72%, 55%, 0.1);
  border-color: hsla(0, 72%, 55%, 0.2);
  color: var(--destructive);
}

.badge-excluded {
  padding: 0.125rem 0.375rem;
  background: var(--destructive);
  color: var(--destructive-foreground);
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.tag-remove:hover {
  opacity: 1;
}

.tag-remove svg {
  width: 0.625rem;
  height: 0.625rem;
}

/* Multiselect */
.multiselect {
  position: relative;
}

.multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.multiselect-trigger:hover {
  border-color: var(--ring);
}

.multiselect-trigger.active {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.multiselect-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.multiselect-dropdown.show {
  display: block;
  /* animation removed */
}

.multiselect-search {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.multiselect-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.multiselect-search input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.multiselect-search input::placeholder {
  color: var(--muted-foreground);
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.multiselect-option:hover {
  background: var(--secondary);
}

/* Checkboxes Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-item input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-item label {
  font-size: 0.875rem;
  color: var(--foreground);
  cursor: pointer;
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-info {
  flex: 1;
}

.toggle-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.125rem;
}

.toggle-description {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.toggle-switch {
  position: relative;
  width: 2.5rem;
  height: 1.375rem;
  background: var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch.active {
  background: var(--primary);
}

.toggle-switch-handle {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--card);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.toggle-switch.active .toggle-switch-handle {
  transform: translateX(1.125rem);
}

.toggle-input-wrapper {
  display: none;
  margin-top: 0.75rem;
  padding-left: 0;
}

.toggle-input-wrapper.show {
  display: block;
}

/* Category Tree Name */
.tree-name-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: hsla(38, 92%, 50%, 0.1);
  border: 1px solid hsla(38, 92%, 50%, 0.2);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.tree-name-info-icon {
  color: var(--warning);
  flex-shrink: 0;
}

.tree-name-info-icon svg {
  width: 1rem;
  height: 1rem;
}

.tree-name-info-text {
  font-size: 0.75rem;
  color: var(--foreground);
}

/* Import Content Card */
.import-content {
  /* animation removed */
}

.import-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
}

.import-card-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.import-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.import-card-body {
  padding: 1.25rem;
}

/* ============================================
   19. New/Beta Badge for Elements
   ============================================ */
.new-element {
  position: relative;
}

.new-element::after {
  content: attr(data-badge);
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  padding: 0.125rem 0.5rem;
  background: linear-gradient(135deg, hsl(262 83% 58%), hsl(262 83% 48%));
  color: hsl(0 0% 100%);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 9999px;
  box-shadow: 0 2px 8px hsla(262, 83%, 58%, 0.4);
  z-index: 10;
  letter-spacing: 0.02em;
  animation: badgePulse 2s ease-in-out infinite;
}

.new-element[data-badge="Beta"]::after {
  background: linear-gradient(135deg, hsl(38 92% 50%), hsl(38 92% 40%));
  box-shadow: 0 2px 8px hsla(38, 92%, 50%, 0.4);
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* ============================================
   20. Category Tree Search
   ============================================ */
.tree-search {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tree-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.tree-search input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.tree-search input::placeholder {
  color: var(--muted-foreground);
}

/* ============================================
   21. Manufacturer Excluded Badge
   ============================================ */
.multiselect-option .badge-excluded-inline {
  margin-left: auto;
  padding: 0.125rem 0.375rem;
  background: var(--destructive);
  color: var(--destructive-foreground);
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ============================================
   22. Import Form Footer
   ============================================ */
.import-form-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* ============================================
   23. Mapping Tab Styles
   ============================================ */
.mapping-content {
  /* animation removed */
}

.mapping-info-box {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.mapping-info-box h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mapping-info-box h4 svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.mapping-info-box p {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.mapping-info-box p:last-child {
  margin-bottom: 0;
}

.mapping-info-box ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.mapping-info-box ul li {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.mapping-info-box ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.mapping-warning {
  background: hsla(38, 92%, 50%, 0.1);
  border-color: hsla(38, 92%, 50%, 0.2);
}

.mapping-warning h4 svg {
  color: var(--warning);
}

/* Collapsible FAQ section */
.faq-section {
  background: hsla(221, 83%, 53%, 0.05);
  border: 1px solid hsla(221, 83%, 53%, 0.1);
  border-radius: 0.75rem;
  padding: 0;
  margin-bottom: 1.5rem;
}

.faq-section-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--foreground);
  padding: 1rem 1.25rem;
  list-style: none;
}

.faq-section-header::-webkit-details-marker {
  display: none;
}

.faq-section-header svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.faq-section-header::after {
  content: "▼";
  font-size: 0.6em;
  margin-left: auto;
  transition: transform 0.2s ease;
  color: var(--muted-foreground);
}

.faq-section[open] .faq-section-header::after {
  transform: rotate(180deg);
}

.faq-section-header:hover {
  color: var(--primary);
}

.faq-section-content {
  padding: 0 1.25rem 1rem;
  border-top: 1px solid hsla(221, 83%, 53%, 0.1);
}

/* Collapsible FAQ items */
.faq-item {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--foreground);
  padding: 0.5rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "▶";
  font-size: 0.6em;
  transition: transform 0.2s ease;
  color: var(--primary);
}

.faq-item[open] summary::before {
  transform: rotate(90deg);
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-item p {
  margin: 0.5rem 0 0 1rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.5;
}

.mapping-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .mapping-grid {
    grid-template-columns: 1fr;
  }
}

.mapping-column {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mapping-column-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mapping-search {
  width: 100%;
}

.mapping-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.mapping-search input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.mapping-search input::placeholder {
  color: var(--muted-foreground);
}

.mapping-tree-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.mapping-tree-expand svg {
  width: 0.875rem;
  height: 0.875rem;
}

.mapping-tree-expand.expanded {
  transform: rotate(90deg);
}

.mapping-tree-children {
  background: var(--secondary);
}

.mapping-column-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mapping-column-title svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.mapping-column-body {
  max-height: 400px;
  overflow-y: auto;
}

.mapping-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  padding: 2rem 0;
}

.mapping-arrow svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 768px) {
  .mapping-arrow {
    transform: rotate(90deg);
    padding: 1rem 0;
  }
}

.mapping-tree-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.mapping-tree-item:last-child {
  border-bottom: none;
}

.mapping-tree-item:hover {
  background: var(--secondary);
}

.mapping-tree-item.selected {
  background: hsla(152, 55%, 40%, 0.1);
}

.mapping-tree-item-radio {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}

.mapping-tree-item-label {
  flex: 1;
  font-size: 0.875rem;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.mapping-tree-item-level-1 {
  padding-left: 0.75rem;
}

.mapping-tree-item-level-2 {
  padding-left: 1.5rem;
}

.mapping-tree-item-level-3 {
  padding-left: 2.25rem;
}

.mapping-tree-item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-link-mapping {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-link-mapping:hover {
  background: hsl(152 55% 35%);
}

.btn-unlink-mapping {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: var(--destructive);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-unlink-mapping:hover {
  background: hsl(0 72% 50%);
}

.mapping-linked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: hsla(152, 55%, 40%, 0.15);
  color: var(--primary);
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
}

.mapping-linked-badge svg {
  width: 0.625rem;
  height: 0.625rem;
}

/* ============================================
   24. Linking Tab Styles
   ============================================ */
.linking-content {
  /* animation removed */
}

.linking-status-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.linking-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: hsla(152, 55%, 40%, 0.1);
  color: var(--primary);
  margin-bottom: 1rem;
}

.linking-status-icon svg {
  width: 2rem;
  height: 2rem;
}

.linking-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.linking-stat {
  text-align: center;
}

.linking-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.linking-stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.linking-last-sync {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.linking-progress {
  display: none;
  margin-top: 1.5rem;
}

.linking-progress.show {
  display: block;
}

.linking-progress-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.linking-progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--secondary);
  border-radius: var(--radius);
}

.linking-progress-step.active {
  background: hsla(152, 55%, 40%, 0.1);
}

.linking-progress-step.completed {
  background: hsla(152, 55%, 40%, 0.05);
}

.linking-progress-step-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.linking-progress-step-icon svg {
  width: 1rem;
  height: 1rem;
}

.linking-progress-step.active .linking-progress-step-icon svg {
  animation: spin 1s linear infinite;
  color: var(--primary);
}

.linking-progress-step.completed .linking-progress-step-icon svg {
  color: var(--success);
}

.linking-progress-step-text {
  font-size: 0.875rem;
  color: var(--foreground);
}

/* ============================================
   25. Management Tab Styles
   ============================================ */
.management-content {
  /* animation removed */
}

.sync-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sync-option-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.sync-option-card:hover {
  border-color: var(--ring);
}

.sync-option-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sync-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: hsla(152, 55%, 40%, 0.1);
  color: var(--primary);
}

.sync-option-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.sync-option-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.sync-option-description {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Interval list - simple rows without borders */
.interval-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.interval-row-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.interval-row-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.interval-row-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.interval-row-input input {
  width: 5rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  background: var(--secondary);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.interval-row-input input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.interval-row-input span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ============================================
   27. Visibility Tab Styles
   ============================================ */
.visibility-content {
  /* animation removed */
}

/* Toggle option row - like in Import tab */
.toggle-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.toggle-option-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toggle-option-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.toggle-option-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.conditional-field {
  display: none;
  margin-top: 0.75rem;
  padding-left: 0;
}

.conditional-field.show {
  display: block;
}

/* Visibility interval row */
.visibility-interval-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.visibility-interval-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.visibility-interval-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.visibility-interval-input input {
  width: 5rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  background: var(--secondary);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.visibility-interval-input input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.visibility-interval-input span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.visibility-interval-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ============================================
   28. Pricing Rules Tab Styles
   ============================================ */
.pricing-rules-content {
  /* animation removed */
}

/* Large dialog for pricing modal */
.dialog-large {
  max-width: 48rem;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.dialog-large .dialog-header {
  position: relative;
}

.dialog-close-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.dialog-body {
  padding: 1.5rem;
}

.dialog-icon-primary {
  background: hsla(152, 55%, 40%, 0.15);
  color: var(--primary);
}

.modal-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

/* Tree search inline */
.tree-search-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.tree-search-inline svg {
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
}

.tree-search-inline input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--foreground);
  outline: none;
}

.tree-search-inline input::placeholder {
  color: var(--muted-foreground);
}

/* Tree container */
.tree-container {
  max-height: 200px;
  overflow-y: auto;
}

.import-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.pricing-rule-form {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.pricing-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.pricing-form-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.pricing-form-body {
  padding: 1.25rem;
}

.pricing-form-body .import-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.pricing-form-body .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.pricing-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--muted);
  border-top: 1px solid var(--border);
}

/* Conditions */
.conditions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.condition-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.condition-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  flex: 1;
  min-width: 300px;
}

.condition-fields .form-group {
  margin-bottom: 0;
}

.btn-ghost.btn-danger {
  color: var(--destructive);
}

.btn-ghost.btn-danger:hover {
  background: hsla(0, 84%, 60%, 0.1);
}

/* Target Type Selector */
.target-type-selector {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.target-type-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.target-type-option:hover {
  border-color: var(--ring);
}

.target-type-option input {
  accent-color: var(--primary);
}

.target-type-option input:checked+.target-type-label {
  color: var(--primary);
  font-weight: 500;
}

.target-type-label {
  font-size: 0.875rem;
  color: var(--foreground);
}

.target-selector {
  margin-top: 1rem;
}

/* Rule Tree Items */
.rule-tree-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rule-tree-item:hover {
  background: var(--muted);
}

.rule-tree-item-level-2 {
  padding-left: 1.5rem;
}

.rule-tree-item input[type="radio"] {
  accent-color: var(--primary);
}

.rule-tree-item label {
  font-size: 0.875rem;
  color: var(--foreground);
  cursor: pointer;
  flex: 1;
}

/* Pricing Rules Filters */
.pricing-rules-filters {
  margin-bottom: 1rem;
}

.filter-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-search svg {
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.filter-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
}

.filter-search input::placeholder {
  color: var(--muted-foreground);
}

.filter-row .select {
  width: auto;
  min-width: 160px;
  flex-shrink: 0;
}

.select-sm {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.8125rem;
  height: auto;
}

@media (max-width: 640px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-search {
    min-width: 100%;
  }

  .filter-row .select {
    width: 100%;
  }
}

/* Pricing Rules Table */
.pricing-rules-table-wrapper {
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.pricing-rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.pricing-rules-table thead {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.pricing-rules-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.pricing-rules-table .th-actions {
  width: 1%;
  white-space: nowrap;
}

.pricing-rules-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  vertical-align: middle;
}

.pricing-rules-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-rules-table tbody tr:hover {
  background: var(--muted);
}

.pricing-rules-table .th-actions-right,
.pricing-rules-table .td-actions-right {
  text-align: right;
}

.pricing-rules-table .td-actions-right {
  width: 1%;
  white-space: nowrap;
}

.pricing-rules-table .td-actions-right .product-actions-dropdown {
  justify-content: flex-end;
}

.rule-name-label {
  font-weight: 500;
  color: var(--foreground);
}

.rule-type-badge {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  background: var(--secondary);
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Responsive table for Pricing Rules - mobile card layout */
@media (max-width: 768px) {
  .pricing-rules-table {
    display: block;
  }

  .pricing-rules-table thead {
    display: none;
  }

  .pricing-rules-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .pricing-rules-table tr {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
  }

  .pricing-rules-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
  }

  .pricing-rules-table td:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
    justify-content: stretch;
  }

  .pricing-rules-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    flex-shrink: 0;
    margin-right: 0.75rem;
    min-width: 100px;
  }

  .pricing-rules-table td:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
  }

  .pricing-rules-table td:first-child::before {
    display: none;
  }

  .pricing-rules-table td:first-child .rule-name-label {
    font-size: 1rem;
    font-weight: 600;
  }

  .pricing-rules-table .table-actions {
    width: 100%;
    justify-content: stretch;
    gap: 0.5rem;
  }

  .pricing-rules-table .table-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* Pagination */
.pricing-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 48px;
}

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

.pagination-info strong {
  color: var(--foreground);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  padding: 0.5rem;
}

.pagination-btn svg {
  width: 1rem;
  height: 1rem;
}

.pagination-page-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.pagination-page-input input {
  width: 3rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--foreground);
  text-align: center;
  transition: all 0.2s ease;
}

.pagination-page-input input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

/* Per-page dropdown */
.pagination-per-page-dropdown {
  position: relative;
  margin-left: 0.5rem;
}

.pagination-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.pagination-per-page-menu {
  position: absolute;
  right: 0;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  padding: 0.25rem;
}

/* Default: show above */
.pagination-per-page-menu {
  bottom: 100%;
  margin-bottom: 0.25rem;
}

/* Position bottom: show below */
.pagination-per-page-menu.position-bottom {
  bottom: auto;
  top: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* Position top: show above */
.pagination-per-page-menu.position-top {
  bottom: 100%;
  top: auto;
  margin-bottom: 0.25rem;
  margin-top: 0;
}

.pagination-per-page-menu.show {
  display: block;
}

.pagination-per-page-label {
  padding: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.pagination-per-page-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  text-align: left;
  background: none;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s ease;
}

.pagination-per-page-option:hover {
  background: var(--muted);
}

.pagination-per-page-option.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Status info row */
.status-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.status-info-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.status-info-value {
  font-weight: 500;
}

/* Run integration row */
.run-integration-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.run-integration-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.5;
}

.run-integration-row .btn {
  align-self: flex-start;
}

/* Profile Modal */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: hsla(0, 0%, 0%, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.profile-modal-overlay.show {
  display: flex;
}

.profile-modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.profile-modal-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
  border-radius: var(--radius);
}

.profile-modal-close:hover {
  color: var(--foreground);
  background: var(--muted);
}

.profile-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.profile-modal-body {
  padding: 1.5rem;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 600;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.profile-email {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

.profile-form-group {
  margin-bottom: 1rem;
}

.profile-form-group:last-child {
  margin-bottom: 0;
}

.profile-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}

.profile-form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.profile-form-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

.profile-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--muted);
}

/* 26. Integrations Page============================================*/
.integrations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.integration-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.3s ease;
}

.integration-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.integration-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.integration-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.integration-status-badge.active {
  background: hsla(152, 55%, 45%, 0.15);
  color: var(--success);
}

.integration-status-badge .status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.integration-payment-info {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.integration-card-body {
  padding: 1.25rem;
}

.integration-sources {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.integration-source {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.integration-source-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.integration-source-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.integration-source-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--muted-foreground);
}

.integration-source-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}

.integration-arrow {
  color: var(--muted-foreground);
}

.integration-arrow svg {
  width: 1.5rem;
  height: 1.5rem;
}

.integration-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.integration-stat {
  padding: 0.75rem;
  background: var(--secondary);
  border-radius: var(--radius);
}

.integration-stat-label {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.integration-stat-value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}

.integration-card-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--muted);
}

.integration-card-footer .btn {
  flex: 1;
}

/* ============================================
   Wizard Dropdowns (Navbar)
   ============================================ */
.wizard-dropdown {
  position: relative;
}

.wizard-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 10px 38px -10px rgba(0, 0, 0, 0.35),
    0 10px 20px -15px rgba(0, 0, 0, 0.2);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  min-width: 14rem;
}

.wizard-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wizard-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.wizard-dropdown-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--foreground);
}

.wizard-dropdown-body {
  max-height: 20rem;
  overflow-y: auto;
}

.wizard-dropdown-label {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.wizard-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.wizard-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--foreground);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.wizard-dropdown-item:hover {
  background: var(--muted);
}

.wizard-dropdown-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.wizard-dropdown-item-danger {
  color: var(--destructive);
}

.wizard-dropdown-item-danger svg {
  color: var(--destructive);
}

/* Theme Selector Styles */
.theme-selector-container {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  gap: 0.5rem;
}

.theme-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-selector-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.theme-mode-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.theme-selector {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  width: 100%;
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-option svg {
  width: 1rem;
  height: 1rem;
}

.theme-option:hover {
  background: var(--card);
  color: var(--foreground);
}

.theme-option.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Notifications menu */
.wizard-notifications-menu {
  width: 22rem;
}

@media (max-width: 640px) {
  .wizard-notifications-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 85vw;
    max-width: 20rem;
    margin-top: 0;
    border-radius: 0;
    border-right: none;
    transform: translateX(100%);
    height: 100vh;
    z-index: 110;

    /* Mobile layout */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .wizard-notifications-menu.show {
    transform: translateX(0);
  }

  .wizard-notifications-menu .wizard-dropdown-body {
    flex: 1;
    max-height: none;
    overflow-y: auto;
  }
}

/* Right menu overlay (for notifications, user menu on mobile) */
.wizard-right-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 105;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.wizard-right-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 641px) {
  .wizard-right-menu-overlay {
    display: none;
  }
}

.wizard-notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

@media (max-width: 640px) {
  .wizard-notification-item {
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
  }
}

.wizard-notification-item:last-child {
  border-bottom: none;
}

.wizard-notification-item:hover {
  background: var(--muted);
}

.wizard-notification-item.unread {
  background: hsla(152, 55%, 40%, 0.05);
}

.wizard-notification-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .wizard-notification-icon {
    width: 2rem;
    height: 2rem;
  }
}

.wizard-notification-icon svg {
  width: 1rem;
  height: 1rem;
}

.wizard-notification-icon.success {
  background: hsla(152, 55%, 45%, 0.15);
  color: var(--success);
}

.wizard-notification-icon.warning {
  background: hsla(38, 92%, 50%, 0.15);
  color: var(--warning);
}

.wizard-notification-icon.info {
  background: hsla(217, 91%, 60%, 0.15);
  color: hsl(217, 91%, 60%);
}

.wizard-notification-content {
  flex: 1;
  min-width: 0;
}

.wizard-notification-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}

.wizard-notification-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wizard-notification-date {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
}

/* User menu */
.wizard-user-menu {
  width: 16rem;
}

.wizard-token-section {
  padding: 0.75rem 1rem;
}

.wizard-token-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}

.wizard-token-header span:first-child {
  color: var(--muted-foreground);
}

.wizard-token-value {
  font-weight: 500;
  color: var(--foreground);
}

.wizard-token-progress {
  height: 0.5rem;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}

.wizard-token-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.wizard-token-btn {
  width: 100%;
  margin-top: 0.75rem;
}

/* Mobile menu */
.wizard-mobile-menu {
  min-width: 10rem;
}

@media (max-width: 767px) {
  .wizard-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 60vw;
    max-width: 16rem;
    margin-top: 0;
    border-radius: 0;
    border-right: none;
    transform: translateX(100%);
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 110;
  }

  .wizard-mobile-menu.show {
    transform: translateX(0);
  }
}

.wizard-mobile-menu-header {
  display: none;
}

@media (max-width: 767px) {
  .wizard-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1rem;
  }

  .wizard-mobile-menu-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .wizard-mobile-menu-close:hover {
    color: var(--foreground);
  }

  .wizard-mobile-menu-close svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Token purchase dialog packages */
.token-packages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.token-package {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.token-package:hover {
  border-color: var(--primary);
}

.token-package.popular {
  border-color: var(--primary);
  background: hsla(152, 55%, 40%, 0.05);
}

.token-package.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(152, 55%, 40%, 0.2);
}

.token-package-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.token-package-amount-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.token-package-amount {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--foreground);
}

.token-package-popular-badge {
  font-size: 0.625rem;
  font-weight: 500;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.token-package-rate {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.token-package-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

/* Force-hide mobile-only navbar controls on larger screens.
   (The global `.btn { display: inline-flex; }` rule appears later and was overriding
   earlier breakpoint rules due to equal specificity.) */
@media (min-width: 1024px) {

  .wizard-navbar-actions .wizard-sidebar-toggle,
  #sidebarToggle {
    display: none !important;
  }
}

@media (min-width: 768px) {

  .wizard-navbar-actions .wizard-mobile-menu-btn,
  #mobileMenuToggle {
    display: none !important;
  }
}

/* ============================================
   My Integrations Page Styles
   ============================================ */
.my-integrations-page {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .my-integrations-page {
    padding: 2rem;
  }
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 1.875rem;
  }
}

.page-subtitle {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Integration Cards Grid */
.integrations-grid {
  display: grid;
  gap: 1.5rem;
}

/* Integration Card */
.integration-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.integration-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary);
}

.integration-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.integration-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.integration-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.integration-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.integration-arrow {
  display: flex;
  align-items: center;
  gap: 3px;
}

.integration-arrow .data-flow-dot {
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: dataFlowIntegration 1.5s ease-in-out infinite;
}

.integration-arrow .data-flow-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.integration-arrow .data-flow-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dataFlowIntegration {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.integration-name {
  font-weight: 600;
  color: var(--foreground);
  font-size: 1rem;
}

.integration-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-active {
  background: hsla(152, 55%, 45%, 0.15);
  color: var(--success);
}

.badge-trial {
  background: hsla(38, 92%, 50%, 0.15);
  color: var(--warning);
}

.badge-inactive {
  background: var(--muted);
  color: var(--muted-foreground);
}

.badge-canceled {
  background: hsla(0, 72%, 55%, 0.15);
  color: var(--destructive);
}

.badge svg {
  width: 12px;
  height: 12px;
}

/* Subscription Details */
.subscription-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: var(--secondary);
  border-radius: calc(var(--radius) - 2px);
  margin-bottom: 1.25rem;
}

.subscription-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.subscription-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subscription-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
}

.subscription-value.trial {
  color: var(--warning);
}

.subscription-value.active {
  color: var(--success);
}

.subscription-value.canceled {
  color: var(--destructive);
}

/* Action Buttons */
.integration-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-manage {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-decoration: none;
}

.btn-manage:hover {
  background: hsl(152 55% 35%);
  transform: translateY(-1px);
}

.btn-manage svg {
  width: 16px;
  height: 16px;
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary-action:hover {
  background: var(--secondary);
  border-color: var(--muted-foreground);
}

.btn-secondary-action svg {
  width: 16px;
  height: 16px;
}

.btn-outline-danger {
  color: var(--destructive);
  border-color: hsla(0, 72%, 55%, 0.3);
}

.btn-outline-danger:hover {
  background: hsla(0, 72%, 55%, 0.1);
  border-color: var(--destructive);
}

.btn-success {
  color: var(--success);
  border-color: hsla(152, 55%, 45%, 0.3);
}

.btn-success:hover {
  background: hsla(152, 55%, 45%, 0.1);
  border-color: var(--success);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--muted-foreground);
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 639px) {
  .integration-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .integration-actions {
    width: 100%;
  }

  .integration-actions .btn-manage,
  .integration-actions .btn-secondary-action {
    flex: 1;
    justify-content: center;
  }
}

/* ============================================
   27. Integrations Table
   ============================================ */
.integrations-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.integrations-table .th-actions {
  width: 1%;
  white-space: nowrap;
}

.integration-name-label {
  font-weight: 500;
  color: var(--foreground);
}

.import-card-header-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.import-card-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

.integrations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.integrations-table thead {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.integrations-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.integrations-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  vertical-align: middle;
}

.integrations-table tbody tr:last-child td {
  border-bottom: none;
}

.integrations-table tbody tr:hover {
  background: var(--muted);
}

/* Integration cell with icons */
.integration-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.integration-icons-small {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.integration-icon-sm {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
}

.integration-arrow-sm {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.integration-name-sm {
  font-weight: 500;
  white-space: nowrap;
}

/* Badge small variant */
.badge-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
}

.badge-sm svg {
  display: none;
}

/* Table actions */
.table-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon-danger:hover {
  color: var(--destructive);
  background: hsla(0, 72%, 55%, 0.1);
}

.btn-icon-success:hover {
  color: var(--success);
  background: hsla(152, 55%, 45%, 0.1);
}

/* Responsive table - mobile card layout */
@media (max-width: 768px) {
  .integrations-table-container {
    max-width: 100%;
    overflow: visible;
  }

  .integrations-table {
    display: block;
  }

  .integrations-table thead {
    display: none;
  }

  .integrations-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .integrations-table tr {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
  }

  .integrations-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
  }

  .integrations-table td:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
    justify-content: stretch;
  }

  .integrations-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    flex-shrink: 0;
    margin-right: 0.75rem;
    min-width: 100px;
  }

  .integrations-table td:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
  }

  .integrations-table td:first-child::before {
    display: none;
  }

  .integration-icons-small {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .integration-name-text {
    font-size: 0.8125rem;
  }

  .integration-icon-sm {
    width: 18px;
    height: 18px;
  }

  .table-actions {
    width: 100%;
    justify-content: stretch;
    gap: 0.5rem;
  }

  .table-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .badge-sm {
    font-size: 0.625rem;
    padding: 0.2rem 0.4rem;
  }
}

/* ============================================
   28. My Integrations Page Responsive
   ============================================ */
.my-integrations-page {
  width: 100%;
  min-width: 0;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.table-header-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

/* Integration cell with animation */
.integration-icons-small {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.integration-name-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.integration-arrow-sm {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 0.25rem;
}

.integration-arrow-sm .data-flow-dot {
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: dataFlowPulse 1.5s ease-in-out infinite;
}

.integration-arrow-sm .data-flow-dot:nth-child(1) {
  animation-delay: 0s;
}

.integration-arrow-sm .data-flow-dot:nth-child(2) {
  animation-delay: 0.3s;
}

.integration-arrow-sm .data-flow-dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dataFlowPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* My Integrations Page Responsive */
@media (max-width: 1024px) {
  .my-integrations-page {
    padding: 1rem;
  }

  .page-header {
    margin-bottom: 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .my-integrations-page {
    padding: 0.75rem;
  }

  .table-header-actions {
    justify-content: stretch;
  }

  .table-header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .page-subtitle {
    font-size: 0.875rem;
  }
}

/* Pagination spacing (inside integrations table container) */
.integrations-table-container .pricing-pagination {
  margin-top: 0;
  padding: 1rem 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .integrations-table-container .pricing-pagination {
    padding: 0.875rem 0.75rem 1rem;
  }
}

/* ============================================
   29. Add Integration Modal
   ============================================ */
.dialog-medium {
  max-width: 32rem;
  width: 95%;
}

.dialog-medium .dialog-header {
  position: relative;
}

/* Form Input */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

.form-input:hover {
  border-color: var(--primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(152, 55%, 40%, 0.1);
}

/* Custom Select */
.custom-select-wrapper {
  position: relative;
}

.custom-select {
  position: relative;
  cursor: pointer;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select-trigger:hover {
  border-color: var(--primary);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(var(--primary-hsl), 0.1);
}

.custom-select-placeholder {
  color: var(--muted-foreground);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

.custom-select.open .custom-select-options {
  display: block;
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 0.15s;
}

.custom-select-option:hover {
  background: var(--muted);
}

.custom-select-option:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

.custom-select-option:last-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

.option-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
}

/* Integration Price Display */
.integration-price-display {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.integration-price-header {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.integration-price-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.integration-price-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.integration-price-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
}

.integration-price-arrow {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 0.25rem;
}

.integration-price-arrow .data-flow-dot {
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: dataFlowPulse 1.5s ease-in-out infinite;
}

.integration-price-arrow .data-flow-dot:nth-child(1) {
  animation-delay: 0s;
}

.integration-price-arrow .data-flow-dot:nth-child(2) {
  animation-delay: 0.3s;
}

.integration-price-arrow .data-flow-dot:nth-child(3) {
  animation-delay: 0.6s;
}

.integration-price-value {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.price-period {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (max-width: 480px) {
  .integration-price-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .integration-price-value {
    margin-top: 0.5rem;
  }
}

/* ============================================
   29. Custom Scrollbar Styling
   ============================================ */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

::-webkit-scrollbar-corner {
  background: var(--muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--muted);
}

/* Dialog scrollbar */
.dialog-large::-webkit-scrollbar {
  width: 6px;
}

.dialog-large::-webkit-scrollbar-track {
  background: var(--secondary);
  border-radius: 3px;
}

.dialog-large::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.dialog-large::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* Tree container scrollbar */
.tree-container::-webkit-scrollbar,
.mapping-column-body::-webkit-scrollbar,
.wizard-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.tree-container::-webkit-scrollbar-track,
.mapping-column-body::-webkit-scrollbar-track,
.wizard-sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.tree-container::-webkit-scrollbar-thumb,
.mapping-column-body::-webkit-scrollbar-thumb,
.wizard-sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.tree-container::-webkit-scrollbar-thumb:hover,
.mapping-column-body::-webkit-scrollbar-thumb:hover,
.wizard-sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* ============================================
   30. Dialog/Modal Responsive Fixes
   ============================================ */
@media (max-width: 768px) {
  .dialog-large {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .dialog-large .dialog-header {
    padding: 1rem;
  }

  .dialog-large .dialog-body {
    padding: 1rem;
  }

  .dialog-large .dialog-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .dialog-large .dialog-footer .btn {
    width: 100%;
    justify-content: center;
  }

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

  .condition-fields {
    grid-template-columns: 1fr;
    min-width: unset;
  }

  .condition-row {
    flex-direction: column;
    align-items: stretch;
  }

  .condition-row .btn {
    align-self: flex-end;
  }

  .target-type-selector {
    flex-direction: column;
  }

  .target-type-option {
    width: 100%;
  }

  .modal-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .modal-section-header .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .dialog-large .dialog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .dialog-close-btn {
    position: static;
    transform: none;
    align-self: flex-end;
    margin-top: -2rem;
  }
}

/* ============================================
   31. Status Tab Styles
   ============================================ */
.status-content {
  /* animation removed */
}

.status-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--secondary);
  border-radius: var(--radius);
}

.status-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-toggle-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
}

.status-toggle-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.status-toggle-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--success);
}

.status-value.inactive {
  color: var(--muted-foreground);
}

/* Status Stats Grid */
.status-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.status-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.status-stat-card:hover {
  border-color: var(--ring);
}

.status-stat-card.highlight {
  background: hsla(152, 55%, 40%, 0.05);
  border-color: hsla(152, 55%, 40%, 0.2);
}

.status-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--muted);
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.status-stat-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.status-stat-icon.success {
  background: hsla(152, 55%, 40%, 0.15);
  color: var(--success);
}

.status-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.status-stat-value.muted {
  color: var(--muted-foreground);
  font-weight: 400;
}

/* Test Mode Card */
.test-mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem;
  background: hsla(38, 92%, 50%, 0.08);
  border: 1px solid hsla(38, 92%, 50%, 0.2);
  border-radius: var(--radius);
}

.test-mode-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.test-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: hsla(38, 92%, 50%, 0.15);
  color: var(--warning);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  width: fit-content;
}

.test-mode-badge svg {
  width: 0.875rem;
  height: 0.875rem;
}

.test-mode-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin: 0;
}

.test-mode-description strong {
  color: var(--foreground);
  font-weight: 600;
}

@media (max-width: 640px) {
  .status-toggle-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-toggle-control {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }

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

  .test-mode-card {
    flex-direction: column;
    align-items: stretch;
  }

  .test-mode-card .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   Products Tab Styles
   ============================================ */

.import-card-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.products-count-label {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.products-count-label strong {
  color: var(--foreground);
}

/* Products Filters */
.products-filters {
  margin-bottom: 1.25rem;
}

.products-filters-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.products-filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding-bottom: 0;
}

/* Consistent control heights in filter grid */
.products-filters-grid .input,
.products-filters-grid .select,
.products-filters-grid .tree-select-trigger {
  height: 34px;
  min-height: 34px;
  box-sizing: border-box;
}

.form-label-sm {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

/* Products Bulk Actions */
.products-bulk-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

/* Products Selection Dropdown */
.products-selection-dropdown {
  position: relative;
}

.products-selection-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  height: 2rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s ease;
}

.products-selection-trigger:hover {
  border-color: var(--ring);
  background: var(--card);
}

.products-selection-trigger svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--muted-foreground);
  transition: transform 0.2s ease;
}

.products-selection-dropdown.show .products-selection-trigger svg {
  transform: rotate(180deg);
}

.products-selection-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--primary);
}

.products-table input[type="checkbox"],
.product-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--primary);
}

.products-selection-count {
  font-weight: 500;
  min-width: 50px;
  text-align: center;
}

.products-selection-chevron {
  color: var(--muted-foreground);
  transition: transform 0.2s ease;
}

.products-selection-menu.show+.products-selection-trigger .products-selection-chevron,
.products-selection-dropdown:has(.products-selection-menu.show) .products-selection-chevron {
  transform: rotate(180deg);
}

.products-selection-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  padding: 0.25rem;
}

.products-selection-menu.show {
  display: block;
}

.products-selection-group {
  padding: 0.25rem 0;
}

.products-selection-group-title {
  padding: 0.5rem 0.75rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.products-selection-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  text-align: left;
  background: none;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s ease;
}

.products-selection-option:hover {
  background: var(--muted);
}

.products-selection-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.products-selected-count {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.products-selected-count strong {
  color: var(--foreground);
}

.products-bulk-select {
  width: auto;
  min-width: 180px;
}

/* Products Table */
.products-table-wrapper {
  position: relative;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

/* Loading Spinner Component */
.loading-spinner-container {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.loading-spinner .spinner-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
  animation: spin 1s linear infinite;
}

.loading-spinner span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.products-table thead {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.products-table th {
  padding: 0.75rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.products-table .th-checkbox {
  width: 32px;
  padding: 0.75rem 0.5rem;
}

.products-table .th-actions-right,
.products-table .td-actions-right {
  text-align: right;
}

.products-table .td-actions-right {
  width: 1%;
  white-space: nowrap;
}

.products-table .td-actions-right .product-actions-dropdown {
  justify-content: flex-end;
}

.products-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.products-table th.sortable:hover {
  color: var(--foreground);
}

.products-table th .sort-icon {
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.25rem;
  vertical-align: middle;
  opacity: 0.5;
}

.products-table th.sorted-asc .sort-icon .sort-arrow-up,
.products-table th.sorted-desc .sort-icon .sort-arrow-down {
  opacity: 1;
  stroke: var(--primary);
}

.products-table th.sorted-asc .sort-icon,
.products-table th.sorted-desc .sort-icon {
  opacity: 1;
}

.products-table td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  vertical-align: middle;
}

.products-table tbody tr:last-child td {
  border-bottom: none;
}

.products-table tbody tr:hover {
  background: var(--muted);
}

/* Product Cell Styles */
.product-image-container {
  position: relative;
  display: inline-block;
}

.product-image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-image-zoom {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 0;
}

.product-image-zoom svg {
  width: 12px;
  height: 12px;
  color: var(--muted-foreground);
}

.product-image-container:hover .product-image-zoom {
  opacity: 1;
}

.product-image-zoom:hover {
  background: var(--muted);
}

.product-image-zoom:hover svg {
  color: var(--foreground);
}

.product-name {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.125rem;
}

.product-meta {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.product-meta .label {
  color: var(--muted-foreground);
}

.product-markup {
  font-size: 0.75rem;
}

.product-markup .text-muted {
  color: var(--muted-foreground);
}

.product-prices {
  font-size: 0.75rem;
}

.product-prices strong {
  font-weight: 500;
}

/* Product Actions Dropdown (3 dots menu) */
.product-actions-dropdown {
  position: relative;
}

.product-actions-btn {
  padding: 0.375rem;
}

.product-actions-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  display: none;
  padding: 0.25rem;
}

.product-actions-dropdown.show .product-actions-menu {
  display: block;
}

.product-actions-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  text-align: left;
  background: none;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s ease;
}

.product-actions-option:hover {
  background: var(--muted);
}

.product-actions-option svg {
  color: var(--muted-foreground);
}

.product-actions-option-danger {
  color: var(--destructive);
}

.product-actions-option-danger:hover {
  background: hsla(0, 72%, 55%, 0.1);
}

.product-actions-option-danger svg {
  color: var(--destructive);
}

.product-badge {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: var(--radius);
}

.product-badge-excluded {
  background: hsla(0, 72%, 55%, 0.1);
  color: var(--destructive);
}

.product-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius);
}

.product-sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-sync-toggle.product-sync-yes {
  background: hsla(152, 55%, 45%, 0.1);
  color: var(--success);
}

.product-sync-toggle.product-sync-no {
  background: hsla(0, 72%, 55%, 0.1);
  color: var(--destructive);
}

.product-sync-toggle:hover {
  opacity: 0.8;
}

.product-sync-yes {
  background: hsla(152, 55%, 45%, 0.1);
  color: var(--success);
}

.product-sync-no {
  background: hsla(0, 72%, 55%, 0.1);
  color: var(--destructive);
}

.product-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.product-status-dot.active {
  background: var(--success);
}

.product-status-dot.inactive {
  background: var(--destructive);
}

.text-nowrap {
  white-space: nowrap;
}

/* Confirmation Dialog */
.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 1rem;
}

.confirm-dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.confirm-dialog-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.confirm-dialog-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.confirm-dialog-body {
  padding: 1.25rem;
}

.confirm-dialog-body p {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: var(--foreground);
  line-height: 1.5;
}

.confirm-dialog-body p:last-child {
  margin-bottom: 0;
}

.confirm-dialog-body .text-muted {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.confirm-dialog-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), hsl(152, 55%, 50%));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--foreground);
  text-align: center;
  margin: 0;
}

.progress-percent {
  color: var(--muted-foreground);
  margin-left: 0.5rem;
}

/* Image Lightbox */
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 2rem;
}

.image-lightbox-overlay.show {
  display: flex;
}

.image-lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.image-lightbox-close svg {
  width: 20px;
  height: 20px;
  color: var(--foreground);
}

.image-lightbox-close:hover {
  background: var(--muted);
}

/* Product Preview Modal */
.product-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.product-preview-overlay.show {
  display: flex;
}

.product-preview-modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.product-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.product-preview-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.product-preview-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
  border-radius: var(--radius);
}

.product-preview-close:hover {
  color: var(--foreground);
  background: var(--muted);
}

.product-preview-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.product-preview-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  overflow-y: auto;
}

.product-preview-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-preview-main-image-wrapper {
  position: relative;
  width: 100%;
}

.product-preview-main-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--secondary);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-preview-main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-preview-zoom-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.product-preview-zoom-btn svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.product-preview-zoom-btn:hover {
  background: var(--muted);
}

.product-preview-zoom-btn:hover svg {
  color: var(--foreground);
}

.product-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.product-preview-nav.visible {
  display: flex;
}

.product-preview-nav svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.product-preview-nav:hover {
  background: var(--muted);
}

.product-preview-nav:hover svg {
  color: var(--foreground);
}

.product-preview-nav-prev {
  left: 0.5rem;
}

.product-preview-nav-next {
  right: 0.5rem;
}

.product-preview-image-counter {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  display: none;
}

.product-preview-image-counter.visible {
  display: block;
}

.product-preview-thumbnails {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-preview-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-preview-thumb:hover {
  border-color: var(--primary);
}

.product-preview-thumb.active {
  border-color: var(--primary);
}

.product-preview-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-preview-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-preview-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-preview-section-bordered {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.product-preview-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin: 0 0 0.25rem 0;
}

.product-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.875rem;
  padding: 0.25rem 0;
}

.product-preview-label {
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.product-preview-value {
  color: var(--foreground);
  text-align: right;
  font-weight: 500;
}

.product-preview-price {
  color: var(--primary);
  font-weight: 600;
}

.product-preview-category-path {
  font-size: 0.875rem;
  color: var(--foreground);
}

.product-preview-attributes {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.product-preview-attribute {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.product-preview-attribute .attribute-name {
  color: var(--muted-foreground);
}

.product-preview-attribute .attribute-value {
  color: var(--foreground);
  font-weight: 500;
}

.product-preview-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.product-preview-description p {
  margin: 0;
}

/* System info links */
.system-info-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.system-info-link:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

/* Responsive Products */
@media (max-width: 1200px) {
  .products-filters-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .products-filter-actions {
    grid-column: span 4;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .products-filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-filter-actions {
    grid-column: span 2;
  }

  .product-preview-body {
    grid-template-columns: 1fr;
  }

  .product-preview-main-image {
    max-height: 200px;
  }
}

@media (max-width: 768px) {
  .products-table {
    display: block;
  }

  .products-table thead {
    display: none;
  }

  .products-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .products-table tr {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0.25rem 0.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    position: relative;
  }

  .products-table td {
    display: flex;
    align-items: center;
    padding: 0.125rem 0;
    border-bottom: none;
    font-size: 0.75rem;
  }

  .products-table td::before {
    display: none;
  }

  /* Checkbox - top left corner */
  .products-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    align-items: flex-start;
  }

  /* Image - second column spanning rows */
  .products-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / 4;
    align-items: flex-start;
    padding: 0;
  }

  .products-table td:nth-child(2) .product-image-container .product-image {
    width: 48px;
    height: 48px;
  }

  /* Product name + meta - third column spanning rows */
  .products-table td:nth-child(3) {
    grid-column: 3;
    grid-row: 1 / 4;
    flex-direction: column;
    align-items: flex-start;
  }

  .products-table td:nth-child(3) .product-name {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.2;
  }

  .products-table td:nth-child(3) .product-meta {
    display: inline;
    font-size: 0.6875rem;
    color: var(--muted-foreground);
  }

  .products-table td:nth-child(3) .product-meta:not(:last-child)::after {
    content: " | ";
    color: var(--border);
  }

  /* Price - right side */
  .products-table td:nth-child(4) {
    grid-column: 4;
    grid-row: 2;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0;
    font-size: 0.6875rem;
    white-space: nowrap;
  }

  .products-table td:nth-child(4)::before {
    display: block;
    content: "Cena: ";
    font-weight: 600;
    color: var(--muted-foreground);
    margin-right: 0.25rem;
  }

  /* Stock - right side */
  .products-table td:nth-child(5) {
    grid-column: 4;
    grid-row: 3;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0;
    font-size: 0.6875rem;
    white-space: nowrap;
  }

  .products-table td:nth-child(5)::before {
    display: block;
    content: "Stan: ";
    font-weight: 600;
    color: var(--muted-foreground);
    margin-right: 0.25rem;
  }

  /* Actions (3 dots) - absolute top right corner */
  .products-table td:nth-child(6),
  .products-table .td-actions-right {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    grid-column: unset;
    grid-row: unset;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
  }

  .products-table td:nth-child(6) .btn,
  .products-table .td-actions-right .btn {
    padding: 0.25rem;
  }

  .products-table td:nth-child(6) .btn svg,
  .products-table .td-actions-right .btn svg {
    width: 14px;
    height: 14px;
  }

  .product-image-zoom {
    opacity: 1;
    width: 16px;
    height: 16px;
  }

  .product-image-zoom svg {
    width: 10px;
    height: 10px;
  }

  /* Selection dropdown mobile */
  .products-selection-trigger {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .products-selection-count {
    min-width: 40px;
  }

  .products-selection-checkbox {
    width: 14px;
    height: 14px;
  }
}

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

  .products-filter-actions {
    grid-column: span 1;
    justify-content: stretch;
  }

  .products-filter-actions .btn {
    flex: 1;
  }

  .products-bulk-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }

  .products-bulk-select {
    flex: 1;
    min-width: 120px;
  }

  .products-bulk-actions .btn {
    flex-shrink: 0;
  }

  .import-card-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .product-preview-modal {
    max-height: 95vh;
  }

  .product-preview-header {
    padding: 0.75rem 1rem;
  }

  .product-preview-body {
    padding: 1rem;
    gap: 1rem;
  }

  .product-preview-main-image {
    max-height: 180px;
  }

  .product-preview-thumb {
    width: 48px;
    height: 48px;
  }
}

/* ============================================
   Product Variant Selector (Shop-style)
   ============================================ */
.variant-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.variant-dropdown-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.variant-dropdown-label {
  font-weight: 500;
  color: var(--foreground);
  min-width: 100px;
}

.variant-dropdown {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.variant-dropdown:hover {
  border-color: var(--primary);
}

.variant-dropdown:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.variant-attribute-label {
  font-weight: 600;
  color: var(--foreground);
  font-size: 0.875rem;
}

.variant-attribute-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.variant-option-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.variant-option-btn:hover {
  border-color: var(--primary);
  background: var(--accent);
}

.variant-option-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
}

.variant-option-btn.unavailable {
  opacity: 0.5;
  text-decoration: line-through;
  border-color: var(--destructive);
  color: var(--muted-foreground);
}

.variant-option-btn.unavailable:hover {
  background: transparent;
  border-color: var(--destructive);
}

.selected-variant-info {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--accent);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.variant-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
}

.variant-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.variant-detail-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.variant-detail-value {
  font-weight: 500;
  color: var(--foreground);
}

.variant-hint {
  text-align: center;
  padding: 1rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* ============================================
   Category Tree Hierarchy Styles
   ============================================ */
.tree-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  position: relative;
}

.tree-item:hover {
  background: var(--muted);
  border-radius: var(--radius);
}

/* Indentation per level */
.tree-item-level-1 {
  padding-left: 0.5rem;
}

.tree-item-level-2 {
  padding-left: 1.5rem;
}

.tree-item-level-3 {
  padding-left: 2.5rem;
}

.tree-item-level-4 {
  padding-left: 3.5rem;
}

.tree-item-level-5 {
  padding-left: 4.5rem;
}

.tree-item-level-6 {
  padding-left: 5.5rem;
}

/* Visual tree lines for subcategories */
.tree-children {
  position: relative;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.tree-children .tree-item::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  width: 0.5rem;
  height: 1px;
  background: var(--border);
}

.tree-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.tree-expand:hover {
  color: var(--foreground);
}

.tree-expand svg {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.15s ease;
}

.tree-expand.expanded svg {
  transform: rotate(90deg);
}

.tree-item-checkbox {
  flex-shrink: 0;
}

/* Selected categories count */
.selected-categories-count {
  font-size: 0.8125rem;
  color: var(--foreground);
  font-weight: 500;
}

/* Dropdown header with close button */
.tree-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.tree-dropdown-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.tree-dropdown-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.tree-dropdown-close:hover {
  background: var(--destructive);
  color: white;
}

.tree-dropdown-close svg {
  width: 14px;
  height: 14px;
}

.tree-item-label {
  font-size: 0.8125rem;
  color: var(--foreground);
  cursor: pointer;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-item-label.search-match {
  background: hsla(47, 100%, 50%, 0.2);
  color: var(--foreground);
  font-weight: 600;
  padding: 0 0.25rem;
  border-radius: 2px;
}

/* Tree container scrolling */
.tree-container {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: auto;
}

.tree-children {
  position: relative;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  min-width: max-content;
}

.badge-excluded {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  background: hsla(0, 72%, 55%, 0.15);
  color: var(--destructive);
  border-radius: var(--radius);
  font-weight: 500;
  margin-left: 0.5rem;
}

/* ============================================
   Mapping Tree Styles (Step 3 - Mapowanie)
   ============================================ */

.mapping-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .mapping-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mapping-arrow {
    transform: rotate(90deg);
    margin: 1rem 0;
  }
}

.mapping-column {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.mapping-column-header {
  padding: 1rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.mapping-column-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.mapping-column-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.mapping-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
}

.mapping-search input:focus {
  outline: none;
  border-color: var(--ring);
}

.mapping-column-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  max-height: 500px;
}

.mapping-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--muted-foreground);
}

.mapping-arrow svg {
  width: 24px;
  height: 24px;
}

/* Mapping Tree Item */
.mapping-tree-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.15s ease;
  min-height: 32px;
  position: relative;
}

/* Horizontal line connector */
.mapping-tree-item::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  width: 0.75rem;
  height: 1px;
  background-color: var(--border);
}

.mapping-tree-item:hover {
  background: var(--muted);
}

/* Level-based indentation - REMOVED to rely on structural nesting like CategoryTreeItem */

.mapping-tree-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: transform 0.2s ease, color 0.15s ease;
  flex-shrink: 0;
}

.mapping-tree-expand:hover {
  color: var(--foreground);
}

.mapping-tree-expand.expanded {
  transform: rotate(90deg);
}

.mapping-tree-expand svg {
  width: 14px;
  height: 14px;
}

.mapping-tree-item-radio {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.mapping-tree-item-label {
  font-size: 0.8125rem;
  color: var(--foreground);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.mapping-tree-item-label.search-match {
  background: hsla(47, 100%, 50%, 0.2);
  color: var(--foreground);
  font-weight: 600;
  padding: 0 0.25rem;
  border-radius: 2px;
}

.mapping-tree-children {
  position: relative;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  min-width: max-content;
  background: transparent;
  /* background: var(--secondary); */
}

.mapping-tree-item-actions {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-link-mapping,
.btn-unlink-mapping {
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-link-mapping {
  background: var(--primary);
  color: white;
}

.btn-link-mapping:hover {
  background: var(--primary-hover);
}

.btn-unlink-mapping {
  background: hsla(0, 72%, 55%, 0.1);
  color: var(--destructive);
}

.btn-unlink-mapping:hover {
  background: var(--destructive);
  color: white;
}

.mapping-linked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  background: hsla(152, 55%, 45%, 0.15);
  color: var(--success);
  border-radius: var(--radius);
  font-size: 0.625rem;
  margin-left: 0.25rem;
}

.mapping-linked-badge svg {
  width: 10px;
  height: 10px;
}

.mapping-loading,
.mapping-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.mapping-error {
  color: var(--destructive);
}

.btn-retry {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-retry:hover {
  background: var(--primary-hover);
}

/* ============================================
   30. Progress Overlay & Component
   ============================================ */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: hsla(0, 0%, 0%, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.progress-overlay.absolute {
  position: absolute;
  z-index: 10;
  border-radius: inherit;
  /* inherit from parent container if needed, or set specific */
  backdrop-filter: blur(2px);
  /* Lighter blur for contained overlay */
}

.progress-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.progress-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-overlay.show .progress-card {
  transform: translateY(0);
}

.progress-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner-spin 1s linear infinite;
}

.progress-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-message {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.progress-details {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  min-height: 1.25rem;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-bar-fill.indeterminate {
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: progress-indeterminate 1.5s infinite;
}

@keyframes progress-indeterminate {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.criteria-selection-centered {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
/* ============================================
   5. Premium Monitoring UI Components
   ============================================ */
.loading-state-enterprise { padding: 3rem; text-align: center; }
.spinner-main { width: 44px; height: 44px; animation: spin-rotate 2s linear infinite; }
.spinner-main .path { stroke: var(--primary); stroke-linecap: round; animation: spin-dash 1.5s ease-in-out infinite; }
@keyframes spin-rotate { 100% { transform: rotate(360deg); } }
@keyframes spin-dash { 0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; } }

.pulse-active { animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

.monitoring-live-container { margin-top: 1rem; border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; background: var(--card); }

.export-progress-premium { margin-top: 1.5rem; }
.phase-indicator { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.phase-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.dot-pulsing { animation: pulseSubtle 1.5s infinite; }
.progress-percentage { font-weight: 800; font-size: 1.1rem; color: var(--foreground); }

.progress-bar-wrapper { height: 12px; background: var(--secondary); border-radius: 6px; overflow: hidden; position: relative; margin: 12px 0; }
.progress-bar-fill-premium { height: 100%; background: linear-gradient(90deg, var(--primary), #10b881); border-radius: 6px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
.progress-bar-shimmer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer-bar 2s infinite; }
@keyframes shimmer-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.terminal-console { margin-top: 1.5rem; background: #0f172a; border-radius: 10px; border: 1px solid #334155; overflow: hidden; font-family: monospace; }
.terminal-header { background: #1e293b; padding: 8px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #334155; }
.terminal-buttons { display: flex; gap: 6px; }
.term-btn { width: 10px; height: 10px; border-radius: 50%; }
.term-btn.red { background: #ff5f56; } .term-btn.yellow { background: #ffbd2e; } .term-btn.green { background: #27c93f; }
.terminal-title { color: #94a3b8; font-size: 11px; }
.terminal-body { padding: 12px; font-size: 12px; line-height: 1.6; max-height: 200px; overflow-y: auto; color: #e2e8f0; }
.terminal-line { display: flex; gap: 8px; margin-bottom: 4px; }
.term-timestamp { color: #64748b; min-width: 65px; }
.term-prompt { color: #10b881; }



.btn-active { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.btn-inactive { background: var(--primary); color: white; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }

/* Utility: Text Link for wizard descriptions */
.text-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}
.text-link:hover {
  border-bottom-color: var(--primary);
  opacity: 0.8;
}
