/**
 * =====================================================================
 * WAPPURA - shadcn/ui Design System
 * Inspired by https://ui.shadcn.com/create
 * Pure Vanilla CSS with HSL/OKLCH tokens, Dark/Light mode & Lucide icons
 * =====================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap');

:root {
    /* Base HSL Colors - Light Mode (Zinc Clean) */
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;
    
    /* WhatsApp / Commerce Brand Accent (Emerald / WhatsApp Green) */
    --emerald-brand: 158 64% 42%;
    --emerald-hover: 158 64% 36%;
    --emerald-subtle: 150 60% 96%;
    --emerald-text: 160 84% 28%;

    --radius: 0.5rem; /* 8px - signature shadcn UI radius */
    --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark Mode - Zinc / Modern Dark Palette (ui.shadcn.com signature) */
.dark, [data-theme="dark"], body.dark-mode {
    --background: 240 10% 3.9%;     /* #09090b */
    --foreground: 0 0% 98%;         /* #fafafa */
    --card: 240 10% 4.9%;           /* #0c0c0e - slightly elevated surface */
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 4.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;           /* #fafafa */
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;    /* #27272a */
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;        /* #27272a */
    --muted-foreground: 240 5% 64.9%; /* #a1a1aa */
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;       /* #27272a */
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
    
    --emerald-brand: 158 64% 45%;
    --emerald-hover: 158 64% 39%;
    --emerald-subtle: 158 64% 12%;
    --emerald-text: 150 80% 65%;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

/* =====================================================================
   DASHBOARD APARIENCIA PANEL - SHADCN UI PRESET THEMES
   ===================================================================== */

/* 1. NOVA EMERALD & AMBER (Preset b1FQzMTUe: Style Nova, Base Stone, Theme Emerald, Chart Amber) */
html[data-dashboard-theme="nova-emerald"] {
    --radius: 0.625rem;              /* 10px - Nova signature radius */
    --background: 0 0% 100%;
    --foreground: 20 14.3% 4.1%;     /* Stone 950 */
    --card: 0 0% 100%;
    --card-foreground: 20 14.3% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 20 14.3% 4.1%;
    --primary: 160 84% 39%;         /* emerald-600 #059669 */
    --primary-foreground: 150 80% 98%; /* #ecfdf5 */
    --secondary: 60 4.8% 95.9%;      /* stone-100 #f5f5f4 */
    --secondary-foreground: 20 14.3% 4.1%;
    --muted: 60 4.8% 95.9%;
    --muted-foreground: 25 5.3% 44.7%; /* stone-500 #78716c */
    --accent: 60 4.8% 95.9%;
    --accent-foreground: 20 14.3% 4.1%;
    --border: 20 5.9% 90%;          /* stone-200 #e7e5e4 */
    --input: 20 5.9% 90%;
    --ring: 160 84% 39%;
    --chart-primary: #f59e0b;        /* amber-500 */
    --chart-1: 38 92% 50%;          /* amber-500 #f59e0b */
    --chart-2: 32 95% 44%;          /* amber-600 #d97706 */
    --chart-3: 26 90% 37%;          /* amber-700 #b45309 */
    --chart-4: 21 86% 31%;          /* amber-800 #92400e */
    --chart-5: 15 79% 24%;          /* amber-900 #78350f */
    --emerald-brand: 160 84% 39%;
}

html.dark[data-dashboard-theme="nova-emerald"],
[data-theme="dark"][data-dashboard-theme="nova-emerald"] {
    --radius: 0.625rem;              /* 10px */
    --background: 20 14.3% 4.1%;     /* Stone 950 #0c0a09 */
    --foreground: 60 9.1% 97.8%;     /* Stone 50 #fafaf9 */
    --card: 24 9.8% 10%;             /* Stone 900 #1c1917 */
    --card-foreground: 60 9.1% 97.8%;
    --popover: 24 9.8% 10%;
    --popover-foreground: 60 9.1% 97.8%;
    --primary: 160 84% 39%;         /* emerald-600 #059669 */
    --primary-foreground: 150 80% 98%;
    --secondary: 12 6.5% 15.1%;      /* Stone 800 #292524 */
    --secondary-foreground: 60 9.1% 97.8%;
    --muted: 12 6.5% 15.1%;          /* Stone 800 #292524 */
    --muted-foreground: 24 5.4% 63.9%; /* Stone 400 #a8a29e */
    --accent: 12 6.5% 15.1%;
    --accent-foreground: 60 9.1% 97.8%;
    --border: 12 6.5% 15.1%;         /* Stone 800 subtle border */
    --input: 12 6.5% 15.1%;
    --ring: 160 84% 39%;
    --chart-primary: #f59e0b;        /* amber-500 */
    --chart-1: 38 92% 50%;          /* amber-500 #f59e0b */
    --chart-2: 32 95% 44%;          /* amber-600 #d97706 */
    --chart-3: 26 90% 37%;          /* amber-700 #b45309 */
    --chart-4: 21 86% 31%;          /* amber-800 #92400e */
    --chart-5: 15 79% 24%;          /* amber-900 #78350f */
    --emerald-brand: 160 84% 39%;
}

html[data-dashboard-theme="nova-emerald"] .card {
    border-radius: 0.625rem;
}

/* 2. RHEA AMBER & EMERALD (Preset b2Dck2kzo: Base Stone + Amber Primary + Emerald Charts) */
html[data-dashboard-theme="rhea-amber"] {
    --radius: 1rem;
    --background: 60 4.8% 95.9%;     /* stone-100 #f5f5f4 warm clean */
    --foreground: 20 14.3% 4.1%;     /* stone-950 #0c0a09 */
    --card: 0 0% 100%;               /* white #ffffff */
    --card-foreground: 20 14.3% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 20 14.3% 4.1%;
    --primary: 24.6 95% 45%;         /* warm amber / burnt orange */
    --primary-foreground: 60 9.1% 97.8%;
    --secondary: 60 4.8% 90%;        /* stone-200 */
    --secondary-foreground: 20 14.3% 4.1%;
    --muted: 60 4.8% 90%;
    --muted-foreground: 25 5.3% 44.7%; /* stone-500 */
    --accent: 60 4.8% 90%;
    --accent-foreground: 20 14.3% 4.1%;
    --border: 20 5.9% 88%;
    --input: 20 5.9% 88%;
    --ring: 24.6 95% 45%;
    --chart-primary: #10b981;
    --emerald-brand: 160 84% 39%;
}

html.dark[data-dashboard-theme="rhea-amber"],
[data-theme="dark"][data-dashboard-theme="rhea-amber"] {
    --radius: 1rem;
    --background: 20 14.3% 4.1%;     /* stone-950 #0c0a09 deep warm slate */
    --foreground: 60 9.1% 97.8%;     /* stone-50 #fafaf9 */
    --card: 24 9.8% 10%;             /* stone-900 #1c1917 warm elevated card */
    --card-foreground: 60 9.1% 97.8%;
    --popover: 24 9.8% 10%;
    --popover-foreground: 60 9.1% 97.8%;
    --primary: 38 92% 50%;           /* amber-500 #d97706 warm glowing amber */
    --primary-foreground: 20 14.3% 4.1%;
    --secondary: 12 6.5% 15.1%;      /* stone-800 #292524 */
    --secondary-foreground: 60 9.1% 97.8%;
    --muted: 12 6.5% 15.1%;
    --muted-foreground: 24 5.4% 63.9%; /* stone-400 #a8a29e */
    --accent: 12 6.5% 15.1%;
    --accent-foreground: 60 9.1% 97.8%;
    --border: 12 6.5% 15.1%;         /* stone-800 subtle border */
    --input: 12 6.5% 15.1%;
    --ring: 38 92% 50%;
    --chart-primary: #10b981;
    --emerald-brand: 160 84% 45%;
}

/* 2. RHEA ROSE & TEAL (Preset b5eYcm4WG: Base Stone + Rose Primary + Teal Charts) */
html[data-dashboard-theme="rhea-rose"] {
    --radius: 1rem;
    --background: 60 4.8% 95.9%;     /* stone-100 #f5f5f4 warm clean */
    --foreground: 20 14.3% 4.1%;     /* stone-950 #0c0a09 */
    --card: 0 0% 100%;               /* white #ffffff */
    --card-foreground: 20 14.3% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 20 14.3% 4.1%;
    --primary: 346.8 77.2% 49.8%;    /* rose-600 #e11d48 vibrant rose */
    --primary-foreground: 355.7 100% 97.3%; /* rose-50 #fff1f2 */
    --secondary: 60 4.8% 90%;        /* stone-200 */
    --secondary-foreground: 20 14.3% 4.1%;
    --muted: 60 4.8% 90%;
    --muted-foreground: 25 5.3% 44.7%; /* stone-500 */
    --accent: 60 4.8% 90%;
    --accent-foreground: 20 14.3% 4.1%;
    --border: 20 5.9% 88%;
    --input: 20 5.9% 88%;
    --ring: 346.8 77.2% 49.8%;
    --chart-primary: #14b8a6;
    --chart-1: 173 80% 40%;          /* teal-500 #14b8a6 */
    --chart-2: 171 77% 50%;          /* cyan-teal #2dd4bf */
    --chart-3: 173 58% 39%;          /* deep teal #0d9488 */
    --chart-4: 168 76% 50%;
    --chart-5: 160 84% 39%;
    --emerald-brand: 346.8 77.2% 49.8%;
}

html.dark[data-dashboard-theme="rhea-rose"],
[data-theme="dark"][data-dashboard-theme="rhea-rose"] {
    --radius: 1rem;
    --background: 20 14.3% 4.1%;     /* stone-950 #0c0a09 deep warm slate */
    --foreground: 60 9.1% 97.8%;     /* stone-50 #fafaf9 */
    --card: 24 9.8% 10%;             /* stone-900 #1c1917 warm elevated card */
    --card-foreground: 60 9.1% 97.8%;
    --popover: 24 9.8% 10%;
    --popover-foreground: 60 9.1% 97.8%;
    --primary: 346.8 77.2% 49.8%;    /* rose-600 #e11d48 vibrant rose */
    --primary-foreground: 355.7 100% 97.3%; /* rose-50 #fff1f2 */
    --secondary: 12 6.5% 15.1%;      /* stone-800 #292524 */
    --secondary-foreground: 60 9.1% 97.8%;
    --muted: 12 6.5% 15.1%;
    --muted-foreground: 24 5.4% 63.9%; /* stone-400 #a8a29e */
    --accent: 12 6.5% 15.1%;
    --accent-foreground: 60 9.1% 97.8%;
    --border: 12 6.5% 15.1%;         /* stone-800 subtle border */
    --input: 12 6.5% 15.1%;
    --ring: 346.8 77.2% 49.8%;
    --chart-primary: #14b8a6;
    --chart-1: 173 80% 40%;          /* teal-500 #14b8a6 */
    --chart-2: 171 77% 50%;          /* cyan-teal #2dd4bf */
    --chart-3: 173 58% 39%;          /* deep teal #0d9488 */
    --chart-4: 168 76% 50%;
    --chart-5: 160 84% 39%;
    --emerald-brand: 346.8 77.2% 49.8%;
}

/* 2.5 RHEA CYAN & LIME (Preset b3T3PouYD: Style Rhea + Base Stone + Cyan Primary + Lime Charts) */
html[data-dashboard-theme="rhea-cyan"] {
    --radius: 1rem;
    --background: 60 4.8% 95.9%;     /* stone-100 #f5f5f4 warm clean */
    --foreground: 20 14.3% 4.1%;     /* stone-950 #0c0a09 */
    --card: 0 0% 100%;               /* white #ffffff */
    --card-foreground: 20 14.3% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 20 14.3% 4.1%;
    --primary: 193 100% 29%;         /* deep cyan / ocean teal #007595 */
    --primary-foreground: 180 100% 98%; /* #f0fdfa */
    --secondary: 60 4.8% 90%;        /* stone-200 */
    --secondary-foreground: 20 14.3% 4.1%;
    --muted: 60 4.8% 90%;
    --muted-foreground: 25 5.3% 44.7%; /* stone-500 */
    --accent: 60 4.8% 90%;
    --accent-foreground: 20 14.3% 4.1%;
    --border: 20 5.9% 88%;
    --input: 20 5.9% 88%;
    --ring: 193 100% 29%;
    --chart-primary: #84cc16;        /* lime-500 */
    --chart-1: 81 88% 64%;          /* lime-400 #bbf451 */
    --chart-2: 84 100% 41%;         /* lime-600 #7ccf00 */
    --chart-3: 86 100% 32%;         /* lime-700 #5ea500 */
    --chart-4: 87 90% 25%;          /* lime-800 */
    --chart-5: 88 80% 20%;          /* lime-900 */
    --emerald-brand: 193 100% 29%;
}

html.dark[data-dashboard-theme="rhea-cyan"],
[data-theme="dark"][data-dashboard-theme="rhea-cyan"] {
    --radius: 1rem;
    --background: 20 14.3% 4.1%;     /* stone-950 #0c0a09 deep warm slate */
    --foreground: 60 9.1% 97.8%;     /* stone-50 #fafaf9 */
    --card: 24 9.8% 10%;             /* stone-900 #1c1917 warm elevated card */
    --card-foreground: 60 9.1% 97.8%;
    --popover: 24 9.8% 10%;
    --popover-foreground: 60 9.1% 97.8%;
    --primary: 193 100% 31%;         /* deep cyan #0891b2 / #006d8a */
    --primary-foreground: 180 100% 98%; /* #f0fdfa */
    --secondary: 12 6.5% 15.1%;      /* stone-800 #292524 */
    --secondary-foreground: 60 9.1% 97.8%;
    --muted: 12 6.5% 15.1%;
    --muted-foreground: 24 5.4% 63.9%; /* stone-400 #a8a29e */
    --accent: 12 6.5% 15.1%;
    --accent-foreground: 60 9.1% 97.8%;
    --border: 12 6.5% 15.1%;         /* stone-800 subtle border */
    --input: 12 6.5% 15.1%;
    --ring: 193 100% 31%;
    --chart-primary: #84cc16;        /* lime-500 #84cc16 */
    --chart-1: 81 88% 64%;          /* lime-400 #bbf451 */
    --chart-2: 84 100% 41%;         /* lime-600 #7ccf00 */
    --chart-3: 86 100% 32%;         /* lime-700 #5ea500 */
    --chart-4: 87 90% 25%;
    --chart-5: 88 80% 20%;
    --emerald-brand: 193 100% 31%;
}

/* 2.6 RHEA BLUE & PINK (Preset b2xviKjPKr: Style Rhea + Base Mauve + Blue Primary + Pink Charts) */
html[data-dashboard-theme="rhea-blue"] {
    --radius: 0.625rem;
    --background: 0 0% 100%;
    --foreground: 300 14% 4%;        /* mauve-950 #0c090c */
    --card: 0 0% 100%;
    --card-foreground: 300 14% 4%;
    --popover: 0 0% 100%;
    --popover-foreground: 300 14% 4%;
    --primary: 225 84% 49%;         /* electric royal blue #1447e6 */
    --primary-foreground: 0 0% 100%;
    --secondary: 300 10% 96%;
    --secondary-foreground: 300 14% 4%;
    --muted: 300 10% 96%;
    --muted-foreground: 300 8% 46%;
    --accent: 300 10% 96%;
    --accent-foreground: 300 14% 4%;
    --border: 300 8% 90%;
    --input: 300 8% 90%;
    --ring: 225 84% 49%;
    --chart-primary: #f6339a;        /* pink-500 #f6339a */
    --chart-1: 327 96% 82%;         /* pink-300 #fda5d5 */
    --chart-2: 328 92% 58%;         /* pink-500 #f6339a */
    --chart-3: 329 100% 45%;        /* pink-600 #e60076 */
    --chart-4: 332 100% 39%;        /* pink-700 #c6005c */
    --chart-5: 332 100% 32%;        /* pink-800 #a3004c */
    --emerald-brand: 225 84% 49%;
}

html.dark[data-dashboard-theme="rhea-blue"],
[data-theme="dark"][data-dashboard-theme="rhea-blue"] {
    --radius: 0.625rem;
    --background: 300 14% 4%;        /* mauve-950 #0c090c dark dusky slate */
    --foreground: 0 0% 98%;          /* #fafaf9 */
    --card: 293 15% 10%;             /* mauve-900 #1d161e rich elevated card */
    --card-foreground: 0 0% 98%;
    --popover: 293 15% 10%;
    --popover-foreground: 0 0% 98%;
    --primary: 227 76% 50%;         /* electric royal blue #2563eb */
    --primary-foreground: 0 0% 100%;
    --secondary: 295 12% 16%;        /* mauve-800 */
    --secondary-foreground: 0 0% 98%;
    --muted: 295 12% 16%;
    --muted-foreground: 300 10% 64%;
    --accent: 295 12% 16%;
    --accent-foreground: 0 0% 98%;
    --border: 295 12% 16%;           /* subtle border */
    --input: 295 12% 16%;
    --ring: 227 76% 50%;
    --chart-primary: #f6339a;        /* pink-500 #f6339a */
    --chart-1: 327 96% 82%;         /* pink-300 #fda5d5 */
    --chart-2: 328 92% 58%;         /* pink-500 #f6339a */
    --chart-3: 329 100% 45%;        /* pink-600 #e60076 */
    --chart-4: 332 100% 39%;
    --chart-5: 332 100% 32%;
    --emerald-brand: 227 76% 50%;
}

/* 2.7 RHEA OLIVE & LIME (Preset bhQprSPEe: Style Rhea + Base Olive + Emerald Primary + Lime Charts) */
html[data-dashboard-theme="rhea-olive"] {
    --radius: 0.625rem;
    --background: 0 0% 100%;
    --foreground: 60 14% 4%;         /* olive-950 #0c0c09 */
    --card: 0 0% 100%;
    --card-foreground: 60 14% 4%;
    --popover: 0 0% 100%;
    --popover-foreground: 60 14% 4%;
    --primary: 160 84% 39%;         /* emerald-600 #059669 */
    --primary-foreground: 150 80% 98%; /* #ecfdf5 */
    --secondary: 60 10% 96%;
    --secondary-foreground: 60 14% 4%;
    --muted: 60 10% 96%;
    --muted-foreground: 60 8% 46%;
    --accent: 60 10% 96%;
    --accent-foreground: 60 14% 4%;
    --border: 60 8% 90%;
    --input: 60 8% 90%;
    --ring: 160 84% 39%;
    --chart-primary: #84cc16;        /* lime-500 #84cc16 */
    --chart-1: 81 88% 64%;          /* lime-400 #bbf451 */
    --chart-2: 84 100% 41%;         /* lime-600 #7ccf00 */
    --chart-3: 86 100% 32%;         /* lime-700 #5ea500 */
    --chart-4: 85 100% 25%;
    --chart-5: 84 100% 19%;
    --emerald-brand: 160 84% 39%;
}

html.dark[data-dashboard-theme="rhea-olive"],
[data-theme="dark"][data-dashboard-theme="rhea-olive"] {
    --radius: 0.625rem;
    --background: 60 14% 4%;         /* olive-950 #0c0c09 deep organic slate */
    --foreground: 60 10% 98%;        /* #fafaf8 */
    --card: 60 14% 10%;              /* olive-900 #1d1d16 warm surface */
    --card-foreground: 60 10% 98%;
    --popover: 60 14% 10%;
    --popover-foreground: 60 10% 98%;
    --primary: 160 84% 39%;         /* emerald-600 #059669 */
    --primary-foreground: 150 80% 98%;
    --secondary: 60 12% 16%;         /* olive-800 #2b2b22 */
    --secondary-foreground: 60 10% 98%;
    --muted: 60 12% 16%;
    --muted-foreground: 60 8% 64%;
    --accent: 60 12% 16%;
    --accent-foreground: 60 10% 98%;
    --border: 60 12% 16%;            /* subtle olive border */
    --input: 60 12% 16%;
    --ring: 160 84% 39%;
    --chart-primary: #84cc16;        /* lime-500 #84cc16 */
    --chart-1: 81 88% 64%;          /* lime-400 #bbf451 */
    --chart-2: 84 100% 41%;         /* lime-600 #7ccf00 */
    --chart-3: 86 100% 32%;         /* lime-700 #5ea500 */
    --chart-4: 85 100% 25%;
    --chart-5: 84 100% 19%;
    --emerald-brand: 160 84% 39%;
}

/* 2.8 RHEA TAUPE & ROSE (Preset bkF3z46O8: Style Rhea + Base Taupe + Rose Primary + Yellow Charts) */
html[data-dashboard-theme="rhea-taupe"] {
    --radius: 0.625rem;
    --background: 0 0% 100%;         /* #ffffff */
    --foreground: 20 14% 4%;         /* taupe-950 #0c0a09 */
    --card: 0 0% 100%;
    --card-foreground: 20 14% 4%;
    --popover: 0 0% 100%;
    --popover-foreground: 20 14% 4%;
    --primary: 344 100% 39%;         /* rose #c70036 */
    --primary-foreground: 356 100% 97%; /* #fff1f2 */
    --secondary: 240 5% 96%;         /* #f4f4f5 */
    --secondary-foreground: 240 6% 10%;
    --muted: 0 8% 95%;              /* #f3f1f1 */
    --muted-foreground: 17 9% 45%;   /* #7c6d67 */
    --accent: 0 8% 95%;
    --accent-foreground: 17 14% 10%;
    --border: 12 10% 90%;            /* #e8e4e3 */
    --input: 12 10% 90%;
    --ring: 16 8% 64%;               /* #aba09c */
    --chart-primary: #ffdf20;        /* yellow chart #ffdf20 */
    --chart-1: 51 100% 56%;          /* #ffdf20 */
    --chart-2: 44 100% 47%;          /* #f0b100 */
    --chart-3: 39 100% 41%;          /* #d08700 */
    --chart-4: 34 100% 33%;          /* #a65f00 */
    --chart-5: 33 100% 27%;          /* #894b00 */
    --emerald-brand: 344 100% 39%;
}

html.dark[data-dashboard-theme="rhea-taupe"],
[data-theme="dark"][data-dashboard-theme="rhea-taupe"] {
    --radius: 0.625rem;
    --background: 20 14% 4%;         /* taupe-950 #0c0a09 */
    --foreground: 30 20% 98%;        /* #fbfaf9 */
    --card: 17 14% 10%;              /* taupe-900 #1d1816 warm dark card */
    --card-foreground: 30 20% 98%;
    --popover: 17 14% 10%;
    --popover-foreground: 30 20% 98%;
    --primary: 340 100% 32%;         /* dark rose #a50036 */
    --primary-foreground: 356 100% 97%; /* #fff1f2 */
    --secondary: 240 4% 16%;         /* #27272a */
    --secondary-foreground: 0 0% 98%;
    --muted: 13 12% 15%;             /* #2b2422 */
    --muted-foreground: 16 8% 64%;   /* #aba09c */
    --accent: 13 12% 15%;
    --accent-foreground: 30 20% 98%;
    --border: 17 9% 15%;             /* #2a2523 */
    --input: 20 7% 18%;              /* #312d2b */
    --ring: 17 9% 45%;               /* #7c6d67 */
    --chart-primary: #ffdf20;        /* yellow chart #ffdf20 */
    --chart-1: 51 100% 56%;          /* #ffdf20 */
    --chart-2: 44 100% 47%;          /* #f0b100 */
    --chart-3: 39 100% 41%;          /* #d08700 */
    --chart-4: 34 100% 33%;          /* #a65f00 */
    --chart-5: 33 100% 27%;          /* #894b00 */
    --emerald-brand: 340 100% 32%;
}

/* 2.9 RHEA TEAL & YELLOW (Preset b6HI8c3hw: Style Rhea + Base Olive + Teal Primary + Yellow Charts) */
html[data-dashboard-theme="rhea-teal"] {
    --radius: 0.625rem;
    --background: 0 0% 100%;         /* #ffffff */
    --foreground: 60 14% 4%;         /* olive-950 #0c0c09 */
    --card: 0 0% 100%;
    --card-foreground: 60 14% 4%;
    --popover: 0 0% 100%;
    --popover-foreground: 60 14% 4%;
    --primary: 175 100% 24%;         /* deep teal #00786f */
    --primary-foreground: 166 77% 97%; /* #f0fdfa */
    --secondary: 240 5% 96%;         /* #f4f4f5 */
    --secondary-foreground: 240 6% 10%;
    --muted: 60 15% 95%;             /* #f4f4f0 */
    --muted-foreground: 60 9% 45%;   /* #7c7c67 */
    --accent: 60 15% 95%;
    --accent-foreground: 60 14% 10%;
    --border: 60 10% 90%;            /* #e8e8e3 */
    --input: 60 10% 90%;
    --ring: 60 8% 64%;               /* #abab9c */
    --chart-primary: #ffdf20;        /* yellow-400 #ffdf20 */
    --chart-1: 51 100% 56%;          /* #ffdf20 */
    --chart-2: 44 100% 47%;          /* #f0b100 */
    --chart-3: 39 100% 41%;          /* #d08700 */
    --chart-4: 34 100% 33%;          /* #a65f00 */
    --chart-5: 33 100% 27%;          /* #894b00 */
    --emerald-brand: 175 100% 24%;
}

html.dark[data-dashboard-theme="rhea-teal"],
[data-theme="dark"][data-dashboard-theme="rhea-teal"] {
    --radius: 0.625rem;
    --background: 60 14% 4%;         /* olive-950 #0c0c09 deep organic slate */
    --foreground: 60 20% 98%;        /* #fbfbf9 */
    --card: 60 14% 10%;              /* olive-900 #1d1d16 warm surface */
    --card-foreground: 60 20% 98%;
    --popover: 60 14% 10%;
    --popover-foreground: 60 20% 98%;
    --primary: 177 100% 24%;         /* deep teal #007a72 */
    --primary-foreground: 166 77% 97%; /* #f0fdfa */
    --secondary: 240 4% 16%;         /* #27272a */
    --secondary-foreground: 0 0% 98%;
    --muted: 60 12% 15%;             /* olive-800 #2b2b22 */
    --muted-foreground: 60 8% 64%;   /* #abab9c */
    --accent: 60 12% 15%;
    --accent-foreground: 60 20% 98%;
    --border: 60 12% 15%;            /* subtle olive border */
    --input: 60 12% 15%;
    --ring: 60 9% 45%;               /* #7c7c67 */
    --chart-primary: #ffdf20;        /* yellow #ffdf20 */
    --chart-1: 51 100% 56%;          /* #ffdf20 */
    --chart-2: 44 100% 47%;          /* #f0b100 */
    --chart-3: 39 100% 41%;          /* #d08700 */
    --chart-4: 34 100% 33%;          /* #a65f00 */
    --chart-5: 33 100% 27%;          /* #894b00 */
    --emerald-brand: 177 100% 24%;
}

/* 3. ZINC MINIMAL (Clásico Vercel / Linear Monocromático) */
html[data-dashboard-theme="zinc-minimal"] {
    --radius: 0.5rem;
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;
    --emerald-brand: 158 64% 42%;
}

html.dark[data-dashboard-theme="zinc-minimal"],
[data-theme="dark"][data-dashboard-theme="zinc-minimal"] {
    --radius: 0.5rem;
    --background: 240 10% 3.9%;     /* #09090b */
    --foreground: 0 0% 98%;         /* #fafafa */
    --card: 240 10% 4.9%;           /* #0c0c0e */
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 4.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;    /* #27272a */
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
    --emerald-brand: 158 64% 45%;
}

/* 3. WHATSAPP NATIVE PRO (Verde WhatsApp / Esmeralda Dinámico) */
html[data-dashboard-theme="whatsapp-pro"] {
    --radius: 0.75rem;
    --background: 140 20% 98%;       /* #f8faf9 clean light mint */
    --foreground: 160 30% 10%;
    --card: 0 0% 100%;
    --card-foreground: 160 30% 10%;
    --popover: 0 0% 100%;
    --popover-foreground: 160 30% 10%;
    --primary: 158 64% 38%;         /* WhatsApp Green #059669 */
    --primary-foreground: 0 0% 100%;
    --secondary: 150 25% 94%;
    --secondary-foreground: 160 40% 15%;
    --muted: 150 20% 94%;
    --muted-foreground: 160 15% 45%;
    --accent: 150 25% 94%;
    --accent-foreground: 160 40% 15%;
    --border: 150 20% 88%;
    --input: 150 20% 88%;
    --ring: 158 64% 38%;
    --emerald-brand: 158 64% 38%;
}

html.dark[data-dashboard-theme="whatsapp-pro"],
[data-theme="dark"][data-dashboard-theme="whatsapp-pro"] {
    --radius: 0.75rem;
    --background: 160 30% 4%;       /* #04120c deep dark forest */
    --foreground: 150 20% 98%;
    --card: 160 25% 8%;             /* #0a1f15 */
    --card-foreground: 150 20% 98%;
    --popover: 160 25% 8%;
    --popover-foreground: 150 20% 98%;
    --primary: 158 64% 45%;         /* #10b981 */
    --primary-foreground: 0 0% 100%;
    --secondary: 160 20% 14%;
    --secondary-foreground: 150 20% 95%;
    --muted: 160 20% 14%;
    --muted-foreground: 160 15% 60%;
    --accent: 160 20% 14%;
    --accent-foreground: 150 20% 95%;
    --border: 160 20% 16%;
    --input: 160 20% 16%;
    --ring: 158 64% 45%;
    --emerald-brand: 158 64% 45%;
}

/* 4. NORDIC INDIGO (Stripe / GitHub Pro Indigo) */
html[data-dashboard-theme="nordic-indigo"] {
    --radius: 0.5rem;
    --background: 210 40% 98%;       /* #f8fafc slate-50 */
    --foreground: 222 47% 11%;       /* #0f172a slate-900 */
    --card: 0 0% 100%;
    --card-foreground: 222 47% 11%;
    --popover: 0 0% 100%;
    --popover-foreground: 222 47% 11%;
    --primary: 243 75% 59%;         /* indigo-600 #4f46e5 */
    --primary-foreground: 0 0% 100%;
    --secondary: 210 40% 94%;       /* slate-100 */
    --secondary-foreground: 222 47% 11%;
    --muted: 210 40% 94%;
    --muted-foreground: 215 16% 47%;
    --accent: 210 40% 94%;
    --accent-foreground: 222 47% 11%;
    --border: 214 32% 91%;          /* slate-200 */
    --input: 214 32% 91%;
    --ring: 243 75% 59%;
    --emerald-brand: 243 75% 59%;
}

html.dark[data-dashboard-theme="nordic-indigo"],
[data-theme="dark"][data-dashboard-theme="nordic-indigo"] {
    --radius: 0.5rem;
    --background: 222 47% 6%;       /* #090d16 deep navy */
    --foreground: 210 40% 98%;
    --card: 222 40% 10%;            /* #101726 */
    --card-foreground: 210 40% 98%;
    --popover: 222 40% 10%;
    --popover-foreground: 210 40% 98%;
    --primary: 238 82% 67%;         /* indigo-500 #6366f1 */
    --primary-foreground: 0 0% 100%;
    --secondary: 217 33% 17%;       /* #1e293b */
    --secondary-foreground: 210 40% 98%;
    --muted: 217 33% 17%;
    --muted-foreground: 215 20% 65%;
    --accent: 217 33% 17%;
    --accent-foreground: 210 40% 98%;
    --border: 217 33% 18%;
    --input: 217 33% 18%;
    --ring: 238 82% 67%;
    --emerald-brand: 238 82% 67%;
}

/* 5. ROSE VELVET (Boutique / Luxury Soft Curves) */
html[data-dashboard-theme="rose-velvet"] {
    --radius: 0.875rem;
    --background: 350 30% 98%;       /* #fff5f6 delicate blush */
    --foreground: 350 40% 10%;
    --card: 0 0% 100%;
    --card-foreground: 350 40% 10%;
    --popover: 0 0% 100%;
    --popover-foreground: 350 40% 10%;
    --primary: 346 77% 49%;         /* rose-600 #e11d48 */
    --primary-foreground: 0 0% 100%;
    --secondary: 350 30% 94%;
    --secondary-foreground: 350 40% 15%;
    --muted: 350 30% 94%;
    --muted-foreground: 350 15% 45%;
    --accent: 350 30% 94%;
    --accent-foreground: 350 40% 15%;
    --border: 350 25% 90%;
    --input: 350 25% 90%;
    --ring: 346 77% 49%;
    --emerald-brand: 346 77% 49%;
}

html.dark[data-dashboard-theme="rose-velvet"],
[data-theme="dark"][data-dashboard-theme="rose-velvet"] {
    --radius: 0.875rem;
    --background: 350 35% 5%;       /* #14070a deep velvet wine */
    --foreground: 350 30% 98%;
    --card: 350 30% 9%;             /* #200b10 */
    --card-foreground: 350 30% 98%;
    --popover: 350 30% 9%;
    --popover-foreground: 350 30% 98%;
    --primary: 351 95% 65%;         /* rose-500 #fb7185 */
    --primary-foreground: 0 0% 100%;
    --secondary: 350 25% 15%;
    --secondary-foreground: 350 30% 95%;
    --muted: 350 25% 15%;
    --muted-foreground: 350 15% 65%;
    --accent: 350 25% 15%;
    --accent-foreground: 350 30% 95%;
    --border: 350 25% 18%;
    --input: 350 25% 18%;
    --ring: 351 95% 65%;
    --emerald-brand: 351 95% 65%;
}

/* Card radius adjustments by style */
html[data-dashboard-theme="rhea-amber"] .card,
html[data-dashboard-theme="rhea-rose"] .card,
html[data-dashboard-theme="rhea-cyan"] .card {
    border-radius: 1.125rem;
}
html[data-dashboard-theme="rose-velvet"] .card {
    border-radius: 1rem;
}
html[data-dashboard-theme="whatsapp-pro"] .card,
html[data-dashboard-theme="rhea-blue"] .card,
html[data-dashboard-theme="rhea-olive"] .card,
html[data-dashboard-theme="rhea-taupe"] .card,
html[data-dashboard-theme="rhea-teal"] .card {
    border-radius: 0.875rem;
}

/* =====================================================================
   DASHBOARD THEME TYPOGRAPHY PAIRINGS (SHADCN PRESETS)
   ===================================================================== */
html[data-dashboard-theme="nova-emerald"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="rhea-amber"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="rhea-rose"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="rhea-cyan"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="rhea-blue"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
html[data-dashboard-theme="rhea-olive"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Noto Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
html[data-dashboard-theme="rhea-taupe"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Noto Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
html[data-dashboard-theme="rhea-teal"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="zinc-minimal"] {
    --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="whatsapp-pro"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="nordic-indigo"] {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-dashboard-theme="rose-velvet"] {
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Smooth theme transitions */
body, .card, .app-sidebar, .app-topbar, .input, .btn, .settings-layout-grid {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* =====================================================================
   BASE & RESET
   ===================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

input, button, select, textarea, .btn {
    font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6,
.card-title, .page-title, .metric-title, .metric-value,
.settings-pane-title, .dash-guide-title, .dash-guide-next-title,
.settings-nav-title {
    font-family: var(--font-heading, var(--font-sans));
}

/* Scrollbars Modernos Globales (Elimina la barra tosca nativa de Windows) */
html {
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--border)) transparent;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: hsl(var(--border));
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
    font-weight: 600;
    color: hsl(var(--foreground));
    line-height: 1.25;
}

h1 { font-size: 1.875rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.text-muted { color: hsl(var(--muted-foreground)); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* =====================================================================
   SHADCN BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.25rem;
    padding: 0 0.875rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    outline: none;
    font-family: inherit;
    user-select: none;
}

.btn:focus-visible {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.btn:disabled, .btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.5;
}

.btn:active:not(:disabled) {
    transform: scale(0.985);
}

/* Button Variants */
.btn-default, .btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: var(--shadow-sm);
}
.btn-default:hover, .btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}
.btn-secondary:hover {
    background-color: hsl(var(--secondary) / 0.8);
}

.btn-outline {
    border-color: hsl(var(--border));
    background-color: transparent;
    color: hsl(var(--foreground));
}
.btn-outline:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-ghost {
    background-color: transparent;
    color: hsl(var(--foreground));
}
.btn-ghost:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    box-shadow: var(--shadow-sm);
}
.btn-destructive:hover {
    background-color: hsl(var(--destructive) / 0.9);
}

.btn-emerald {
    background-color: hsl(var(--emerald-brand));
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}
.btn-emerald:hover {
    background-color: hsl(var(--emerald-hover));
}

.btn-link {
    color: hsl(var(--primary));
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0;
    height: auto;
}

/* Button Sizes */
.btn-xs {
    height: 1.625rem;
    padding: 0 0.5rem;
    font-size: 0.6875rem;
    border-radius: calc(var(--radius) - 3px);
}

.btn-sm {
    height: 1.875rem;
    padding: 0 0.625rem;
    font-size: 0.75rem;
    border-radius: calc(var(--radius) - 3px);
}

.btn-lg {
    height: 2.75rem;
    padding: 0 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: calc(var(--radius) - 2px);
}

.btn-icon-sm {
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    border-radius: calc(var(--radius) - 3px);
}

/* =====================================================================
   SHADCN CARDS
   ===================================================================== */
.card {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    box-shadow: var(--shadow-sm);
    overflow: visible;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.25rem 1.5rem;
}

.card-header.border-b {
    border-bottom: 1px solid hsl(var(--border));
}

.card-title {
    font-weight: 600;
    letter-spacing: -0.025em;
    font-size: 1.125rem;
    line-height: 1.25;
}

.card-description {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.4;
}

.card-content {
    padding: 1.5rem;
}

.card-header + .card-content {
    padding-top: 0;
}

.card-footer {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid hsl(var(--border));
    background-color: hsl(var(--muted) / 0.3);
}

/* =====================================================================
   SHADCN BADGES
   ===================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: colors 0.15s ease;
}

.badge-default {
    border-color: transparent;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-secondary {
    border-color: transparent;
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-outline {
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
    background: transparent;
}

.badge-destructive {
    border-color: transparent;
    background-color: hsl(var(--destructive) / 0.15);
    color: #f87171;
}

.badge-success {
    border-color: rgba(16, 185, 129, 0.25);
    background-color: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.badge-emerald {
    border-color: rgba(16, 185, 129, 0.4);
    background-color: #10b981;
    color: #ffffff;
}

.badge-warning {
    border-color: rgba(245, 158, 11, 0.25);
    background-color: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.btn-pill {
    border-radius: 9999px !important;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--foreground));
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot-warning { background-color: #f59e0b; }
.status-dot-success { background-color: #10b981; }
.status-dot-danger { background-color: #ef4444; }
.status-dot-info { background-color: #3b82f6; }
.status-dot-muted { background-color: hsl(var(--muted-foreground)); }

/* =====================================================================
   SHADCN FORMS & INPUTS
   ===================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-description {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: -0.25rem;
}

.input, .select, .textarea, .form-control {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem !important;
    color: hsl(var(--foreground));
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:not(textarea), .form-control:not(textarea) { height: 2.375rem; }
.select {
    height: 2.375rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}
.textarea, textarea.input, textarea.form-control { min-height: 5rem; height: auto; resize: vertical; }

/* =====================================================================
   SHADCN UI FILE INPUT (Modern Cross-Browser File Upload Styling)
   ===================================================================== */
input[type="file"].input,
input[type="file"].form-control,
.shadcn-file-input {
    height: auto !important;
    min-height: 2.625rem;
    padding: 0.35rem 0.5rem !important;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem !important;
    display: flex;
    align-items: center;
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="file"].input:focus,
input[type="file"].form-control:focus,
.shadcn-file-input:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15);
}

input[type="file"].input::file-selector-button,
input[type="file"].form-control::file-selector-button,
.shadcn-file-input::file-selector-button {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground, var(--foreground)));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 3px);
    padding: 0.375rem 0.85rem;
    margin-right: 0.85rem;
    font-weight: 600;
    font-size: 0.775rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

input[type="file"].input::file-selector-button:hover,
input[type="file"].form-control::file-selector-button:hover,
.shadcn-file-input::file-selector-button:hover {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: #ffffff;
}

input[type="file"].input::-webkit-file-upload-button,
input[type="file"].form-control::-webkit-file-upload-button {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground, var(--foreground)));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 3px);
    padding: 0.375rem 0.85rem;
    margin-right: 0.85rem;
    font-weight: 600;
    font-size: 0.775rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="file"].input::-webkit-file-upload-button:hover,
input[type="file"].form-control::-webkit-file-upload-button:hover {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: #ffffff;
}

/* Dropzone y Tarjetas de Subida Shadcn UI Universales */
.shadcn-upload-card {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1rem 1.15rem;
    background: hsl(var(--muted) / 0.25);
    border: 1px dashed hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}
.shadcn-upload-card:hover {
    border-color: hsl(var(--primary) / 0.5);
    background: hsl(var(--primary) / 0.03);
}
.upload-preview-box {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.upload-preview-box:hover {
    transform: scale(1.02);
    border-color: hsl(var(--primary));
}
.preview-img-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}
.preview-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.preview-tag {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    pointer-events: none;
}
.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    padding: 4px;
    box-sizing: border-box;
}
.placeholder-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: hsl(var(--muted));
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
}
.upload-meta-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.upload-meta-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}
.upload-meta-desc {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.35;
}
.upload-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* =====================================================================
   SHADCN UI CUSTOM SELECT / DROPDOWN COMPONENT
   ===================================================================== */
select.shadcn-select-native {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    clip: rect(0, 0, 0, 0) !important;
}

.shadcn-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    vertical-align: middle;
}
.shadcn-select-wrapper.is-open {
    z-index: 999;
}
.card:has(.shadcn-select-wrapper.is-open),
.shadcn-card:has(.shadcn-select-wrapper.is-open),
.card.has-open-select,
.shadcn-card.has-open-select {
    z-index: 50 !important;
    position: relative !important;
    overflow: visible !important;
}
.shadcn-select-wrapper.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.shadcn-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    height: 2.375rem;
    padding: 0 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    outline: none;
    user-select: none;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.shadcn-select-trigger:hover {
    background-color: hsl(var(--accent) / 0.35);
    border-color: hsl(var(--border));
}
.shadcn-select-trigger:focus-visible,
.shadcn-select-wrapper.is-open .shadcn-select-trigger {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.18);
}
.shadcn-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shadcn-select-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}
.shadcn-select-chevron {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.shadcn-select-wrapper.is-open .shadcn-select-chevron {
    transform: rotate(180deg);
}

.shadcn-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 12rem;
    z-index: 1050;
    margin-top: 4px;
    margin-bottom: 4px;
    background-color: hsl(var(--popover, var(--card)));
    color: hsl(var(--popover-foreground, var(--foreground)));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2), 0 8px 10px -6px rgb(0 0 0 / 0.15);
    padding: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96) translateY(-4px);
    pointer-events: none;
    transition: opacity 0.14s cubic-bezier(0.16, 1, 0.3, 1), transform 0.14s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.14s;
    box-sizing: border-box;
}
.shadcn-select-dropdown[data-side="top"] {
    top: auto;
    bottom: calc(100% + 4px);
    margin-top: 0;
    transform: scale(0.96) translateY(4px);
}
.shadcn-select-dropdown[data-side="bottom"] {
    top: calc(100% + 4px);
    bottom: auto;
}
.shadcn-select-wrapper.is-open .shadcn-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}
.shadcn-select-list {
    max-height: 15rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--border)) transparent;
}
.shadcn-select-list::-webkit-scrollbar {
    width: 5px;
}
.shadcn-select-list::-webkit-scrollbar-thumb {
    background-color: hsl(var(--border));
    border-radius: 4px;
}

.shadcn-select-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.65rem;
    border-radius: calc(var(--radius) - 3px);
    font-size: 0.875rem;
    font-weight: 450;
    color: hsl(var(--foreground));
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.shadcn-select-item.is-focused,
.shadcn-select-item:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}
.shadcn-select-item[aria-selected="true"] {
    font-weight: 600;
}
.shadcn-select-item.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.shadcn-select-item-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shadcn-select-item-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--foreground));
    opacity: 0;
    transition: opacity 0.1s ease;
    flex-shrink: 0;
}
.shadcn-select-item[aria-selected="true"] .shadcn-select-item-check {
    opacity: 1;
}

.input-sm, .form-control-sm {
    height: 2rem !important;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem !important;
    border-radius: calc(var(--radius) - 3px) !important;
}

/* Inputs con ícono integrado (Left Icon) */
.input-has-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-has-icon .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    z-index: 2;
    transition: color 0.15s ease;
}

.input-has-icon:focus-within .input-icon {
    color: hsl(var(--primary));
}

.input-has-icon input.input,
.input-has-icon input.input-sm,
.input-has-icon input.form-control,
.input-has-icon input.form-control-sm {
    padding-left: 2.35rem !important;
}

.input:focus, .select:focus, .textarea:focus, .form-control:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.input::placeholder, .textarea::placeholder, .form-control::placeholder {
    color: hsl(var(--muted-foreground));
    opacity: 1;
}

/* Custom Switch Toggle */
.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}
.switch-input { display: none; }
.switch-slider {
    width: 2.5rem;
    height: 1.375rem;
    background-color: hsl(var(--muted));
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.2s ease;
    border: 1px solid hsl(var(--border));
}
.switch-slider::before {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #ffffff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}
.switch-input:checked + .switch-slider {
    background-color: hsl(var(--emerald-brand));
    border-color: hsl(var(--emerald-brand));
}
.switch-input:checked + .switch-slider::before {
    transform: translateX(1.125rem);
}

/* Shadcn Switch Status Toggle (Píldora interactiva con track, thumb y texto) */
.switch-status-toggle {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.15s ease;
    vertical-align: middle;
}
.switch-status-toggle:hover {
    opacity: 0.9;
}
.switch-status-toggle:focus-visible {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
    border-radius: 9999px;
}
.switch-status-toggle .switch-track {
    width: 36px;
    height: 20px;
    background-color: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.switch-status-toggle .switch-thumb {
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
/* Estado Activo / Visible / Encendido */
.switch-status-toggle.is-active .switch-track,
.switch-status-toggle.active .switch-track {
    background-color: #10b981;
    border-color: #059669;
}
.switch-status-toggle.is-active .switch-thumb,
.switch-status-toggle.active .switch-thumb {
    transform: translateX(16px);
}
.switch-status-toggle.is-active .switch-status-text,
.switch-status-toggle.active .switch-status-text {
    color: #10b981;
}
/* Estado Inactivo / Oculto / Pausado */
.switch-status-toggle.is-hidden .switch-track,
.switch-status-toggle.inactive .switch-track {
    background-color: hsl(var(--muted));
    border-color: hsl(var(--border));
}
.switch-status-toggle.is-hidden .switch-thumb,
.switch-status-toggle.inactive .switch-thumb {
    transform: translateX(0);
}
.switch-status-toggle.is-hidden .switch-status-text,
.switch-status-toggle.inactive .switch-status-text {
    color: hsl(var(--muted-foreground));
}
.switch-status-toggle .switch-status-text {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    transition: color 0.2s ease;
}

/* =====================================================================
   SHADCN TABLES
   ===================================================================== */
.table-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--card));
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    caption-side: bottom;
    font-size: 0.875rem;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    height: 2.5rem;
    padding: 0 1rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--muted) / 0.5);
    white-space: nowrap;
}

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

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

