/* =====================================================
   TradeVyzr Design System
   Global styles for consistency and polish
   ===================================================== */

/* =====================================================
   Design Tokens - Spacing Scale (8px grid)
   ===================================================== */
/* html base font-size (10px) lives in tokens.css */

:root {
  /* Spacing */
  --space-1: 0.25rem;   /* 3px */
  --space-2: 0.5rem;    /* 6px */
  --space-3: 0.75rem;   /* 9px */
  --space-4: 1rem;      /* 12px */
  --space-5: 1.25rem;   /* 15px */
  --space-6: 1.5rem;    /* 18px */
  --space-8: 2rem;      /* 24px */
  --space-10: 2.5rem;   /* 30px */
  --space-12: 3rem;     /* 36px */

  /* Border radius sm/md/lg live in tokens.css */
  --radius-full: 9999px;

  /* Typography Scale */
  --text-xs: var(--fs-xs);    /* legacy names -> type scale (tokens.css) */
  --text-sm: var(--fs-md);
  --text-base: var(--fs-base);
  --text-lg: var(--fs-base);
  --text-xl: var(--fs-lg);
  --text-2xl: var(--fs-xl);
  --text-3xl: var(--fs-2xl);

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-bounce: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25);

  /* Focus ring */
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--primary) 40%, transparent);
  --focus-ring-light: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}

[data-theme="light"] {
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   Global Transitions
   ===================================================== */
button,
a,
input,
select,
textarea,
.btn,
.card,
.nav-item,
.table tr,
.badge,
.ds-modal-content {
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

/* =====================================================
   Focus States - Accessibility
   ===================================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

/* Form inputs focus */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-control:focus-visible {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: var(--focus-ring);
}

/* Button focus */
button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Link focus */
a:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* =====================================================
   Custom Checkbox Styling
   ===================================================== */
.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: var(--space-2);
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox .checkmark {
  width: 18px;
  height: 18px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.custom-checkbox:hover .checkmark {
  border-color: var(--accent-purple);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.custom-checkbox input:checked ~ .checkmark {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}

.custom-checkbox .checkmark::after {
  content: '';
  display: none;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.custom-checkbox input:checked ~ .checkmark::after {
  display: block;
}

.custom-checkbox input:focus-visible ~ .checkmark {
  box-shadow: var(--focus-ring);
}

/* =====================================================
   Loading Skeleton
   ===================================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    color-mix(in srgb, var(--primary) 10%, transparent) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-md);
}

.skeleton-row {
  height: 48px;
  margin-bottom: var(--space-2);
}

.skeleton-circle {
  border-radius: var(--radius-full);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

[data-theme="light"] .skeleton {
  background: linear-gradient(
    90deg,
    #dde2dc 25%,
    color-mix(in srgb, var(--primary) 8%, transparent) 50%,
    #dde2dc 75%
  );
  background-size: 200% 100%;
}

/* =====================================================
   Empty States
   ===================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-4);
  opacity: 0.5;
  color: var(--accent-purple);
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--text-sm);
  max-width: 300px;
  line-height: 1.6;
}

.empty-state-action {
  margin-top: var(--space-6);
}

/* =====================================================
   Toast Notifications with Animation
   ===================================================== */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  min-width: 300px;
  max-width: 450px;
  animation: toast-slide-in 0.3s ease-out;
}

.toast.toast-exiting {
  animation: toast-slide-out 0.25s ease-in forwards;
}

.toast-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.toast-message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toast-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Toast variants */
.toast-success {
  border-left: 4px solid var(--success);
}
.toast-success .toast-icon {
  color: var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}
.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}
.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 4px solid var(--accent-purple);
}
.toast-info .toast-icon {
  color: var(--accent-purple);
}

@keyframes toast-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* =====================================================
   Improved Button Styles
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-dark));
  color: white;
  border-color: var(--accent-purple-dark);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--primary) 30%, transparent);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-purple-light), var(--accent-purple));
  box-shadow: 0 4px 8px color-mix(in srgb, var(--primary) 40%, transparent);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-purple);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  border-color: #059669;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  border-color: #dc2626;
}

/* Button sizes */
.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
}

/* =====================================================
   Card Improvements with Hover States
   ===================================================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: var(--space-5);
}

.card-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.05);
}

/* Highlight cards (P&L, important metrics) */
.card-highlight {
  border-left: 4px solid var(--accent-purple);
}

.card-highlight-success {
  border-left: 4px solid var(--success);
}

.card-highlight-danger {
  border-left: 4px solid var(--danger);
}

/* =====================================================
   Table Improvements
   ===================================================== */
