:root {
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'Courier New', monospace;
  --scrollbar-track-color: transparent;
  --scrollbar-track-shape: 5px;
  --scrollbar-track-thickness: 7px;
  --scrollbar-thumb-color: #d1d5db;
  --scrollbar-thumb-hover-color: #9ca3af;
  --scrollbar-thumb-shape: 5px;
  --scrollbar-thumb-min-size: 40;
  --scrollbar-hover-opacity-transition-leave-duration: 0.3s;
  --scrollbar-hover-opacity-transition-leave-delay: 0.5s;
}

* {
  border-color: var(--border);
  outline-color: color-mix(in srgb, var(--ring) 50%, transparent);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
  background-color: #9ca3af;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.dark ::-webkit-scrollbar-thumb {
  background-color: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover,
.dark ::-webkit-scrollbar-thumb:active {
  background-color: #6b7280;
}

.dark {
  --scrollbar-thumb-color: #4b5563;
  --scrollbar-thumb-hover-color: #6b7280;
  --input-autofill: oklch(0.25 0.03 265.94);
}

:root.dark,
:root[z-theme].dark {
  --background: #202227 !important;
  --shadow-0: 0px 4px 8px 0px #02020312;
  --shadow-1: 0px 4px 8px 0px #02020329;
  --shadow-2: 0px 8px 16px 0px #02020352;
  --shadow-3: 0px 16px 32px 0px #0202037a;
  --shadow-card: var(--shadow-0) !important;
  --shadow-card-md: var(--shadow-1) !important;
  --shadow-card-lg: var(--shadow-2) !important;
  --shadow-card-soft: var(--shadow-3) !important;
}

/* ==================== Utility Classes ==================== */

@layer utilities {
  .shadow-0 {
    box-shadow: var(--shadow-0);
  }

  .shadow-1 {
    box-shadow: var(--shadow-1);
  }

  .shadow-2 {
    box-shadow: var(--shadow-2);
  }

  .shadow-3 {
    box-shadow: var(--shadow-3);
  }

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

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

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

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

/* ==================== CDK Drag-Drop Styles ==================== */

/* Drag Preview - Element being dragged */
.cdk-drag-preview {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  background-color: var(--card);
  z-index: 10000 !important;
  pointer-events: none;
  opacity: 1;
  padding: 1rem;
}

.dark .cdk-drag-preview {
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Drag Placeholder - Empty space where item was */
.cdk-drag-placeholder {
  background-color: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 2px dashed var(--primary);
  border-radius: 6px;
  opacity: 0.8;
  visibility: visible;
}

.cdk-drag-placeholder * {
  opacity: 0;
}

/* Drag Animation - Item movement transition */
.cdk-drag-animating {
  transition: transform 100ms cubic-bezier(0, 0, 0.2, 1);
}

/* Drop List Animation - Smooth sorting transition */
.cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder) {
  transition: transform 100ms cubic-bezier(0, 0, 0.2, 1);
}

/* Dragging Item - No transition during drag */
.cdk-drag-dragging {
  transition: none !important;
}