.table tbody tr:hover td {
    background-color: hsl(var(--muted) / 0.3);
}

/* =====================================================================
   SHADCN TABS (Segmented Control)
   ===================================================================== */
.tabs-list {
    display: inline-flex;
    height: 2.375rem;
    align-items: center;
    justify-content: center;
    border-radius: calc(var(--radius) - 2px);
    background-color: hsl(var(--muted));
    padding: 0.25rem;
    color: hsl(var(--muted-foreground));
    gap: 0.25rem;
}

.tabs-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: calc(var(--radius) - 4px);
    padding: 0.25rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    height: 100%;
}

.tabs-trigger:hover {
    color: hsl(var(--foreground));
}

.tabs-trigger.active {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* =====================================================================
   SHADCN ALERTS & NOTICES
   ===================================================================== */
.alert {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 0.875rem 1.125rem;
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.alert-destructive {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

/* =====================================================================
   SHADCN DIALOGS / MODALS
   ===================================================================== */
.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-backdrop.open {
    display: flex;
    opacity: 1;
}

.dialog-content {
    position: relative;
    width: 100%;
    max-width: 32rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-backdrop.open .dialog-content {
    transform: scale(1);
}

.dialog-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.dialog-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: hsl(var(--foreground));
}

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

.dialog-body {
    padding: 1.5rem;
    max-height: calc(85vh - 120px);
    overflow-y: auto;
}

.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid hsl(var(--border));
    background-color: hsl(var(--muted) / 0.3);
}

.dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    border-radius: calc(var(--radius) - 3px);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s;
}

.dialog-close:hover {
    color: hsl(var(--foreground));
    background-color: hsl(var(--accent));
}

/* =====================================================================
   SHADCN PROGRESS BAR
   ===================================================================== */
.progress-track {
    position: relative;
    height: 0.5rem;
    width: 100%;
    overflow: hidden;
    border-radius: 9999px;
    background-color: hsl(var(--secondary));
}

.progress-fill {
    height: 100%;
    width: 0%;
    flex: 1;
    background-color: hsl(var(--primary));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
}

/* =====================================================================
   SHADCN APP SIDEBAR & MAIN LAYOUT (ui.shadcn.com sidebar-07 style)
   ===================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: hsl(var(--background));
}

.app-sidebar {
    width: 260px;
    background-color: hsl(var(--card));
    border-right: 1px solid hsl(var(--border));
    display: none;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 70;
    overflow: visible;
    transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1024px) {
    .app-sidebar { display: flex; }
}

@media (max-width: 1023px) {
    .app-sidebar {
        display: flex;
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.5);
    }
    .app-sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(3px);
        z-index: 99;
        display: none;
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    .sidebar-backdrop.open {
        display: block;
        opacity: 1;
    }
}

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

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-icon-box {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: calc(var(--radius) - 2px);
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brand-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: hsl(var(--foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-role {
    font-size: 0.625rem;
    font-weight: 700;
    color: hsl(var(--primary));
    background-color: hsl(var(--primary) / 0.12);
    border: 1px solid hsl(var(--primary) / 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.4rem;
    border-radius: calc(var(--radius) - 4px);
    display: inline-flex;
    align-items: center;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--border) / 0.5) transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: hsl(var(--border) / 0.5);
    border-radius: 999px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.4);
}

.sidebar-group-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: hsl(var(--muted-foreground));
    padding: 0.875rem 0.625rem 0.35rem;
    margin-bottom: 0.125rem;
}

.dark .sidebar-group-label,
[data-theme="dark"] .sidebar-group-label,
body.dark-mode .sidebar-group-label {
    color: hsl(var(--muted-foreground));
}

.sidebar-content > div:first-child .sidebar-group-label {
    padding-top: 0.25rem;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-link svg {
    flex-shrink: 0;
    color: currentColor;
    transition: color 0.15s ease;
}

.sidebar-link:hover {
    background-color: hsl(var(--accent) / 0.85);
    color: hsl(var(--foreground));
    transform: none;
}

/* Efecto Seleccionado / Activo Vinculado al Tema Seleccionado (Shadcn UI Token) */
.sidebar-link.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground)) !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.dark .sidebar-link.active,
[data-theme="dark"] .sidebar-link.active,
body.dark-mode .sidebar-link.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground)) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sidebar-link.active svg {
    color: hsl(var(--primary-foreground)) !important;
    stroke: hsl(var(--primary-foreground)) !important;
}

.sidebar-link.active::before {
    display: none !important;
}

.sidebar-link.active .nav-badge-counter {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    font-weight: 700;
}

.sidebar-link.active .nav-badge-pill {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar-link.active .nav-badge-alert {
    background: #f59e0b;
    color: #1c1917;
    border: none;
    font-weight: 800;
}

.sidebar-link .nav-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    padding: 0.125rem 0.45rem;
    border-radius: 999px;
    line-height: 1;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.nav-badge-pill {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.nav-badge-pro {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Enlace Directo a Soporte Wappura WhatsApp Oficial */
.sidebar-support-link {
    color: hsl(var(--foreground));
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-support-link .support-wa-icon {
    color: #10b981;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

.sidebar-support-link:hover {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
}

.sidebar-support-link:hover .support-wa-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.45));
}

.dark .sidebar-support-link:hover,
[data-theme="dark"] .sidebar-support-link:hover,
body.dark-mode .sidebar-support-link:hover {
    background-color: rgba(16, 185, 129, 0.14) !important;
    color: #34d399 !important;
}

.nav-badge-b2b {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.nav-badge-counter {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border) / 0.6);
    font-size: 0.6875rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.nav-badge-alert {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 700;
}

.sidebar-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid hsl(var(--border));
    background-color: hsl(var(--muted) / 0.15);
}

/* =====================================================================
   SHADCN COLLAPSIBLE SUBNAV (Marketing & Submenús)
   ===================================================================== */
.sidebar-collapsible-item {
    display: flex;
    flex-direction: column;
}

.sidebar-collapsible-header {
    display: flex;
    align-items: center;
    position: relative;
    gap: 0.25rem;
}

.sidebar-collapsible-header .sidebar-link {
    flex: 1;
    min-width: 0;
}

.sidebar-chevron-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: hsl(var(--muted-foreground));
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.sidebar-chevron-btn:hover {
    background-color: hsl(var(--accent) / 0.85);
    color: hsl(var(--foreground));
}

.sidebar-chevron-icon {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: currentColor;
}

.sidebar-collapsible-item.is-open .sidebar-chevron-icon {
    transform: rotate(180deg);
}

.sidebar-subnav {
    list-style: none;
    margin: 0.25rem 0 0.35rem 0.875rem;
    padding: 0.2rem 0 0.2rem 0.75rem;
    border-left: 1.5px solid hsl(var(--border) / 0.65);
    display: none;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-collapsible-item.is-open .sidebar-subnav {
    display: flex;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    border-radius: calc(var(--radius) - 2px);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-sublink svg {
    flex-shrink: 0;
    color: currentColor;
    transition: color 0.15s ease;
}

.sidebar-sublink:hover {
    background-color: hsl(var(--accent) / 0.75);
    color: hsl(var(--foreground));
}

.sidebar-sublink.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground)) !important;
    font-weight: 600;
}

.sidebar-sublink.active svg {
    color: hsl(var(--primary-foreground)) !important;
    stroke: hsl(var(--primary-foreground)) !important;
}

.sidebar-sublink .nav-badge {
    margin-left: auto;
}

/* =====================================================================
   SHADCN SIDEBAR STATUS CARD & QUOTA WIDGET (ui.shadcn.com/sidebar style)
   ===================================================================== */