.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-modern thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-modern th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: var(--font-semibold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.table-modern th.sortable {
  cursor: pointer;
  user-select: none;
}

.table-modern th.sortable:hover {
  background: var(--bg-tertiary);
}

.table-modern th .sort-indicator {
  display: inline-flex;
  margin-left: var(--space-1);
  opacity: 0.3;
  font-size: 0.7em;
}

.table-modern th.sorted .sort-indicator {
  opacity: 1;
  color: var(--accent-purple);
}

.table-modern td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

/* Alternating rows */
.table-striped tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--primary) 3%, transparent);
}

[data-theme="light"] .table-striped tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--primary) 2%, transparent);
}

/* Row hover */
.table-modern tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

[data-theme="light"] .table-modern tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

/* =====================================================
   Form Group Styling with Section Dividers
   ===================================================== */
.form-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--accent-purple);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: var(--focus-ring);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--space-1);
}

/* Info icon tooltip */
.tag-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-style: italic;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.tag-info-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.tag-info-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-secondary);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Inline form row */
.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row .form-group {
  flex: 1;
}

/* =====================================================
   Modal Improvements (Design System)
   Use .ds-modal class for these styles - does not affect existing Bootstrap modals
   ===================================================== */
.ds-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  animation: ds-modal-backdrop-in 0.2s ease-out;
}

.ds-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  animation: ds-modal-slide-in 0.25s ease-out;
}

/* Standardized modal sizes for ds-modal */
.ds-modal-sm { max-width: 400px; }
.ds-modal-md { max-width: 560px; }
.ds-modal-lg { max-width: 720px; }
.ds-modal-xl { max-width: 900px; }

.ds-modal .ds-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

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

.ds-modal .ds-modal-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.ds-modal .ds-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.ds-modal .ds-modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.ds-modal .ds-modal-body {
  padding: var(--space-5);
}

.ds-modal .ds-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.03);
}

@keyframes ds-modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ds-modal-slide-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* =====================================================
   Badge Improvements
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-info {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--accent-purple);
}

.badge-neutral {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* =====================================================
   Stat Card Improvements
   ===================================================== */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  box-shadow: var(--shadow-md);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.stat-card-label {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--accent-purple);
  font-size: var(--text-lg);
}

.stat-card-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card-value.positive {
  color: var(--success);
}

.stat-card-value.negative {
  color: var(--danger);
}

.stat-card-change {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

.stat-card-change.positive {
  color: var(--success);
}

.stat-card-change.negative {
  color: var(--danger);
}

/* Primary stat card (larger, more prominent) */
.stat-card-primary {
  border-left: 4px solid var(--accent-purple);
}

.stat-card-primary .stat-card-value {
  font-size: var(--text-3xl);
}

/* =====================================================
   Strategy Editor - Nesting Visualization
   ===================================================== */
.rule-group {
  position: relative;
  padding-left: var(--space-5);
  margin-left: var(--space-4);
  border-left: 2px solid var(--border);
}

.rule-group::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-purple);
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.rule-group:hover::before {
  opacity: 1;
}

/* Nesting depth colors */
.rule-group[data-depth="1"] { border-left-color: var(--accent-purple); }
.rule-group[data-depth="2"] { border-left-color: var(--success); }
.rule-group[data-depth="3"] { border-left-color: var(--warning); }
.rule-group[data-depth="4"] { border-left-color: var(--danger); }

/* Collapsible rule details */
.rule-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  overflow: hidden;
}

.rule-item-header {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.rule-item-header:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.rule-item-toggle {
  margin-right: var(--space-3);
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.rule-item.expanded .rule-item-toggle {
  transform: rotate(90deg);
}

.rule-item-summary {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.rule-item-actions {
  display: flex;
  gap: var(--space-1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.rule-item-header:hover .rule-item-actions {
  opacity: 1;
}

.rule-item-details {
  display: none;
  padding: var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.rule-item.expanded .rule-item-details {
  display: block;
}

/* Kebab menu for actions */
.kebab-menu {
  position: relative;
}

.kebab-menu-trigger {
  background: none;
  border: none;
  padding: var(--space-2);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.kebab-menu-trigger:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.kebab-menu-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: var(--space-1);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
}

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

.kebab-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.kebab-menu-item:hover {
  background: var(--bg-tertiary);
}

.kebab-menu-item.danger {
  color: var(--danger);
}

.kebab-menu-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-1) 0;
}

/* =====================================================
   Utility Classes
   ===================================================== */
/* Text colors */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-accent { color: var(--accent-purple) !important; }

/* Font sizes */
.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-xl { font-size: var(--text-xl) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }

/* Font weights */
.font-normal { font-weight: var(--font-normal) !important; }
.font-medium { font-weight: var(--font-medium) !important; }
.font-semibold { font-weight: var(--font-semibold) !important; }
.font-bold { font-weight: var(--font-bold) !important; }

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.p-0 { padding: 0 !important; }
.p-2 { padding: var(--space-2) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-6 { padding: var(--space-6) !important; }

/* Flex utilities */
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.items-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-4 { gap: var(--space-4) !important; }

/* Border radius */
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }
