/* ==========================================================================
   SalesOps CRM Dashboard - Premium Light Theme
   Design System CSS
   Font: DM Sans | Theme: Light Indigo
   ========================================================================== */

/* --- Google Font Import -------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=DM+Mono:wght@400;500&display=swap');

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */
:root {
  /* -- Backgrounds -------------------------------------------------------- */
  --background:       #f8fafc;
  --card:             #ffffff;
  --secondary:        #f1f5f9;
  --border:           #e2e8f0;

  /* -- Foregrounds -------------------------------------------------------- */
  --foreground:       #0f172a;
  --muted-foreground: #64748b;

  /* -- Accent (Indigo) ---------------------------------------------------- */
  --accent:            #4f46e5;
  --accent-foreground: #ffffff;

  /* -- Semantic ----------------------------------------------------------- */
  --success:     #16a34a;
  --warning:     #ca8a04;
  --destructive: #dc2626;

  /* -- Chart Palette ------------------------------------------------------ */
  --chart-1: #4f46e5;
  --chart-2: #0891b2;
  --chart-3: #d97706;
  --chart-4: #7c3aed;
  --chart-5: #16a34a;

  /* -- Sidebar ------------------------------------------------------------ */
  --sidebar-bg:         #ffffff;
  --sidebar-foreground: #0f172a;
  --sidebar-border:     #e2e8f0;
  --sidebar-accent-bg:  #f1f5f9;

  /* -- Ring / Focus ------------------------------------------------------- */
  --ring: rgba(79, 70, 229, 0.15);

  /* -- Misc --------------------------------------------------------------- */
  --orange-600: #ea580c;

  /* -- Typography Scale --------------------------------------------------- */
  --text-xs:  0.75rem;
  --text-sm:  0.875rem;
  --text-base: 1rem;
  --text-lg:  1.125rem;
  --text-xl:  1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* -- Spacing Scale (4px base) ------------------------------------------- */
  --space-0-5: 0.125rem;
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;

  /* -- Radii -------------------------------------------------------------- */
  --radius-sm:   0.125rem;
  --radius:      0.25rem;
  --radius-md:   0.375rem;
  --radius-lg:   0.5rem;
  --radius-xl:   0.75rem;
  --radius-full: 9999px;

  /* -- Transitions -------------------------------------------------------- */
  --duration-200:  200ms;
  --duration-300:  300ms;
  --duration-500:  500ms;
  --duration-700:  700ms;
  --duration-1000: 1000ms;
}

/* ==========================================================================
   2. Base / Reset
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01';
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
input, textarea, select { font: inherit; }

/* ==========================================================================
   3. Typography Utilities
   ========================================================================== */

/* -- Font Family ---------------------------------------------------------- */
.font-sans {
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01';
}

.font-mono {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* -- Font Smoothing ------------------------------------------------------- */
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -- Font Sizes ----------------------------------------------------------- */
.text-xs   { font-size: var(--text-xs);   line-height: 1rem; }
.text-sm   { font-size: var(--text-sm);   line-height: 1.25rem; }
.text-base { font-size: var(--text-base); line-height: 1.5rem; }
.text-lg   { font-size: var(--text-lg);   line-height: 1.75rem; }
.text-xl   { font-size: var(--text-xl);   line-height: 1.75rem; }
.text-2xl  { font-size: var(--text-2xl);  line-height: 2rem; }
.text-3xl  { font-size: var(--text-3xl);  line-height: 2.25rem; }

/* -- Arbitrary Font Sizes ------------------------------------------------- */
.text-\[8px\]  { font-size: 8px;  line-height: 1; }
.text-\[9px\]  { font-size: 9px;  line-height: 1; }
.text-\[10px\] { font-size: 10px; line-height: 1.2; }
.text-\[11px\] { font-size: 11px; line-height: 1.2; }

/* -- Font Weight ---------------------------------------------------------- */
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

/* -- Letter Spacing ------------------------------------------------------- */
.tracking-tight   { letter-spacing: -0.025em; }
.tracking-wider   { letter-spacing: 0.05em; }
.tracking-widest  { letter-spacing: 0.1em; }

/* -- Text Transform ------------------------------------------------------- */
.uppercase { text-transform: uppercase; }

/* -- Text Alignment ------------------------------------------------------- */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* -- Line Height ---------------------------------------------------------- */
.leading-relaxed { line-height: 1.625; }

/* -- Text Overflow -------------------------------------------------------- */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whitespace-nowrap { white-space: nowrap; }

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   4. Color Utilities
   ========================================================================== */

/* -- Text Colors ---------------------------------------------------------- */
.text-foreground        { color: var(--foreground); }
.text-muted-foreground  { color: var(--muted-foreground); }
.text-accent            { color: var(--accent); }
.text-accent-foreground { color: var(--accent-foreground); }
.text-success           { color: var(--success); }
.text-warning           { color: var(--warning); }
.text-destructive       { color: var(--destructive); }
.text-chart-2           { color: var(--chart-2); }
.text-chart-3           { color: var(--chart-3); }
.text-sidebar-foreground { color: var(--sidebar-foreground); }

/* -- Background Colors ---------------------------------------------------- */
.bg-background      { background-color: var(--background); }
.bg-card            { background-color: var(--card); }
.bg-secondary       { background-color: var(--secondary); }
.bg-accent          { background-color: var(--accent); }
.bg-destructive     { background-color: var(--destructive); }
.bg-success         { background-color: var(--success); }
.bg-warning         { background-color: var(--warning); }
.bg-sidebar         { background-color: var(--sidebar-bg); }
.bg-sidebar-accent  { background-color: var(--sidebar-accent-bg); }

/* -- Background Alpha Variants -------------------------------------------- */

/* Accent */
.bg-accent\/5  { background-color: rgba(79, 70, 229, 0.05); }
.bg-accent\/10 { background-color: rgba(79, 70, 229, 0.10); }
.bg-accent\/15 { background-color: rgba(79, 70, 229, 0.15); }
.bg-accent\/25 { background-color: rgba(79, 70, 229, 0.25); }

/* Secondary */
.bg-secondary\/40 { background-color: rgba(241, 245, 249, 0.40); }
.bg-secondary\/50 { background-color: rgba(241, 245, 249, 0.50); }
.bg-secondary\/60 { background-color: rgba(241, 245, 249, 0.60); }

/* Destructive */
.bg-destructive\/5  { background-color: rgba(220, 38, 38, 0.05); }
.bg-destructive\/10 { background-color: rgba(220, 38, 38, 0.10); }
.bg-destructive\/15 { background-color: rgba(220, 38, 38, 0.15); }

/* Success */
.bg-success\/10 { background-color: rgba(22, 163, 74, 0.10); }
.bg-success\/15 { background-color: rgba(22, 163, 74, 0.15); }

/* Warning */
.bg-warning\/5  { background-color: rgba(202, 138, 4, 0.05); }
.bg-warning\/10 { background-color: rgba(202, 138, 4, 0.10); }
.bg-warning\/15 { background-color: rgba(202, 138, 4, 0.15); }

/* Chart */
.bg-chart-2\/15   { background-color: rgba(8, 145, 178, 0.15); }
.bg-chart-3\/5    { background-color: rgba(217, 119, 6, 0.05); }

/* Orange */
.bg-orange-600\/10 { background-color: rgba(234, 88, 12, 0.10); }

/* ==========================================================================
   5. Layout Utilities
   ========================================================================== */

/* -- Display -------------------------------------------------------------- */
.hidden      { display: none !important; }
.block       { display: block; }
.inline      { display: inline; }
.flex        { display: flex; }
.inline-flex { display: inline-flex; }
.grid        { display: grid; }

/* -- Flexbox -------------------------------------------------------------- */
.flex-col  { flex-direction: column; }
.flex-1    { flex: 1 1 0%; }
.shrink-0  { flex-shrink: 0; }

.items-center   { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }

/* -- Grid Columns --------------------------------------------------------- */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.col-span-2 { grid-column: span 2 / span 2; }

/* -- Gap ------------------------------------------------------------------ */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* -- Space-Y (vertical spacing between children) -------------------------- */
.space-y-1 > * + * { margin-top: var(--space-1); }
.space-y-2 > * + * { margin-top: var(--space-2); }
.space-y-3 > * + * { margin-top: var(--space-3); }
.space-y-4 > * + * { margin-top: var(--space-4); }
.space-y-5 > * + * { margin-top: var(--space-5); }
.space-y-6 > * + * { margin-top: var(--space-6); }

/* ==========================================================================
   6. Spacing Utilities
   ========================================================================== */

/* -- Padding (all sides) -------------------------------------------------- */
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

/* -- Padding X (horizontal) ----------------------------------------------- */
.px-1 { padding-left: var(--space-1); padding-right: var(--space-1); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* -- Padding Y (vertical) ------------------------------------------------ */
.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* -- Margin --------------------------------------------------------------- */
.m-0     { margin: 0; }
.mt-0\.5 { margin-top: var(--space-0-5); }
.mt-1    { margin-top: var(--space-1); }
.mt-2    { margin-top: var(--space-2); }
.mt-3    { margin-top: var(--space-3); }
.mt-4    { margin-top: var(--space-4); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.ml-\[260px\] { margin-left: 260px; }

/* ==========================================================================
   7. Sizing Utilities
   ========================================================================== */

/* -- Width ---------------------------------------------------------------- */
.w-full { width: 100%; }
.w-2    { width: 0.5rem; }
.w-3    { width: 0.75rem; }
.w-4    { width: 1rem; }
.w-5    { width: 1.25rem; }
.w-6    { width: 1.5rem; }
.w-8    { width: 2rem; }
.w-10   { width: 2.5rem; }
.w-12   { width: 3rem; }

/* -- Height --------------------------------------------------------------- */
.h-full { height: 100%; }
.h-2    { height: 0.5rem; }
.h-3    { height: 0.75rem; }
.h-4    { height: 1rem; }
.h-5    { height: 1.25rem; }
.h-6    { height: 1.5rem; }
.h-8    { height: 2rem; }
.h-10   { height: 2.5rem; }
.h-12   { height: 3rem; }
.h-16   { height: 4rem; }

/* -- Min / Max ------------------------------------------------------------ */
.min-h-screen      { min-height: 100vh; }
.min-h-\[200px\]   { min-height: 200px; }
.max-h-\[260px\]   { max-height: 260px; }
.max-h-\[340px\]   { max-height: 340px; }
.max-w-xl          { max-width: 36rem; }

/* -- Overflow ------------------------------------------------------------- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ==========================================================================
   8. Border Utilities
   ========================================================================== */
.border   { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

.border-border          { border-color: var(--border); }
.border-border\/40       { border-color: rgba(226, 232, 240, 0.40); }
.border-sidebar-border  { border-color: var(--sidebar-border); }

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

/* ==========================================================================
   9. Effects & Decoration
   ========================================================================== */
.shadow-lg {
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px  6px -4px rgba(0, 0, 0, 0.05);
}

.backdrop-blur-sm { backdrop-filter: blur(4px); }

.ring-2           { box-shadow: 0 0 0 2px var(--ring); }
.ring-transparent { --tw-ring-color: transparent; box-shadow: 0 0 0 2px transparent; }

/* -- Opacity -------------------------------------------------------------- */
.opacity-0   { opacity: 0; }
.opacity-60  { opacity: 0.60; }
.opacity-75  { opacity: 0.75; }
.opacity-85  { opacity: 0.85; }
.opacity-100 { opacity: 1; }

.pointer-events-none { pointer-events: none; }

/* ==========================================================================
   10. Position Utilities
   ========================================================================== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0   { top: 0; }
.left-0  { left: 0; }

.z-30 { z-index: 30; }
.z-40 { z-index: 40; }

/* ==========================================================================
   11. Transition Utilities
   ========================================================================== */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: var(--duration-200);
}

.transition-colors {
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: var(--duration-200);
}

.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: var(--duration-200);
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: var(--duration-200);
}

.duration-200  { transition-duration: var(--duration-200); }
.duration-300  { transition-duration: var(--duration-300); }
.duration-500  { transition-duration: var(--duration-500); }
.duration-700  { transition-duration: var(--duration-700); }
.duration-1000 { transition-duration: var(--duration-1000); }

.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }

/* ==========================================================================
   12. Gradient Utility
   ========================================================================== */
.bg-gradient-to-br {
  --tw-gradient-from: transparent;
  --tw-gradient-to:   transparent;
  background-image: linear-gradient(
    to bottom right,
    var(--tw-gradient-from),
    var(--tw-gradient-to)
  );
}

/* ==========================================================================
   13. Hover / State Utilities
   ========================================================================== */

/* -- Group Pattern -------------------------------------------------------- */
.group { position: relative; }

.group:hover .group-hover\:scale-110    { transform: scale(1.10); }
.group:hover .group-hover\:text-accent  { color: var(--accent); }
.group:hover .group-hover\:bg-accent\/10 { background-color: rgba(79, 70, 229, 0.10); }
.group:hover .group-hover\:opacity-100  { opacity: 1; }

/* -- Hover Backgrounds ---------------------------------------------------- */
.hover\:bg-secondary\/50:hover { background-color: rgba(241, 245, 249, 0.50); }
.hover\:bg-secondary\/20:hover { background-color: rgba(241, 245, 249, 0.20); }
.hover\:bg-accent\/10:hover    { background-color: rgba(79, 70, 229, 0.10); }
.hover\:bg-accent\/25:hover    { background-color: rgba(79, 70, 229, 0.25); }
.hover\:bg-sidebar-accent\/50:hover { background-color: rgba(241, 245, 249, 0.50); }

/* -- Hover Borders -------------------------------------------------------- */
.hover\:border-accent\/40:hover      { border-color: rgba(79, 70, 229, 0.40); }
.hover\:border-accent\/50:hover      { border-color: rgba(79, 70, 229, 0.50); }
.hover\:border-success\/40:hover     { border-color: rgba(22, 163, 74, 0.40); }
.hover\:border-warning\/40:hover     { border-color: rgba(202, 138, 4, 0.40); }
.hover\:border-destructive\/40:hover { border-color: rgba(220, 38, 38, 0.40); }
.hover\:border-chart-3\/40:hover     { border-color: rgba(217, 119, 6, 0.40); }

/* -- Hover Text ----------------------------------------------------------- */
.hover\:text-foreground:hover  { color: var(--foreground); }
.hover\:text-accent\/80:hover  { color: rgba(79, 70, 229, 0.80); }

/* -- Hover Ring ----------------------------------------------------------- */
.hover\:ring-accent\/50:hover {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.50);
}

/* ==========================================================================
   14. Animations
   ========================================================================== */

/* -- Spin ----------------------------------------------------------------- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

/* -- Pulse ---------------------------------------------------------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* -- Ping ----------------------------------------------------------------- */
@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }

/* ==========================================================================
   15. Responsive Breakpoints
   ========================================================================== */

/* -- sm: 640px ------------------------------------------------------------ */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* -- md: 768px ------------------------------------------------------------ */
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex         { display: flex; }
}

/* -- lg: 1024px ----------------------------------------------------------- */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:col-span-2  { grid-column: span 2 / span 2; }
  .lg\:col-span-3  { grid-column: span 3 / span 3; }
}

/* ==========================================================================
   16. Component: Navigation
   ========================================================================== */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted-foreground);
  transition: all var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
}

.nav-item:hover {
  color: var(--foreground);
  background-color: rgba(241, 245, 249, 0.50);
}

.nav-item.active {
  color: var(--accent);
  background-color: rgba(79, 70, 229, 0.10);
}

.nav-item.active .nav-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: var(--radius-full);
  background-color: var(--accent);
}

.nav-indicator {
  transition: all var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   17. Component: Kanban Card
   ========================================================================== */
.kanban-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  transition: all var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

.kanban-card:hover {
  border-color: rgba(79, 70, 229, 0.30);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px  6px -4px rgba(0, 0, 0, 0.05);
}

.kanban-card:active {
  cursor: grabbing;
}

/* ==========================================================================
   18. Component: Badges
   ========================================================================== */
.badge-won {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background-color: rgba(22, 163, 74, 0.10);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.20);
}

.badge-pending {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background-color: rgba(202, 138, 4, 0.10);
  color: var(--warning);
  border: 1px solid rgba(202, 138, 4, 0.20);
}

.badge-lost {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background-color: rgba(220, 38, 38, 0.10);
  color: var(--destructive);
  border: 1px solid rgba(220, 38, 38, 0.20);
}

/* ==========================================================================
   19. Component: Table
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

thead th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(226, 232, 240, 0.40);
  color: var(--foreground);
  vertical-align: middle;
}

tbody tr {
  transition: background-color var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1);
}

tbody tr:hover {
  background-color: rgba(241, 245, 249, 0.50);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   20. Custom Scrollbar (Webkit)
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background-color: rgba(100, 116, 139, 0.20);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.40);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.20) transparent;
}

/* ==========================================================================
   21. Page Transitions
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-enter {
  animation: fadeIn var(--duration-300) ease-out forwards;
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
  transition: color var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1),
              background-color var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1),
              border-color var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   22. Print Media CSS
   ========================================================================== */
@media print {
  /* Hide interactive/non-content elements */
  #sidebar, 
  header, 
  .print-btn,
  #sync-status,
  #kpi-modal,
  .print\:hidden {
    display: none !important;
  }
  
  /* Reset margins for printing area */
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
  }
  
  #main-area {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  
  /* Show all page-content panels when printing full report */
  body.printing-full-report .page-content {
    display: block !important;
    opacity: 1 !important;
    page-break-after: always !important;
  }
  
  /* Show only active page panel when printing active only */
  body.printing-active-only .page-content:not(.active-print-panel) {
    display: none !important;
  }
  body.printing-active-only .page-content.active-print-panel {
    display: block !important;
    opacity: 1 !important;
  }
  
  /* Ensure clean card layout without background shading */
  .bg-card, .bg-secondary, .bg-secondary\/40 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
  }
  
  /* Avoid breaking pages inside cards */
  .bg-card, tr, table {
    page-break-inside: avoid !important;
  }
  
  /* Ensure canvas charts display nicely */
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* ==========================================================================
   23. CEO Dashboard Enhancements
   ========================================================================== */

/* -- Executive Summary Cards ---------------------------------------------- */
.exec-summary-card {
  background: linear-gradient(135deg, var(--card) 0%, var(--secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.trend-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
}

.trend-up {
  background-color: rgba(22, 163, 74, 0.10);
  color: var(--success);
}

.trend-down {
  background-color: rgba(220, 38, 38, 0.10);
  color: var(--destructive);
}

.trend-neutral {
  background-color: rgba(100, 116, 139, 0.10);
  color: var(--muted-foreground);
}

/* -- Insight Badge -------------------------------------------------------- */
.insight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
}

.insight-badge.critical {
  background-color: rgba(220, 38, 38, 0.08);
  color: var(--destructive);
  border-color: rgba(220, 38, 38, 0.20);
}

.insight-badge.warning {
  background-color: rgba(202, 138, 4, 0.08);
  color: var(--warning);
  border-color: rgba(202, 138, 4, 0.20);
}

.insight-badge.success {
  background-color: rgba(22, 163, 74, 0.08);
  color: var(--success);
  border-color: rgba(22, 163, 74, 0.20);
}

/* -- Action Card ---------------------------------------------------------- */
.action-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  transition: all var(--duration-200);
}

.action-card:hover {
  border-color: rgba(79, 70, 229, 0.30);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.action-card.priority-high {
  border-left: 3px solid var(--destructive);
}

.action-card.priority-medium {
  border-left: 3px solid var(--warning);
}

.action-card.priority-low {
  border-left: 3px solid var(--success);
}

/* -- Progress Ring -------------------------------------------------------- */
.progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring .progress-text {
  position: absolute;
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
}

/* -- Mini Sparkline Container --------------------------------------------- */
.sparkline-container {
  position: relative;
  height: 40px;
  width: 100%;
}

/* -- Section Divider ------------------------------------------------------ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 50%, transparent 100%);
  margin: var(--space-6) 0;
}

/* -- Glass Card Effect ---------------------------------------------------- */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: var(--radius-xl);
}

/* ==========================================================================
   End of CEO Dashboard Enhancements
   ========================================================================== */