.sidebar-status-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .sidebar-status-card,
[data-theme="dark"] .sidebar-status-card,
body.dark-mode .sidebar-status-card {
    background-color: hsl(var(--muted) / 0.25);
    border-color: hsl(var(--border) / 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.sidebar-status-card:hover {
    border-color: hsl(var(--border));
}

.sidebar-status-btn {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid hsl(var(--border) / 0.6);
    transition: opacity 0.15s ease;
}

.sidebar-status-btn:hover {
    opacity: 0.85;
}

.sidebar-status-btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
    border-radius: 4px;
}

.sidebar-status-label-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.sidebar-status-badge {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 9999px;
    font-size: 0.5625rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-status-badge.is-primary {
    background-color: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
    border: 1px solid hsl(var(--primary) / 0.35);
}

.sidebar-status-badge.is-success {
    background-color: hsl(142 71% 45% / 0.14);
    color: hsl(142 71% 45%);
    border: 1px solid hsl(142 71% 45% / 0.35);
}

.sidebar-status-title {
    font-size: 0.725rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.sidebar-status-title.is-success {
    color: hsl(142 71% 45%);
}

.sidebar-status-chevron {
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.sidebar-status-btn:hover .sidebar-status-chevron {
    opacity: 1;
    transform: translateX(2px);
}

.sidebar-quota-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

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

.sidebar-quota-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
}

.sidebar-quota-counter {
    font-size: 0.6875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    font-variant-numeric: tabular-nums;
}

.sidebar-quota-counter.is-warning {
    color: hsl(38 92% 50%);
}

.sidebar-quota-counter.is-danger {
    color: hsl(0 84% 60%);
}

.sidebar-quota-pct {
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.sidebar-quota-progress {
    height: 5px;
    background-color: hsl(var(--secondary));
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.dark .sidebar-quota-progress,
[data-theme="dark"] .sidebar-quota-progress,
body.dark-mode .sidebar-quota-progress {
    background-color: hsl(var(--muted));
}

.sidebar-quota-progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-quota-progress-bar.is-primary {
    background-color: hsl(var(--primary));
}

.sidebar-quota-progress-bar.is-warning {
    background-color: hsl(38 92% 50%);
}

.sidebar-quota-progress-bar.is-danger {
    background-color: hsl(0 84% 60%);
}

/* =====================================================================
   SIDEBAR COLAPSABLE / EXPANDIBLE & BOTÓN TOGGLE FLOTANTE (Desktop >= 768px)
   ===================================================================== */
.sidebar-group-label .group-label-mini {
    display: none;
}

/* =====================================================================
   SIDEBAR TOGGLE FLOTANTE EN BORDE SUPERIOR (Desktop >= 1024px - Color Primario de Ajustes)
   ===================================================================== */
.sidebar-edge-toggle {
    position: absolute;
    top: 15px;
    right: -13px;
    width: 26px;
    height: 26px;
    border-radius: 9999px;
    background-color: hsl(var(--primary));
    color: #ffffff;
    border: 2px solid hsl(var(--card));
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 80;
    transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.16s ease, filter 0.16s ease;
    outline: none;
    padding: 0;
}

@media (min-width: 1024px) {
    .sidebar-edge-toggle {
        display: inline-flex;
    }
}

.sidebar-edge-toggle:hover {
    transform: scale(1.12);
    filter: brightness(1.12);
    box-shadow: 0 4px 10px -1px rgba(0, 0, 0, 0.22), 0 2px 4px rgba(0, 0, 0, 0.12);
}

.sidebar-edge-toggle:active {
    transform: scale(0.95);
}

/* Modo Oscuro: Mantiene el color primario pero con el aro adaptado al fondo oscuro */
.dark .sidebar-edge-toggle,
[data-theme="dark"] .sidebar-edge-toggle,
body.dark-mode .sidebar-edge-toggle {
    background-color: hsl(var(--primary));
    color: #ffffff;
    border: 2px solid hsl(var(--card));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.dark .sidebar-edge-toggle:hover,
[data-theme="dark"] .sidebar-edge-toggle:hover,
body.dark-mode .sidebar-edge-toggle:hover {
    filter: brightness(1.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.sidebar-edge-toggle .sidebar-edge-toggle-icon {
    width: 13px;
    height: 13px;
    stroke-width: 2.6;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-sidebar.sidebar-collapsed .sidebar-edge-toggle .sidebar-edge-toggle-icon {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .app-sidebar.sidebar-collapsed {
        width: 68px;
        overflow: visible;
    }
    .app-sidebar.sidebar-collapsed .sidebar-header {
        padding: 0.875rem 0.5rem;
    }
    .app-sidebar.sidebar-collapsed .sidebar-header-row {
        justify-content: center;
        align-items: center;
    }
    .app-sidebar.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        margin: 0 auto;
    }
    .app-sidebar.sidebar-collapsed .brand-info {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-header-actions {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-group-label .group-label-full {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-group-label .group-label-mini {
        display: block !important;
        text-align: center;
        font-size: 0.55rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        color: hsl(var(--muted-foreground) / 0.55);
        margin: 0.35rem 0 0.2rem;
    }
    .app-sidebar.sidebar-collapsed .sidebar-content {
        padding: 0.75rem 0.35rem;
        overflow-x: hidden;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link {
        padding: 0;
        width: 44px;
        height: 40px;
        margin: 0 auto;
        justify-content: center;
        position: relative;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link:hover {
        transform: none;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link span:not(.nav-badge) {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link svg {
        margin: 0;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link .nav-badge {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 8px;
        height: 8px;
        min-width: 0;
        padding: 0;
        font-size: 0;
        border-radius: 50%;
        border: 2px solid hsl(var(--card));
        margin-left: 0;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link.active {
        background-color: hsl(var(--primary));
        color: hsl(var(--primary-foreground)) !important;
        border-radius: var(--radius);
    }
    .dark .app-sidebar.sidebar-collapsed .sidebar-link.active,
    [data-theme="dark"] .app-sidebar.sidebar-collapsed .sidebar-link.active,
    body.dark-mode .app-sidebar.sidebar-collapsed .sidebar-link.active {
        background-color: hsl(var(--primary));
        color: hsl(var(--primary-foreground)) !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link.active svg {
        color: hsl(var(--primary-foreground)) !important;
        stroke: hsl(var(--primary-foreground)) !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-link.active::before {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-footer-pinned {
        padding: 0.5rem 0.25rem 0.625rem;
        align-items: center;
    }
    .app-sidebar.sidebar-collapsed .sidebar-footer-widget,
    .app-sidebar.sidebar-collapsed .sidebar-status-card {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-chevron-btn {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-subnav {
        display: none !important;
    }
    .app-sidebar.sidebar-collapsed .sidebar-collapsible-header {
        justify-content: center;
    }
    .app-sidebar.sidebar-collapsed .sidebar-collapsible-header .sidebar-link {
        width: 44px;
        height: 40px;
        margin: 0 auto;
        justify-content: center;
    }
}

/* =====================================================================
   TOOLTIP FLOTANTE DINÁMICO PARA SIDEBAR COLAPSADO (Estilo Dark Badge)
   ===================================================================== */
.sidebar-floating-tooltip {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    background-color: #09090b;
    color: #ffffff;
    font-family: var(--font-sans, "Geist", -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32), 0 1px 3px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity 0.12s ease, transform 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Flechita izquierda apuntando directamente al botón */
.sidebar-floating-tooltip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid #09090b;
}

.sidebar-floating-tooltip.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.sidebar-floating-tooltip .tooltip-badge {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.12rem 0.38rem;
    border-radius: 4px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    display: none;
}

.sidebar-floating-tooltip .tooltip-badge.badge-alert {
    background-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.sidebar-floating-tooltip .tooltip-badge.badge-pro {
    background-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.sidebar-floating-tooltip .tooltip-badge.badge-b2b {
    background-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.sidebar-floating-tooltip .tooltip-badge.badge-counter {
    background-color: rgba(255, 255, 255, 0.14);
    color: #e4e4e7;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.app-topbar {
    height: 3.5rem;
    border-bottom: 1px solid hsl(var(--border) / 0.7);
    background-color: hsl(var(--card) / 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    box-sizing: border-box;
    gap: 0.75rem;
}

.app-body {
    flex: 1;
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 1279px) {
    .app-topbar {
        padding: 0 1.25rem !important;
    }
}

@media (max-width: 1023px) {
    .app-topbar {
        padding: 0 1rem !important;
        height: 3.25rem !important;
        gap: 0.5rem !important;
    }
    .app-body {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 767px) {
    .app-topbar {
        padding: 0 0.75rem !important;
        height: 3.125rem !important;
        gap: 0.375rem !important;
    }
    .app-body {
        padding: 1rem 0.75rem calc(4.75rem + var(--safe-bottom));
        max-width: 100vw;
        box-sizing: border-box;
    }
}

/* Título de Página Truncable y Responsivo para Topbar */
.topbar-page-title {
    font-weight: 600;
    color: hsl(var(--foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    display: inline-block;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .topbar-page-title {
        max-width: 180px;
    }
}

@media (min-width: 1024px) {
    .topbar-page-title {
        max-width: 220px;
    }
}

@media (min-width: 1280px) {
    .topbar-page-title {
        max-width: 320px;
    }
}

@media (min-width: 1536px) {
    .topbar-page-title {
        max-width: 480px;
    }
}

/* Envoltorio de Acciones Personalizadas de Topbar */
.topbar-action-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.topbar-divider {
    width: 1px;
    height: 1.25rem;
    background: hsl(var(--border));
    margin: 0 0.25rem;
    flex-shrink: 0;
}

/* Responsive Grid Helpers */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* Metric / KPI Cards (shadcn Dashboard style) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

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

.metric-card {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.metric-icon-wrap {
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: hsl(var(--foreground));
}

.metric-subtitle {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Responsive Mobile Bottom Nav for Admin */
.mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(3.75rem + var(--safe-bottom));
    background-color: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    z-index: 40;
    padding-bottom: var(--safe-bottom);
}

@media (min-width: 768px) {
    .mobile-bottom-nav { display: none; }
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    transition: color 0.15s ease;
}

.mobile-nav-item.active {
    color: hsl(var(--foreground));
}

/* =====================================================================
   SHADCN SEGMENTED CONTROLS & FILTER CHIPS (POS & ADMIN)
   ===================================================================== */
.segmented-control {
    display: flex;
    background-color: hsl(var(--muted) / 0.6);
    padding: 3px;
    border-radius: var(--radius);
    gap: 3px;
    border: 1px solid hsl(var(--border) / 0.8);
}

.segmented-item {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.45rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 3px);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    text-decoration: none;
    white-space: nowrap;
}

.segmented-item:hover {
    color: hsl(var(--foreground));
    background-color: hsl(var(--card) / 0.5);
}

.segmented-item.active {
    background-color: hsl(var(--card));
    color: hsl(var(--foreground));
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
}

.filter-chip:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.filter-chip.active {
    background-color: hsl(var(--foreground));
    color: hsl(var(--background));
    border-color: hsl(var(--foreground));
    font-weight: 600;
}

/* =====================================================================
   GLOBAL RESPONSIVE MOBILE TWEAKS (WAPPURA MOBILE-FIRST UX)
   ===================================================================== */
html, body {
    max-width: 100vw;
    overflow-x: clip;
}

.app-layout {
    max-width: 100vw;
    overflow-x: clip;
    width: 100%;
}

.app-main {
    max-width: 100vw;
    overflow-x: clip;
    width: 100%;
    min-width: 0;
}

/* Responsive utilities */
.hidden { display: none !important; }
.block { display: block !important; }
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.show-on-mobile { display: none !important; }

@media (max-width: 767px) {
    .hide-on-mobile,
    .hidden-mobile,
    .desktop-only,
    .topbar-search-wrapper,
    .topbar-search-desktop {
        display: none !important;
    }
    .mobile-search-btn {
        display: inline-flex !important;
    }
    .app-topbar {
        height: 3.125rem !important;
        padding: 0 0.875rem !important;
        gap: 0.5rem !important;
        max-width: 100vw;
        position: sticky !important;
        top: 0 !important;
        z-index: 40 !important;
        background-color: hsl(var(--card) / 0.90) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border-bottom: 1px solid hsl(var(--border) / 0.8) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    }

    .app-body {
        padding: 0.875rem 0.75rem calc(6rem + var(--safe-bottom, 0px)) 0.75rem !important;
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
    }

    .table-wrapper {
        border-radius: var(--radius);
        margin: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Ocultar / Mostrar textos condicionales en móviles */
    .hide-on-mobile {
        display: none !important;
    }
    .show-on-mobile {
        display: inline !important;
    }

    /* Prevención de auto-zoom indeseado en iOS Safari y campos táctiles nativos */
    .input, .select, .textarea, .form-control {
        font-size: 16px !important;
    }

    /* Scrollbars táctiles fluidos */
    .mobile-scroll-x {
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
}

/* Topbar Search & Mobile/Tablet Nav Elements Breakpoints (< 1200px vs >= 1200px) */
.topbar-menu-toggle {
    display: inline-flex !important;
}
.mobile-search-btn {
    display: inline-flex !important;
}
.topbar-search-wrapper,
.topbar-search-desktop {
    display: none !important;
}

@media (min-width: 1280px) {
    .xl\:hidden { display: none !important; }
    .xl\:block { display: block !important; }
    .xl\:flex { display: flex !important; }
    .xl\:inline { display: inline !important; }
    .xl\:inline-flex { display: inline-flex !important; }
}

@media (min-width: 1200px) {
    .mobile-search-btn {
        display: none !important;
    }
    .topbar-search-wrapper,
    .topbar-search-desktop {
        display: flex !important;
        flex: 1;
        max-width: 380px;
        margin: 0 1rem;
        position: relative;
        min-width: 0;
    }
}

.topbar-search-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap !important;
    overflow: hidden !important;
    min-width: 0 !important;
    height: 2.125rem;
    box-sizing: border-box;
}

.topbar-search-trigger:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--border) / 1.5);
}

.topbar-search-trigger-content {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.topbar-search-trigger-content span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.search-kbd-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 0.125rem 0.35rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    line-height: 1;
}

@media (min-width: 1024px) {
    .topbar-menu-toggle {
        display: none !important;
    }
    .lg\:hidden { display: none !important; }
    .lg\:block { display: block !important; }
    .lg\:flex { display: flex !important; }
    .lg\:inline { display: inline !important; }
    .lg\:inline-flex { display: inline-flex !important; }
}

@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:block { display: block !important; }
    .md\:flex { display: flex !important; }
    .md\:inline { display: inline !important; }
    .md\:inline-flex { display: inline-flex !important; }
}

@media (min-width: 640px) {
    .sm\:hidden { display: none !important; }
    .sm\:block { display: block !important; }
    .sm\:flex { display: flex !important; }
    .sm\:inline { display: inline !important; }
    .sm\:inline-flex { display: inline-flex !important; }
}

/* =====================================================================
   SHADCN SETTINGS 2-COLUMN LAYOUT (Linear / Karrito / Stripe Pattern)
   ===================================================================== */
.settings-layout-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

@media (max-width: 900px) {
    .settings-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.settings-nav-sidebar {
    position: sticky;
    top: 4.5rem;
}

.settings-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.375rem;
}

.settings-nav-category-title {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    user-select: none;
}

@media (max-width: 900px) {
    .settings-nav-category-title {
        display: none !important;
    }
    .settings-nav-sidebar {
        position: static;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .settings-nav-sidebar::-webkit-scrollbar {
        display: none;
    }
    .settings-nav-list {
        flex-direction: row;
        gap: 0.5rem;
        background: transparent;
        border: none;
        padding: 0.125rem 0;
        scroll-snap-type: x proximity;
    }
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    border: none;
    background: transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.15s ease;
    text-decoration: none;
    user-select: none;
}

@media (max-width: 900px) {
    .settings-nav-item {
        width: auto;
        white-space: nowrap;
        padding: 0.5rem 0.875rem;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
        border-radius: 9999px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    .settings-nav-item.active {
        background-color: hsl(var(--primary)) !important;
        color: hsl(var(--primary-foreground)) !important;
        border-color: hsl(var(--primary)) !important;
    }
    .settings-nav-item.active .settings-nav-icon {
        color: hsl(var(--primary-foreground)) !important;
    }
}

.settings-nav-item:hover {
    background-color: hsl(var(--accent) / 0.7);
    color: hsl(var(--foreground));
}

.settings-nav-item.active {
    background-color: hsl(var(--primary) / 0.1);
    color: hsl(var(--foreground));
    font-weight: 600;
}

.settings-nav-item.active .settings-nav-icon {
    color: hsl(var(--primary));
}

.settings-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
}

.settings-nav-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.settings-nav-title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}

.settings-nav-desc {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.2;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .settings-nav-desc {
        display: none;
    }
}

.settings-content-pane {
    min-width: 0;
    width: 100%;
}

.settings-pane-header {
    margin-bottom: 1.25rem;
}

.settings-pane-title {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: hsl(var(--foreground));
    margin: 0 0 0.25rem 0;
}

.settings-pane-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
}

/* =====================================================================
   TOPBAR CANONICAL STORE BUTTON & LIVE INDICATOR
   ===================================================================== */
.topbar-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10b981;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.topbar-live-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background-color: #10b981;
    opacity: 0.4;
    animation: live-pulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes live-pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    70% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.2); opacity: 0; }
}

.topbar-store-text {
    display: inline;
}
@media (max-width: 1279px) {
    .topbar-store-text {
        display: none !important;
    }
    .topbar-store-btn {
        padding: 0.35rem 0.55rem !important;
    }
}
@media (max-width: 480px) {
    .topbar-store-btn {
        display: none !important;
    }
}

/* =====================================================================
   SHADCN USER NAV DROPDOWN MENU
   ===================================================================== */
.user-nav-dropdown {
    position: relative;
    display: inline-flex;
}

.user-nav-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    padding: 0.25rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    color: hsl(var(--foreground));
    transition: all 0.15s ease;
    user-select: none;
    flex-shrink: 0;
}

@media (min-width: 1280px) {
    .user-nav-trigger {
        padding: 0.25rem 0.5rem 0.25rem 0.25rem;
        gap: 0.625rem;
    }
}

.user-nav-trigger:hover,
.user-nav-dropdown.is-open .user-nav-trigger {
    background-color: hsl(var(--accent));
    border-color: hsl(var(--border) / 0.6);
}

.user-nav-avatar {
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50%;
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    position: relative;
    border: 1px solid hsl(var(--border));
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-avatar-indicator {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    border: 2px solid hsl(var(--card));
}

.user-nav-info {
    display: none;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

@media (min-width: 1280px) {
    .user-nav-info {
        display: flex;
    }
}

.user-nav-name {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    color: hsl(var(--foreground));
}

.user-nav-role {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.user-nav-chevron {
    color: hsl(var(--muted-foreground));
    display: none;
    align-items: center;
    transition: transform 0.2s ease;
}

@media (min-width: 1280px) {
    .user-nav-chevron {
        display: flex;
    }
}

.user-nav-dropdown.is-open .user-nav-chevron {
    transform: rotate(180deg);
}

/* Menú Popover */
.user-nav-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 250px;
    background-color: hsl(var(--popover));
    color: hsl(var(--popover-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.375rem;
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-nav-dropdown.is-open .user-nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.user-menu-header {
    padding: 0.625rem 0.625rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-menu-header-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    line-height: 1.25;
}

.user-menu-header-sub {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.2;
}

.user-menu-divider {
    height: 1px;
    background-color: hsl(var(--border));
    margin: 0.375rem 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.12s ease, color 0.12s ease;
    text-align: left;
}

.user-menu-item:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.user-menu-item-destructive {
    color: hsl(var(--destructive));
}

.user-menu-item-destructive:hover {
    background-color: hsl(var(--destructive) / 0.12);
    color: hsl(var(--destructive));
}

/* ============================================================
   Sticky Action Bar for Mobile Forms (Oculto en Desktop, Activo en Móvil)
   ============================================================ */
.form-mobile-sticky-save {
    display: none !important;
}

@media (max-width: 768px) {
    .form-mobile-sticky-save {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: hsl(var(--card) / 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid hsl(var(--border));
        padding: 0.75rem 1rem;
        padding-bottom: calc(0.75rem + var(--safe-bottom, 0px));
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
        align-items: center;
        gap: 0.625rem;
    }
    .app-body {
        padding-bottom: calc(85px + var(--safe-bottom, 0px)) !important;
    }
}


