/* =============================================================================
   SmarterONE · app.css
   Subset do Tailwind v4 escrito à mão, cobrindo as utilities que o projeto
   usa neste momento. Isso permite rodar `dotnet run` sem dependência de Node.
   Quando você quiser o build oficial do Tailwind, rode:
       npm install && npm run build:css
   e este arquivo será substituído automaticamente.
   ============================================================================= */

@import './tokens.css';

/* ----- Reset + base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: var(--font-sans); }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: transparent; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
h1,h2,h3,h4,h5,h6,p { margin: 0; }
ul,ol { margin: 0; padding: 0; list-style: none; }

:root { --muted-rgb-dim: 0,0,0; }
.dark { --muted-rgb-dim: 255,255,255; }

/* Scrollbars (literal do original) */
* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.15) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 3px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.25); }
.dark * { scrollbar-color: rgba(255,255,255,.15) transparent; }
.dark *::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.dark *::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); }
*::-webkit-scrollbar:horizontal { height: 0; display: none; }
h1,h2,h3,h4,h5,h6,p,span,label { scrollbar-width: none; -ms-overflow-style: none; }
h1::-webkit-scrollbar,h2::-webkit-scrollbar,h3::-webkit-scrollbar,
h4::-webkit-scrollbar,h5::-webkit-scrollbar,h6::-webkit-scrollbar,
p::-webkit-scrollbar,span::-webkit-scrollbar,label::-webkit-scrollbar { display: none; width: 0; }
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; width: 0; }

/* ----- Tailwind palette (apenas tons 50/100/200/300/400/500/600/700/800/900) - */
:root {
  --blue-50:#eff6ff;--blue-100:#dbeafe;--blue-200:#bfdbfe;--blue-300:#93c5fd;--blue-400:#60a5fa;--blue-500:#3b82f6;--blue-600:#2563eb;--blue-700:#1d4ed8;--blue-800:#1e40af;--blue-900:#1e3a8a;
  --indigo-50:#eef2ff;--indigo-100:#e0e7ff;--indigo-200:#c7d2fe;--indigo-300:#a5b4fc;--indigo-400:#818cf8;--indigo-500:#6366f1;--indigo-600:#4f46e5;--indigo-700:#4338ca;--indigo-800:#3730a3;--indigo-900:#312e81;
  --violet-50:#f5f3ff;--violet-100:#ede9fe;--violet-200:#ddd6fe;--violet-300:#c4b5fd;--violet-400:#a78bfa;--violet-500:#8b5cf6;--violet-600:#7c3aed;--violet-700:#6d28d9;--violet-800:#5b21b6;--violet-900:#4c1d95;
  --purple-50:#faf5ff;--purple-100:#f3e8ff;--purple-200:#e9d5ff;--purple-300:#d8b4fe;--purple-400:#c084fc;--purple-500:#a855f7;--purple-600:#9333ea;--purple-700:#7e22ce;--purple-800:#6b21a8;--purple-900:#581c87;
  --fuchsia-500:#d946ef;--fuchsia-600:#c026d3;
  --pink-50:#fdf2f8;--pink-100:#fce7f3;--pink-200:#fbcfe8;--pink-300:#f9a8d4;--pink-400:#f472b6;--pink-500:#ec4899;--pink-600:#db2777;--pink-700:#be185d;--pink-800:#9d174d;--pink-900:#831843;
  --rose-50:#fff1f2;--rose-100:#ffe4e6;--rose-200:#fecdd3;--rose-300:#fda4af;--rose-400:#fb7185;--rose-500:#f43f5e;--rose-600:#e11d48;--rose-700:#be123c;--rose-800:#9f1239;--rose-900:#881337;
  --red-50:#fef2f2;--red-100:#fee2e2;--red-200:#fecaca;--red-300:#fca5a5;--red-400:#f87171;--red-500:#ef4444;--red-600:#dc2626;--red-700:#b91c1c;--red-800:#991b1b;--red-900:#7f1d1d;
  --orange-50:#fff7ed;--orange-100:#ffedd5;--orange-200:#fed7aa;--orange-300:#fdba74;--orange-400:#fb923c;--orange-500:#f97316;--orange-600:#ea580c;--orange-700:#c2410c;--orange-800:#9a3412;--orange-900:#7c2d12;
  --amber-50:#fffbeb;--amber-100:#fef3c7;--amber-200:#fde68a;--amber-300:#fcd34d;--amber-400:#fbbf24;--amber-500:#f59e0b;--amber-600:#d97706;--amber-700:#b45309;--amber-800:#92400e;--amber-900:#78350f;
  --yellow-50:#fefce8;--yellow-100:#fef9c3;--yellow-200:#fef08a;--yellow-300:#fde047;--yellow-400:#facc15;--yellow-500:#eab308;--yellow-600:#ca8a04;--yellow-700:#a16207;
  --lime-500:#84cc16;--lime-600:#65a30d;
  --green-50:#f0fdf4;--green-100:#dcfce7;--green-200:#bbf7d0;--green-300:#86efac;--green-400:#4ade80;--green-500:#22c55e;--green-600:#16a34a;--green-700:#15803d;--green-800:#166534;--green-900:#14532d;
  --emerald-50:#ecfdf5;--emerald-100:#d1fae5;--emerald-200:#a7f3d0;--emerald-300:#6ee7b7;--emerald-400:#34d399;--emerald-500:#10b981;--emerald-600:#059669;--emerald-700:#047857;--emerald-800:#065f46;--emerald-900:#064e3b;
  --teal-50:#f0fdfa;--teal-100:#ccfbf1;--teal-200:#99f6e4;--teal-300:#5eead4;--teal-400:#2dd4bf;--teal-500:#14b8a6;--teal-600:#0d9488;--teal-700:#0f766e;--teal-800:#115e59;
  --cyan-50:#ecfeff;--cyan-100:#cffafe;--cyan-200:#a5f3fc;--cyan-300:#67e8f9;--cyan-400:#22d3ee;--cyan-500:#06b6d4;--cyan-600:#0891b2;--cyan-700:#0e7490;
  --sky-50:#f0f9ff;--sky-100:#e0f2fe;--sky-200:#bae6fd;--sky-300:#7dd3fc;--sky-400:#38bdf8;--sky-500:#0ea5e9;--sky-600:#0284c7;
  --slate-50:#f8fafc;--slate-100:#f1f5f9;--slate-200:#e2e8f0;--slate-300:#cbd5e1;--slate-400:#94a3b8;--slate-500:#64748b;--slate-600:#475569;--slate-700:#334155;--slate-800:#1e293b;--slate-900:#0f172a;--slate-950:#020617;
  --gray-50:#f9fafb;--gray-100:#f3f4f6;--gray-200:#e5e7eb;--gray-300:#d1d5db;--gray-400:#9ca3af;--gray-500:#6b7280;--gray-600:#4b5563;--gray-700:#374151;--gray-800:#1f2937;--gray-900:#111827;
  --zinc-50:#fafafa;--zinc-100:#f4f4f5;--zinc-200:#e4e4e7;--zinc-300:#d4d4d8;--zinc-400:#a1a1aa;--zinc-500:#71717a;--zinc-600:#52525b;--zinc-700:#3f3f46;--zinc-800:#27272a;--zinc-900:#18181b;
  --neutral-100:#f5f5f5;--neutral-200:#e5e5e5;--neutral-300:#d4d4d4;--neutral-400:#a3a3a3;--neutral-500:#737373;--neutral-600:#525252;--neutral-800:#262626;--neutral-900:#171717;
  --stone-100:#f5f5f4;--stone-200:#e7e5e4;--stone-300:#d6d3d1;--stone-400:#a8a29e;--stone-500:#78716c;--stone-600:#57534e;
  --white:#ffffff; --black:#000000;
}

/* ----- Layout utilities ----------------------------------------------------- */
.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.sticky{position:sticky}.static{position:static}
.inset-0{top:0;right:0;bottom:0;left:0}
.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}
.top-1{top:.25rem}.top-2{top:.5rem}.top-4{top:1rem}
.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}

.block{display:block}.inline{display:inline}.inline-block{display:inline-block}
.inline-flex{display:inline-flex}.flex{display:flex}.grid{display:grid}.hidden{display:none}
.flex-row{flex-direction:row}.flex-col{flex-direction:column}
.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}
.flex-1{flex:1 1 0%}.flex-auto{flex:auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}
.items-start{align-items:flex-start}.items-center{align-items:center}.items-end{align-items:flex-end}.items-stretch{align-items:stretch}
.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}
.content-center{align-content:center}
.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}

.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}
.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}
.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}
.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}

.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-visible{overflow:visible}

/* Widths / heights */
.w-0{width:0}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-20{width:5rem}.w-24{width:6rem}.w-32{width:8rem}.w-40{width:10rem}.w-48{width:12rem}.w-56{width:14rem}.w-64{width:16rem}.w-72{width:18rem}.w-80{width:20rem}.w-96{width:24rem}
.w-full{width:100%}.w-screen{width:100vw}.w-auto{width:auto}.w-fit{width:fit-content}
.min-w-0{min-width:0}.min-w-full{min-width:100%}
.max-w-xs{max-width:20rem}.max-w-sm{max-width:24rem}.max-w-md{max-width:28rem}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.max-w-none{max-width:none}

.h-0{height:0}.h-1{height:.25rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-24{height:6rem}.h-32{height:8rem}.h-40{height:10rem}.h-48{height:12rem}.h-56{height:14rem}.h-64{height:16rem}
.h-full{height:100%}.h-screen{height:100vh}.h-auto{height:auto}
.min-h-0{min-height:0}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}
.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}

/* Padding / margin */
.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}
.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}
.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}
.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}

.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.m-auto{margin:auto}
.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}
.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}
.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}
.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}
.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}
.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}
.-mt-1{margin-top:-.25rem}

.space-y-0\.5 > * + *{margin-top:.125rem}
.space-y-1 > * + *{margin-top:.25rem}
.space-y-2 > * + *{margin-top:.5rem}
.space-y-3 > * + *{margin-top:.75rem}
.space-y-4 > * + *{margin-top:1rem}
.space-y-6 > * + *{margin-top:1.5rem}
.space-x-1 > * + *{margin-left:.25rem}
.space-x-2 > * + *{margin-left:.5rem}
.space-x-4 > * + *{margin-left:1rem}

/* Typography */
.text-\[9px\]{font-size:9px;line-height:1}.text-\[10px\]{font-size:10px;line-height:1}.text-\[11px\]{font-size:11px;line-height:1}
.text-xs{font-size:.75rem;line-height:1rem}
.text-sm{font-size:.875rem;line-height:1.25rem}
.text-base{font-size:1rem;line-height:1.5rem}
.text-lg{font-size:1.125rem;line-height:1.75rem}
.text-xl{font-size:1.25rem;line-height:1.75rem}
.text-2xl{font-size:1.5rem;line-height:2rem}
.text-3xl{font-size:1.875rem;line-height:2.25rem}
.text-4xl{font-size:2.25rem;line-height:2.5rem}
.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.font-black{font-weight:900}
.leading-none{line-height:1}.leading-tight{line-height:1.25}.leading-snug{line-height:1.375}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}
.tracking-tight{letter-spacing:-.025em}.tracking-normal{letter-spacing:0}.tracking-wide{letter-spacing:.025em}
.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}
.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}
.italic{font-style:italic}
.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}
.break-words{overflow-wrap:break-word}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}
.select-none{user-select:none}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}

/* Colors — foreground */
.text-foreground{color:var(--foreground)}
.text-background{color:var(--background)}
.text-primary{color:var(--primary)}
.text-primary-foreground{color:var(--primary-foreground)}
.text-secondary-foreground{color:var(--secondary-foreground)}
.text-muted-foreground{color:var(--muted-foreground)}
.text-muted-foreground\/40{color:color-mix(in oklch, var(--muted-foreground) 40%, transparent)}
.text-muted-foreground\/60{color:color-mix(in oklch, var(--muted-foreground) 60%, transparent)}
.text-accent-foreground{color:var(--accent-foreground)}
.text-destructive{color:var(--destructive)}
.text-destructive-foreground{color:var(--destructive-foreground)}
.text-sidebar-foreground{color:var(--sidebar-foreground)}
.text-sidebar-foreground\/70{color:color-mix(in oklch, var(--sidebar-foreground) 70%, transparent)}
.text-sidebar-accent-foreground{color:var(--sidebar-accent-foreground)}
.text-card-foreground{color:var(--card-foreground)}
.text-popover-foreground{color:var(--popover-foreground)}
.text-white{color:var(--white)}.text-black{color:var(--black)}

/* Colors — text hues 500/600 + dark variants */
.text-blue-400{color:var(--blue-400)}.text-blue-500{color:var(--blue-500)}.text-blue-600{color:var(--blue-600)}
.text-indigo-400{color:var(--indigo-400)}.text-indigo-500{color:var(--indigo-500)}.text-indigo-600{color:var(--indigo-600)}
.text-violet-500{color:var(--violet-500)}.text-violet-600{color:var(--violet-600)}
.text-purple-500{color:var(--purple-500)}.text-purple-600{color:var(--purple-600)}
.text-pink-500{color:var(--pink-500)}.text-pink-600{color:var(--pink-600)}
.text-rose-500{color:var(--rose-500)}.text-rose-600{color:var(--rose-600)}
.text-red-500{color:var(--red-500)}.text-red-600{color:var(--red-600)}
.text-orange-500{color:var(--orange-500)}.text-orange-600{color:var(--orange-600)}
.text-amber-400{color:var(--amber-400)}.text-amber-500{color:var(--amber-500)}.text-amber-600{color:var(--amber-600)}
.text-yellow-400{color:var(--yellow-400)}.text-yellow-500{color:var(--yellow-500)}.text-yellow-600{color:var(--yellow-600)}
.text-green-500{color:var(--green-500)}.text-green-600{color:var(--green-600)}.text-green-700{color:var(--green-700)}
.text-emerald-500{color:var(--emerald-500)}.text-emerald-600{color:var(--emerald-600)}
.text-teal-500{color:var(--teal-500)}.text-teal-600{color:var(--teal-600)}
.text-cyan-500{color:var(--cyan-500)}.text-cyan-600{color:var(--cyan-600)}
.text-sky-500{color:var(--sky-500)}
.text-slate-400{color:var(--slate-400)}.text-slate-500{color:var(--slate-500)}.text-slate-600{color:var(--slate-600)}.text-slate-700{color:var(--slate-700)}.text-slate-800{color:var(--slate-800)}.text-slate-900{color:var(--slate-900)}
.text-gray-400{color:var(--gray-400)}.text-gray-500{color:var(--gray-500)}.text-gray-600{color:var(--gray-600)}.text-gray-700{color:var(--gray-700)}

.dark .dark\:text-blue-400{color:var(--blue-400)}.dark .dark\:text-indigo-400{color:var(--indigo-400)}
.dark .dark\:text-amber-400{color:var(--amber-400)}.dark .dark\:text-yellow-400{color:var(--yellow-400)}
.dark .dark\:text-slate-400{color:var(--slate-400)}.dark .dark\:text-slate-300{color:var(--slate-300)}

/* Colors — bg */
.bg-background{background-color:var(--background)}
.bg-background\/95{background-color:color-mix(in oklch, var(--background) 95%, transparent)}
.bg-background\/60{background-color:color-mix(in oklch, var(--background) 60%, transparent)}
.bg-card{background-color:var(--card)}
.bg-popover{background-color:var(--popover)}
.bg-muted{background-color:var(--muted)}
.bg-muted\/50{background-color:color-mix(in oklch, var(--muted) 50%, transparent)}
.bg-accent{background-color:var(--accent)}
.bg-primary{background-color:var(--primary)}
.bg-primary\/10{background-color:color-mix(in oklch, var(--primary) 10%, transparent)}
.bg-secondary{background-color:var(--secondary)}
.bg-destructive{background-color:var(--destructive)}
.bg-destructive\/10{background-color:color-mix(in oklch, var(--destructive) 10%, transparent)}
.bg-sidebar{background-color:var(--sidebar)}
.bg-sidebar-accent{background-color:var(--sidebar-accent)}
.bg-white{background-color:var(--white)}.bg-black{background-color:var(--black)}
.bg-transparent{background-color:transparent}

.bg-blue-50{background:var(--blue-50)}.bg-blue-100{background:var(--blue-100)}.bg-blue-500{background:var(--blue-500)}.bg-blue-600{background:var(--blue-600)}
.bg-blue-500\/10{background:color-mix(in oklch, var(--blue-500) 10%, transparent)}
.bg-blue-50\/80{background:color-mix(in oklch, var(--blue-50) 80%, transparent)}
.bg-indigo-50{background:var(--indigo-50)}.bg-indigo-500\/10{background:color-mix(in oklch, var(--indigo-500) 10%, transparent)}
.bg-violet-500\/10{background:color-mix(in oklch, var(--violet-500) 10%, transparent)}
.bg-purple-500\/10{background:color-mix(in oklch, var(--purple-500) 10%, transparent)}
.bg-pink-500\/10{background:color-mix(in oklch, var(--pink-500) 10%, transparent)}
.bg-rose-500\/10{background:color-mix(in oklch, var(--rose-500) 10%, transparent)}
.bg-red-500\/10{background:color-mix(in oklch, var(--red-500) 10%, transparent)}
.bg-orange-500{background:var(--orange-500)}.bg-orange-500\/10{background:color-mix(in oklch, var(--orange-500) 10%, transparent)}
.bg-amber-500\/10{background:color-mix(in oklch, var(--amber-500) 10%, transparent)}
.bg-yellow-500\/10{background:color-mix(in oklch, var(--yellow-500) 10%, transparent)}
.bg-green-500\/10{background:color-mix(in oklch, var(--green-500) 10%, transparent)}
.bg-emerald-50{background:var(--emerald-50)}.bg-emerald-500\/10{background:color-mix(in oklch, var(--emerald-500) 10%, transparent)}
.bg-teal-500\/10{background:color-mix(in oklch, var(--teal-500) 10%, transparent)}
.bg-cyan-500\/10{background:color-mix(in oklch, var(--cyan-500) 10%, transparent)}
.bg-slate-500\/10{background:color-mix(in oklch, var(--slate-500) 10%, transparent)}

.dark .dark\:bg-blue-500\/10{background:color-mix(in oklch, var(--blue-500) 10%, transparent)}
.dark .dark\:bg-amber-500\/10{background:color-mix(in oklch, var(--amber-500) 10%, transparent)}

/* Borders */
.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}
.border-t{border-top-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}
.border-solid{border-style:solid}.border-dashed{border-style:dashed}
.border-border{border-color:var(--border)}
.border-input{border-color:var(--input)}
.border-ring{border-color:var(--ring)}
.border-sidebar-border{border-color:var(--sidebar-border)}
.border-transparent{border-color:transparent}
.border-blue-200{border-color:var(--blue-200)}.border-blue-500\/30{border-color:color-mix(in oklch, var(--blue-500) 30%, transparent)}
.dark .dark\:border-blue-500\/30{border-color:color-mix(in oklch, var(--blue-500) 30%, transparent)}

.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded{border-radius:.25rem}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-lg{border-radius:var(--radius)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}
.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}
.rounded-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}

/* Effects */
.shadow-xs{box-shadow:0 1px 2px rgba(0,0,0,.04)}
.shadow-sm{box-shadow:0 1px 2px rgba(0,0,0,.05)}
.shadow{box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06)}
.shadow-md{box-shadow:0 4px 6px -1px rgba(0,0,0,.10),0 2px 4px -1px rgba(0,0,0,.06)}
.shadow-lg{box-shadow:0 10px 15px -3px rgba(0,0,0,.10),0 4px 6px -2px rgba(0,0,0,.05)}
.shadow-xl{box-shadow:0 20px 25px -5px rgba(0,0,0,.10),0 10px 10px -5px rgba(0,0,0,.04)}
.shadow-none{box-shadow:none}

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

.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}

.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
.transition-colors{transition-property:color,background-color,border-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}
.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}

.rotate-0{transform:rotate(0)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}.-rotate-90{transform:rotate(-90deg)}

.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}

.outline-none{outline:2px solid transparent;outline-offset:2px}
.ring-0{box-shadow:0 0 0 0 transparent}
.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}
.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}
.focus-visible\:ring-0:focus-visible{box-shadow:0 0 0 0 transparent}
.focus-visible\:ring-2:focus-visible{box-shadow:0 0 0 2px color-mix(in oklch, var(--ring) 40%, transparent)}

/* Hover */
.hover\:bg-accent:hover{background:var(--accent)}
.hover\:bg-muted:hover{background:var(--muted)}
.hover\:bg-sidebar-accent:hover{background:var(--sidebar-accent)}
.hover\:bg-blue-100\/80:hover{background:color-mix(in oklch, var(--blue-100) 80%, transparent)}
.dark .dark\:hover\:bg-blue-500\/20:hover{background:color-mix(in oklch, var(--blue-500) 20%, transparent)}
.hover\:text-foreground:hover{color:var(--foreground)}
.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}
.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}
.hover\:opacity-70:hover{opacity:.7}
.hover\:underline:hover{text-decoration:underline}

/* Disabled */
.disabled\:opacity-50:disabled{opacity:.5}
.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}

/* Responsive (mobile first — sidebar vira drawer em <lg) */
@media (min-width:640px)  { .sm\:block{display:block} .sm\:inline-block{display:inline-block} .sm\:flex{display:flex} .sm\:grid{display:grid} .sm\:hidden{display:none} .sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (min-width:768px)  { .md\:block{display:block} .md\:flex{display:flex} .md\:grid{display:grid} .md\:hidden{display:none} .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))} .md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))} .md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))} .md\:flex-row{flex-direction:row} }
@media (min-width:1024px) { .lg\:block{display:block} .lg\:flex{display:flex} .lg\:grid{display:grid} .lg\:hidden{display:none} .lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))} .lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))} .lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))} .lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))} .lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))} .lg\:col-span-2{grid-column:span 2 / span 2} .lg\:col-span-3{grid-column:span 3 / span 3} }
@media (min-width:1280px) { .xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))} .xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))} }

/* ----- App shell (sidebar + header + content) ------------------------------ */
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; background: var(--background); color: var(--foreground); }
.app-shell[data-collapsible="icon"] { grid-template-columns: var(--sidebar-width-icon) 1fr; }
@media (max-width: 1023px) { .app-shell { grid-template-columns: 0 1fr; } }

/* ----- Sidebar ------------------------------------------------------------- */
.sidebar { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--sidebar); color: var(--sidebar-foreground); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; }
.app-shell[data-collapsible="icon"] .sidebar { width: var(--sidebar-width-icon); }
.sidebar-header { border-bottom: 1px solid var(--sidebar-border); }
.sidebar-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .5rem; display: flex; flex-direction: column; gap: 1rem; }
.app-shell[data-collapsible="icon"] .sidebar-content { padding: .25rem; }
.app-shell[data-collapsible="icon"] .sidebar-content::-webkit-scrollbar { display: none; }
.sidebar-footer { border-top: 1px solid var(--sidebar-border); padding: .5rem; }
.sidebar-group { display: flex; flex-direction: column; gap: .125rem; }
.sidebar-group[data-stick-bottom="true"] { margin-top: auto; }
.sidebar-group-label { font-size: .75rem; color: color-mix(in oklch, var(--sidebar-foreground) 60%, transparent); padding: .25rem .5rem; letter-spacing: .02em; }
.app-shell[data-collapsible="icon"] .sidebar-group-label,
.app-shell[data-collapsible="icon"] .only-expanded { display: none !important; }
.app-shell[data-collapsible="icon"] .only-collapsed { display: flex !important; }
.only-collapsed { display: none; }

.sidebar-item { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .375rem .5rem; border-radius: var(--radius-md); color: color-mix(in oklch, var(--sidebar-foreground) 80%, transparent); background: transparent; transition: background .15s, color .15s; font-size: .875rem; text-align: left; }
.sidebar-item:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); }
.sidebar-item[data-active="true"] { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); font-weight: 500; }
.sidebar-item .chev { margin-left: auto; transition: transform .2s; }
.sidebar-item[aria-expanded="true"] .chev { transform: rotate(90deg); }

.sidebar-submenu { display: none; padding-left: .75rem; margin-top: .125rem; position: relative; }
.sidebar-submenu::before { content: ''; position: absolute; left: .75rem; top: 0; bottom: 0; width: 1px; background: var(--sidebar-border); }
.sidebar-item[aria-expanded="true"] + .sidebar-submenu { display: flex; flex-direction: column; gap: .125rem; }
.app-shell[data-collapsible="icon"] .sidebar-submenu { display: none !important; }

.sidebar-sub-item { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem .375rem 1.25rem; border-radius: var(--radius-md); color: color-mix(in oklch, var(--sidebar-foreground) 75%, transparent); font-size: .8125rem; position: relative; }
.sidebar-sub-item:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); }
.sidebar-sub-item[data-active="true"] { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); font-weight: 500; }

.sidebar-nested { padding-left: 1rem; margin-top: .125rem; display: none; }
.sidebar-sub-item[aria-expanded="true"] + .sidebar-nested { display: flex; flex-direction: column; gap: .125rem; }

.sidebar-footer .user-trigger { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem; border-radius: var(--radius-md); background: transparent; width: 100%; }
.sidebar-footer .user-trigger:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); }

/* Collapsed: only icons */
.app-shell[data-collapsible="icon"] .sidebar-item > span:not(.icon),
.app-shell[data-collapsible="icon"] .sidebar-item .chev,
.app-shell[data-collapsible="icon"] .sidebar-sub-item > span:not(.icon) { display: none; }
.app-shell[data-collapsible="icon"] .sidebar-item, .app-shell[data-collapsible="icon"] .sidebar-sub-item { justify-content: center; padding: .5rem 0; }

/* Beta badge (posicionamento idêntico ao original) */
.sidebar-beta-badge { position: absolute; top: -6px; right: -28px; z-index: 50; pointer-events: none; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 9999px; background: var(--orange-500); color: var(--white); line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.2); white-space: nowrap; user-select: none; }

/* ----- Top bar ------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1rem; height: var(--header-height); padding: 0 1rem; border-bottom: 1px solid var(--border); background: color-mix(in oklch, var(--background) 95%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topbar .crumbs { display: flex; align-items: center; gap: .375rem; }
.topbar .spacer { flex: 1; }
.topbar .actions { display: flex; align-items: center; gap: .5rem; }

/* Icon button */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: var(--radius-md); color: var(--foreground); background: transparent; border: 0; }
.icon-btn:hover { background: var(--accent); }
.icon-btn.sm { width: 1.75rem; height: 1.75rem; }

/* Toggle sidebar */
.sidebar-toggle { width: 1.5rem; height: 1.5rem; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--foreground); }
.sidebar-toggle:hover { background: var(--accent); }

/* ----- Dropdown menu ------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; z-index: 60; min-width: 14rem; border: 1px solid var(--border); background: var(--popover); color: var(--popover-foreground); border-radius: var(--radius-md); padding: .25rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1); display: none; flex-direction: column; gap: .125rem; }
.dropdown[data-open="true"] > .dropdown-menu { display: flex; }
.dropdown-menu[data-align="end"] { right: 0; }
.dropdown-menu[data-align="start"] { left: 0; }
.dropdown-menu[data-side="top"] { bottom: calc(100% + 4px); }
.dropdown-menu[data-side="bottom"] { top: calc(100% + 4px); }
.dropdown-label { padding: .375rem .5rem; font-size: .75rem; color: var(--muted-foreground); }
.dropdown-separator { height: 1px; background: var(--border); margin: .25rem 0; }
.dropdown-item { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem; border-radius: var(--radius-sm); font-size: .875rem; cursor: pointer; color: var(--popover-foreground); }
.dropdown-item:hover { background: var(--accent); color: var(--accent-foreground); }
.dropdown-item.danger { color: var(--destructive); }
.dropdown-sub { position: relative; }
.dropdown-sub-trigger::after { content: '›'; margin-left: auto; opacity: .6; }
.dropdown-sub-menu { position: absolute; left: 100%; top: 0; min-width: 10rem; border: 1px solid var(--border); background: var(--popover); color: var(--popover-foreground); border-radius: var(--radius-md); padding: .25rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1); display: none; }
.dropdown-sub[data-open="true"] > .dropdown-sub-menu { display: flex; flex-direction: column; gap: .125rem; }
.dropdown-radio { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem; border-radius: var(--radius-sm); font-size: .875rem; cursor: pointer; }
.dropdown-radio:hover { background: var(--accent); }
.dropdown-radio[data-checked="true"]::before { content: '✓'; color: var(--primary); margin-right: .25rem; }

/* ----- Badge --------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .625rem; border-radius: 9999px; font-size: .75rem; font-weight: 500; border: 1px solid transparent; }
.badge.outline { border-color: var(--border); background: transparent; color: var(--foreground); }
.badge.org { border-color: var(--blue-200); background: color-mix(in oklch, var(--blue-50) 80%, transparent); color: var(--blue-600); }
.dark .badge.org { border-color: color-mix(in oklch, var(--blue-500) 30%, transparent); background: color-mix(in oklch, var(--blue-500) 10%, transparent); color: var(--blue-400); }

/* ----- Avatar -------------------------------------------------------------- */
.avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 9999px; overflow: hidden; background: color-mix(in oklch, var(--primary) 10%, transparent); color: var(--primary); font-size: .75rem; font-weight: 500; }
.avatar.lg { width: 2.5rem; height: 2.5rem; font-size: .875rem; }

/* ----- Card --------------------------------------------------------------- */
.card { border: 1px solid var(--border); background: var(--card); color: var(--card-foreground); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 0; padding: 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card-header { padding: 1.25rem 1.25rem .75rem; display: flex; flex-direction: column; gap: .375rem; }
.card-title { font-size: 1rem; font-weight: 600; line-height: 1.2; }
.card-description { font-size: .875rem; color: var(--muted-foreground); }
.card-content { padding: .75rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.card-footer { padding: .75rem 1.25rem 1.25rem; display: flex; align-items: center; gap: .5rem; }

/* ----- Button ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem 1rem; border-radius: var(--radius-md); font-size: .875rem; font-weight: 500; border: 0; background: var(--primary); color: var(--primary-foreground); cursor: pointer; transition: background .15s, color .15s, opacity .15s; }
.btn:hover { opacity: .9; }
.btn.ghost { background: transparent; color: var(--foreground); }
.btn.ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn.outline { background: transparent; color: var(--foreground); border: 1px solid var(--border); }
.btn.outline:hover { background: var(--accent); }
.btn.destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn.secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn.sm { padding: .375rem .625rem; font-size: .8125rem; }
.btn.lg { padding: .625rem 1.25rem; font-size: .9375rem; }
.btn.icon { padding: .375rem; width: 2rem; height: 2rem; }

/* ----- Sheet (side drawer) ------------------------------------------------ */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: 28rem; max-width: 100vw; background: var(--background); border-left: 1px solid var(--border); z-index: 90; transform: translateX(100%); transition: transform .25s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.sheet[data-open="true"] { transform: translateX(0); }
.sheet-header { padding: 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: start; justify-content: space-between; gap: .5rem; }
.sheet-title { font-size: 1rem; font-weight: 600; }
.sheet-body { flex: 1; overflow: auto; padding: 1.25rem; }
.sheet-close { margin-left: auto; }

/* ----- Dialog ------------------------------------------------------------- */
.dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.dialog-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }
.dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.96); opacity: 0; pointer-events: none; z-index: 90; width: min(32rem, calc(100vw - 2rem)); background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; display: flex; flex-direction: column; gap: 1rem; }
.dialog[data-open="true"] { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }

/* ----- Toast / sonner ---------------------------------------------------- */
.toast-region { position: fixed; bottom: 1rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; max-width: 24rem; }
.toast { pointer-events: auto; background: var(--popover); color: var(--popover-foreground); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .75rem 1rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,.12); font-size: .875rem; display: flex; gap: .5rem; align-items: start; }

/* Help sheet placeholder list */
.help-list { display: flex; flex-direction: column; gap: .75rem; }
.help-list .item { padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-md); }

/* ----- Welcome / Home content ------------------------------------------- */
.welcome-hero { text-align: center; padding: 1rem 1rem 2rem; }
.welcome-hero h1 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; }
.welcome-hero p { color: var(--muted-foreground); margin-top: .5rem; font-size: .95rem; max-width: 42rem; margin-inline: auto; }

.module-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1rem; padding: 0 1.5rem 2rem; max-width: 88rem; margin-inline: auto; }
@media (min-width: 640px)  { .module-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .module-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .module-grid { grid-template-columns: repeat(4, 1fr); } }

.module-card { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; border: 1px solid var(--border); background: var(--card); color: var(--card-foreground); border-radius: var(--radius-lg); transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden; }
.module-card:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(0,0,0,.12); border-color: color-mix(in oklch, var(--foreground) 20%, transparent); }
.module-card .icon-badge { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; background: color-mix(in oklch, currentColor 10%, transparent); }
.module-card .title { font-size: 1rem; font-weight: 600; }
.module-card .desc { font-size: .8125rem; color: var(--muted-foreground); min-height: 2rem; }
.module-card .meta { font-size: .75rem; color: var(--muted-foreground); display: flex; align-items: center; gap: .5rem; }

/* Migration notice */
.mig-notice { max-width: 48rem; margin: 3rem auto; padding: 2rem; border: 1px dashed color-mix(in oklch, var(--amber-500) 60%, transparent); border-radius: var(--radius-lg); background: color-mix(in oklch, var(--amber-500) 6%, var(--background)); display: flex; flex-direction: column; gap: 1rem; }
.mig-notice h2 { font-size: 1.125rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.mig-notice .row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .875rem; }
.mig-notice .row .k { color: var(--muted-foreground); }
.mig-notice code { font-family: var(--font-mono); background: var(--muted); padding: .125rem .375rem; border-radius: var(--radius-sm); font-size: .8125rem; }

/* Separator */
.separator { height: 1px; width: 100%; background: var(--border); }
.separator[data-orientation="vertical"] { width: 1px; height: 100%; }

/* Tooltip (CSS-only for simple sidebar tooltips when collapsed) */
.tooltip-host { position: relative; }
.tooltip-host > [data-tooltip] { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%) scale(.95); background: var(--popover); color: var(--popover-foreground); border: 1px solid var(--border); padding: .25rem .5rem; border-radius: var(--radius-sm); font-size: .75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; box-shadow: 0 4px 8px rgba(0,0,0,.08); z-index: 100; }
.app-shell[data-collapsible="icon"] .tooltip-host:hover > [data-tooltip] { opacity: 1; transform: translateY(-50%) scale(1); }

/* Misc */
.underline{text-decoration:underline}
.no-underline{text-decoration:none}
.select-text{user-select:text}
.align-middle{vertical-align:middle}
.aspect-square{aspect-ratio:1/1}
.aspect-video{aspect-ratio:16/9}
.object-contain{object-fit:contain}.object-cover{object-fit:cover}
.dark .dark\:invert{filter:invert(1)}

/* =============================================================================
   FASE 2 · UI Primitives
   ============================================================================= */

/* ---- Input / Label / Textarea / Select ---------------------------------- */
.ui-label { display:inline-block; font-size:.875rem; font-weight:500; color:var(--foreground); line-height:1.1; margin-bottom:.375rem; }
.ui-input, .ui-select, .textarea {
  display: block; width: 100%; min-height: 2.25rem;
  padding: .5rem .5rem;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  font: inherit; 
  font-size: .875rem;
  transition: border-color .15s, box-shadow .15s;
  outline: 0;
}
.ui-input:focus, .ui-select:focus, .textarea:focus {
  border-color: color-mix(in oklch, var(--ring) 60%, transparent);
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--ring) 10%, transparent);
}
.ui-input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.ui-input:disabled, .ui-select:disabled, .textarea:disabled { opacity:.5; cursor:not-allowed; background:var(--muted); }
.textarea { min-height: 4.5rem; resize: vertical; line-height: 1.5; }
.ui-select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right .625rem center; background-size: 1rem; }

/* ---- Checkbox / Radio (nativos estilizados) ----------------------------- */
.ui-checkbox, .ui-radio {
  appearance:none; -webkit-appearance:none;
  width:1rem; height:1rem; display:inline-flex; align-items:center; justify-content:center;
  border: 1px solid var(--input); background: var(--background);
  vertical-align:middle; margin: 0 .375rem 0 0;
  transition: background .15s, border-color .15s, box-shadow .15s; cursor: pointer;
}
.ui-checkbox { border-radius: var(--radius-sm); }
.ui-radio    { border-radius: 9999px; }
.ui-checkbox:checked, .ui-radio:checked { background: var(--primary); border-color: var(--primary); }
.ui-checkbox:checked::after { content:'✓'; color: var(--primary-foreground); font-size:.75rem; line-height:1; }
.ui-radio:checked::after { content:''; width:.375rem; height:.375rem; border-radius:9999px; background: var(--primary-foreground); }
.ui-checkbox:focus-visible, .ui-radio:focus-visible { box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 20%, transparent); }
.ui-checkbox:disabled, .ui-radio:disabled { opacity:.5; cursor:not-allowed; }

/* ---- Switch -------------------------------------------------------------- */
.ui-switch { display:inline-flex; align-items:center; vertical-align:middle; cursor:pointer; position:relative; }
.ui-switch-input { position:absolute; opacity:0; pointer-events:none; width:0; height:0; }
.ui-switch-track { position:relative; width:2.25rem; height:1.25rem; border-radius:9999px; background: var(--input); transition: background .2s; display:inline-block; }
.ui-switch-thumb { position:absolute; top:.125rem; left:.125rem; width:1rem; height:1rem; border-radius:9999px; background: var(--background); box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: transform .2s; }
.ui-switch-input:checked + .ui-switch-track { background: var(--primary); }
.ui-switch-input:checked + .ui-switch-track .ui-switch-thumb { transform: translateX(1rem); }
.ui-switch-input:disabled + .ui-switch-track { opacity:.5; cursor:not-allowed; }
.ui-switch-input:focus-visible + .ui-switch-track { box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 30%, transparent); }

/* ---- Progress ------------------------------------------------------------ */
.ui-progress { position:relative; width:100%; height:.5rem; background: var(--muted); border-radius: 9999px; overflow:hidden; }
.ui-progress-bar { height:100%; background: var(--primary); border-radius: 9999px; transition: width .3s ease; }

/* ---- Slider (range) ------------------------------------------------------ */
.ui-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 1.25rem; background: transparent; }
.ui-slider::-webkit-slider-runnable-track { height:.375rem; background: var(--muted); border-radius: 9999px; }
.ui-slider::-moz-range-track              { height:.375rem; background: var(--muted); border-radius: 9999px; }
.ui-slider::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:1rem; height:1rem; background: var(--primary); border-radius: 9999px; margin-top: -.3125rem; box-shadow: 0 1px 2px rgba(0,0,0,.15); cursor: pointer; }
.ui-slider::-moz-range-thumb     { width:1rem; height:1rem; background: var(--primary); border-radius: 9999px; border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.15); cursor: pointer; }

/* ---- Toggle button ------------------------------------------------------- */
.ui-toggle { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; padding:.375rem .625rem; border-radius: var(--radius-md); background: transparent; color: var(--foreground); border: 1px solid transparent; font-size:.875rem; font-weight:500; }
.ui-toggle:hover { background: var(--accent); color: var(--accent-foreground); }
.ui-toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-foreground); border-color: var(--border); }

/* ---- Tabs ---------------------------------------------------------------- */
.ui-tabs { display:flex; flex-direction:column; gap:1rem; }
.ui-tabs-list { display:inline-flex; align-items:center; gap:.25rem; padding:.25rem; background: var(--muted); border-radius: var(--radius-md); width: fit-content; }
.ui-tabs-trigger { padding:.375rem .75rem; border-radius: calc(var(--radius) - 4px); font-size:.875rem; font-weight:500; color: var(--muted-foreground); background: transparent; border:0; cursor:pointer; transition: background .15s, color .15s; }
.ui-tabs-trigger:hover { color: var(--foreground); }
.ui-tabs[data-value] .ui-tabs-trigger[data-active="true"] { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ui-tabs-content { display:none; }
.ui-tabs-content[data-active="true"] { display:block; }

/* ---- Accordion ----------------------------------------------------------- */
.ui-accordion { border: 1px solid var(--border); border-radius: var(--radius-md); }
.ui-accordion-item { border-bottom: 1px solid var(--border); }
.ui-accordion-item:last-child { border-bottom: 0; }
.ui-accordion-trigger { display:flex; align-items:center; justify-content:space-between; width:100%; padding:.875rem 1rem; background: transparent; border:0; font: inherit; font-weight:500; color: var(--foreground); text-align:left; cursor: pointer; }
.ui-accordion-trigger:hover { background: var(--accent); }
.ui-accordion-chev { transition: transform .2s; color: var(--muted-foreground); margin-left: .75rem; }
.ui-accordion-item[data-open="true"] .ui-accordion-chev { transform: rotate(180deg); }
.ui-accordion-content { padding: 0 1rem; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; color: var(--muted-foreground); font-size:.875rem; }
.ui-accordion-item[data-open="true"] .ui-accordion-content { padding: .25rem 1rem 1rem; max-height: 40rem; }

/* ---- Alert --------------------------------------------------------------- */
.ui-alert { display:flex; gap:.75rem; padding: .875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--card-foreground); align-items:flex-start; }
.ui-alert.info        { border-color: color-mix(in oklch, var(--blue-500) 40%, transparent);    background: color-mix(in oklch, var(--blue-500) 6%, var(--background)); }
.ui-alert.warning     { border-color: color-mix(in oklch, var(--amber-500) 50%, transparent);   background: color-mix(in oklch, var(--amber-500) 8%, var(--background)); }
.ui-alert.success     { border-color: color-mix(in oklch, var(--emerald-500) 40%, transparent); background: color-mix(in oklch, var(--emerald-500) 6%, var(--background)); }
.ui-alert.destructive { border-color: color-mix(in oklch, var(--destructive) 50%, transparent); background: color-mix(in oklch, var(--destructive) 6%, var(--background)); }
.ui-alert .ui-alert-icon { margin-top:.125rem; flex-shrink:0; }
.ui-alert.info        .ui-alert-icon { color: var(--blue-500); }
.ui-alert.warning     .ui-alert-icon { color: var(--amber-500); }
.ui-alert.success     .ui-alert-icon { color: var(--emerald-500); }
.ui-alert.destructive .ui-alert-icon { color: var(--destructive); }
.ui-alert-body { flex:1; display:flex; flex-direction:column; gap:.25rem; }
.ui-alert-title { font-weight:600; font-size:.9375rem; line-height:1.3; }
.ui-alert-desc { font-size:.875rem; color: var(--muted-foreground); }

/* ---- Breadcrumb ---------------------------------------------------------- */
.ui-breadcrumb { display:flex; align-items:center; gap:.375rem; font-size:.875rem; color: var(--muted-foreground); flex-wrap: wrap; }
.ui-breadcrumb-item { color: var(--muted-foreground); display:inline-flex; align-items:center; gap:.25rem; }
.ui-breadcrumb-item:hover { color: var(--foreground); }
.ui-breadcrumb-item.current { color: var(--foreground); font-weight:500; }
.ui-breadcrumb-sep { padding: 0 .125rem; }

/* ---- Table --------------------------------------------------------------- */
.ui-table-wrap { width:100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.ui-table { width:100%; border-collapse: collapse; font-size:.875rem; }
.ui-table thead { background: var(--muted); }
.ui-table th { text-align:left; padding: .625rem .875rem; font-weight:600; color: var(--muted-foreground); font-size:.75rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--border); }
.ui-table td { padding: .75rem .875rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ui-table tbody tr:last-child td { border-bottom: 0; }
.ui-table tbody tr:hover { background: var(--muted); }

/* ---- ScrollArea ---------------------------------------------------------- */
.ui-scroll-area { overflow-y: auto; overflow-x: hidden; border-radius: var(--radius-sm); }

/* ---- Skeleton ------------------------------------------------------------ */
.skeleton { display:block; background: linear-gradient(90deg, var(--muted) 0%, color-mix(in oklch, var(--muted) 60%, transparent) 50%, var(--muted) 100%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s ease-in-out infinite; border-radius: var(--radius-sm); min-height: .75rem; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- Dialog body -------------------------------------------------------- */
.dialog-body { display:flex; flex-direction:column; gap:.5rem; color: var(--card-foreground); font-size:.875rem; }
.dialog .dialog-footer { display:flex; gap:.5rem; justify-content:flex-end; margin-top: .5rem; }

/* ---- Popover content (já usa .dropdown-menu) ---------------------------- */
.popover-content { padding: .75rem; min-width: 14rem; max-width: 24rem; }

/* ---- UI Preview page helpers ------------------------------------------- */
.preview-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.preview-section { display:flex; flex-direction:column; gap:.75rem; }
.preview-section h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); font-weight:700; }
.preview-row { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }

/* =============================================================================
   FASE 3 · Auth + Hub Dashboard
   ============================================================================= */

/* ---- Auth layout ---------------------------------------------------------- */
.auth-body { background: #F3F5FA; min-height: 100vh; margin: 0; }
.dark .auth-body { background: var(--background); }

.auth-shell { display: flex; min-height: 100vh; }
.auth-pane-left { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; }
@media (min-width: 1024px) {
  .auth-pane-left { width: 50%; flex: none; padding: 2rem 4rem; }
}
@media (min-width: 1280px) { .auth-pane-left { padding: 2rem 6rem; } }
.auth-pane-right { display: none; position: relative; overflow: hidden; border-radius: 1.5rem; margin: .5rem; }
@media (min-width: 1024px) { .auth-pane-right { display: block; width: 50%; } }

.auth-pane-right .auth-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }

.auth-form-wrap { width: 100%; max-width: 28rem; margin: 0 auto; }
.auth-title { font-size: 1.875rem; font-weight: 700; color: var(--foreground); line-height: 1.2; letter-spacing: -.02em; }
.auth-subtitle { margin-top: .5rem; color: var(--muted-foreground); font-size: .9375rem; }

.auth-field { display: flex; flex-direction: column; gap: .5rem; }
.auth-field label { font-size: .875rem; font-weight: 500; color: var(--foreground); }
.auth-field .required { color: var(--destructive); }
.input-wrap { position: relative; }
.auth-field .input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute; left: .625rem; top: 50%; transform: translateY(-50%); pointer-events: none;
  width: 1rem; height: 1rem; color: var(--muted-foreground);
}
.ui-input.has-icon { padding-left: 2.25rem; }
.auth-field .input-wrap .input-icon {
  position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); pointer-events: none;
  width: 1.125rem; height: 1.125rem;
}
.auth-field .input-wrap .input-action {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--muted-foreground); cursor: pointer;
  display:inline-flex; align-items:center; justify-content:center; padding: 0;
}
.auth-field .input-wrap .input-action:hover { color: var(--foreground); }
.auth-field .ui-input.has-icon { padding-left: 2.5rem; background: #F6F9FC; }
.auth-field .ui-input.has-action { padding-right: 2.5rem; }
.dark .auth-field .ui-input.has-icon { background: var(--input); }

.auth-btn-primary {
  display:inline-flex; align-items:center; justify-content:center; gap: .5rem;
  width: 100%; padding: .75rem 1.25rem; border-radius: var(--radius-md);
  background: var(--blue-600); color: #fff; font-weight: 500; font-size: .9375rem;
  border: 0; cursor: pointer; transition: background .15s;
}
.auth-btn-primary:hover:not(:disabled) { background: var(--blue-700); }
.auth-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.auth-link { color: var(--blue-600); font-size: .875rem; }
.auth-link:hover { text-decoration: underline; }

.auth-alert { display:flex; align-items:center; gap:.5rem; padding:.75rem 1rem; margin-bottom:1.25rem; background:color-mix(in oklch,var(--destructive) 10%,transparent); color:var(--destructive); border:1px solid color-mix(in oklch,var(--destructive) 30%,transparent); border-radius:var(--radius-md); font-size:.875rem; font-weight:500; }
.auth-alert [data-icon] { flex-shrink:0; }

.auth-back { display:inline-flex; align-items:center; gap: .5rem; padding: .625rem 1rem; background: var(--blue-600); color:#fff; border-radius: var(--radius-md); font-size: .875rem; font-weight: 500; margin-bottom: 2rem; border: 0; cursor: pointer; }
.auth-back:hover { background: var(--blue-700); }

/* OTP inputs */
.otp-row { display: flex; gap: .75rem; }
.otp-input {
  height: 3.5rem; flex: 1; text-align: center; font-size: 1.25rem; font-weight: 600;
  background: #F6F9FC; border: 1px solid var(--input); border-radius: var(--radius-md);
  color: var(--foreground); outline: 0; transition: border-color .15s, box-shadow .15s;
}
.otp-input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px color-mix(in oklch, var(--blue-500) 20%, transparent); }
.dark .otp-input { background: var(--input); }

.auth-info-card { margin-top: 2rem; padding: 1rem; background: color-mix(in oklch, var(--muted) 50%, transparent); border: 1px solid var(--border); border-radius: var(--radius-md); display: flex; gap: .75rem; }
.auth-info-card .icon { flex-shrink: 0; color: var(--blue-600); }

/* ---- Hub Dashboard --------------------------------------------------------- */
.hub-wrap { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem; max-width: 88rem; margin: 0 auto; width: 100%; }

.hub-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1rem;
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--muted) 40%, transparent);
}
.hub-empty .icon-wrap { width: 4rem; height: 4rem; border-radius: 9999px; background: var(--background); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.project-type-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .875rem; }
.project-type-card {
  display: flex; align-items: flex-start; gap: .875rem;
  padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); color: var(--card-foreground); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  text-align: left; width: 100%;
}
.project-type-card:hover { border-color: color-mix(in oklch, var(--foreground) 25%, transparent); box-shadow: 0 4px 12px -4px rgba(0,0,0,.1); }
.project-type-card[data-selected="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 30%, transparent); }
.project-type-card .ptype-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md); display:inline-flex; align-items:center; justify-content:center; flex-shrink: 0; }
.project-type-card .ptype-body { flex: 1; min-width: 0; }
.project-type-card .ptype-label { font-weight: 600; font-size: .9375rem; }
.project-type-card .ptype-desc { font-size: .8125rem; color: var(--muted-foreground); margin-top: .125rem; line-height: 1.4; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 1rem; }
.stepper .step { display: flex; align-items: center; gap: .5rem; }
.stepper .step-num { width: 1.75rem; height: 1.75rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 600; background: var(--muted); color: var(--muted-foreground); }
.stepper .step.active .step-num { background: var(--foreground); color: var(--background); }
.stepper .step.done .step-num { background: var(--emerald-500); color: #fff; }
.stepper .step-line { width: 4rem; height: 1px; background: var(--border); }

/* Widgets list */
.widget-item { display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.widget-item .widget-meta { flex: 1; min-width: 0; }
.widget-item .widget-label { font-weight: 500; font-size: .9375rem; }
.widget-item .widget-desc { font-size: .8125rem; color: var(--muted-foreground); margin-top: .125rem; }

/* AI prompt box */
.ai-box { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in oklch, var(--primary) 3%, var(--card)); }
.ai-box textarea { min-height: 6rem; }

/* Dashboard list card */
.dashboard-list-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }
.dashboard-list-card .thumb { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md); display: inline-flex; align-items:center; justify-content:center; flex-shrink: 0; }
.dashboard-list-card .meta { flex: 1; min-width: 0; }
.dashboard-list-card .actions { display: flex; gap: .5rem; }

/* Mock widget chart */
.mock-widget { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); min-height: 10rem; }
.mock-chart-bars { display: flex; gap: .375rem; align-items: end; height: 4rem; }
.mock-chart-bars .bar { flex: 1; background: var(--primary); border-radius: .125rem .125rem 0 0; opacity: .6; }
.mock-chart-bars .bar:last-child { opacity: 1; }

/* =============================================================================
   FASE 4 · Commerce (B2B / B2C / B2R)
   ============================================================================= */

.commerce-wrap { display:flex; flex-direction:column; gap:1rem; padding:1.5rem; max-width:96rem; margin:0 auto; width:100%; }

/* Horizontal tab menu matching original */
.commerce-tabs { display:flex; align-items:center; gap:.25rem; background:var(--muted); border-radius: .75rem; padding:.25rem; flex-wrap:wrap; }
.commerce-tab {
  display:inline-flex; align-items:center; gap:.5rem; padding:.5rem 1rem; border-radius:.5rem;
  font-size:.875rem; font-weight:500; color:var(--muted-foreground); background:transparent; border:0; cursor:pointer;
  transition: background .15s, color .15s, box-shadow .15s; white-space:nowrap;
}
.commerce-tab:hover { color:var(--foreground); }
.commerce-tab[data-active="true"] { background:var(--background); color:var(--foreground); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.commerce-empty { padding:2rem; text-align:center; color:var(--muted-foreground); font-size:.875rem; }

/* Notif message styles (inline, transitory) */
.notif-inline { padding:.5rem .75rem; border:1px solid; border-radius:.25rem; font-size:.75rem; font-weight:500; }
.notif-inline.success { background: var(--green-50); border-color: var(--green-200); color: var(--green-700); }
.notif-inline.info    { background: var(--sky-50);   border-color: var(--sky-200);   color: var(--sky-700); }
.notif-inline.error   { background: var(--red-50);   border-color: var(--red-200);   color: var(--red-700); }
.dark .notif-inline.success { background: color-mix(in oklch, var(--green-500) 12%, transparent); border-color: color-mix(in oklch, var(--green-500) 40%, transparent); color: var(--green-400); }
.dark .notif-inline.info    { background: color-mix(in oklch, var(--sky-500) 12%, transparent);   border-color: color-mix(in oklch, var(--sky-500) 40%, transparent);   color: var(--sky-400); }
.dark .notif-inline.error   { background: color-mix(in oklch, var(--red-500) 12%, transparent);   border-color: color-mix(in oklch, var(--red-500) 40%, transparent);   color: var(--red-400); }

/* Small inputs (h-8, text-sm) used across commerce forms */
.ui-input.h-8 { min-height: 2rem; padding: .375rem .625rem; font-size:.8125rem; }
.ui-input.h-9 { min-height: 2.25rem; padding: .5rem .75rem; font-size:.875rem; }

/* Sky button (original uses bg-sky-500) */
.btn.sky { background: var(--sky-500); color: #fff; border:0; }
.btn.sky:hover { background: var(--sky-600); opacity:1; }

/* Filter grid used in menu-link-banner */
.filter-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:.5rem; }
@media (max-width: 900px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .filter-grid { grid-template-columns: 1fr; } }

/* Small status pills used across commerce */
.pill { display:inline-flex; align-items:center; padding:.125rem .5rem; border-radius:9999px; border:1px solid; font-size:10px; font-weight:600; }
.pill.aguardando { background: var(--amber-100); color: var(--amber-700); border-color: var(--amber-200); }
.pill.cancelado  { background: var(--red-100);   color: var(--red-700);   border-color: var(--red-200); }
.pill.recusado   { background: var(--gray-100);  color: var(--gray-600);  border-color: var(--gray-200); }
.pill.enviado    { background: var(--green-100); color: var(--green-700); border-color: var(--green-200); }
.pill.agendado   { background: var(--sky-100);   color: var(--sky-700);   border-color: var(--sky-200); }
.pill.rascunho   { background: var(--gray-100);  color: var(--gray-600);  border-color: var(--gray-200); }
.dark .pill.aguardando { background: color-mix(in oklch, var(--amber-500) 18%, transparent); color: var(--amber-300); border-color: color-mix(in oklch, var(--amber-500) 40%, transparent); }
.dark .pill.cancelado  { background: color-mix(in oklch, var(--red-500) 15%, transparent); color: var(--red-300); border-color: color-mix(in oklch, var(--red-500) 40%, transparent); }
.dark .pill.recusado   { background: color-mix(in oklch, var(--muted) 50%, transparent); color: var(--muted-foreground); border-color: var(--border); }
.dark .pill.enviado    { background: color-mix(in oklch, var(--green-500) 15%, transparent); color: var(--green-300); border-color: color-mix(in oklch, var(--green-500) 40%, transparent); }
.dark .pill.agendado   { background: color-mix(in oklch, var(--sky-500) 15%, transparent); color: var(--sky-300); border-color: color-mix(in oklch, var(--sky-500) 40%, transparent); }
.dark .pill.rascunho   { background: color-mix(in oklch, var(--muted) 50%, transparent); color: var(--muted-foreground); border-color: var(--border); }

/* Smartphone mockup (used in notifications preview) */
.phone-mockup { position:relative; background:#111827; border-radius: 2.5rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); width: 220px; height: 420px; padding: 14px 10px; }
.phone-mockup::before { content:''; position:absolute; top:12px; left:50%; transform: translateX(-50%); width:64px; height:12px; background:#000; border-radius:9999px; z-index:10; }
.phone-mockup .screen { background:#fff; border-radius: 1.8rem; overflow:hidden; height:100%; display:flex; flex-direction:column; color:#1f2937; }
.phone-mockup .status-bar { display:flex; align-items:center; justify-content:space-between; padding: 12px 16px 4px; font-size:9px; font-weight:600; }
.phone-mockup .nav-bar { display:flex; align-items:center; justify-content:space-between; padding: 6px 12px; border-bottom: 1px solid #e5e7eb; color: var(--sky-500); font-size:10px; font-weight:500; }
.phone-mockup .content { flex:1; padding: 12px; display:flex; flex-direction:column; gap: 8px; }
.phone-mockup .bubble { background: var(--sky-500); color:#fff; padding: 8px 12px; border-radius: 1rem 1rem 0 1rem; font-size:11px; max-width: 80%; margin-left: auto; }
.phone-mockup .sender-row { display:flex; align-items:center; gap:6px; font-size:10px; color:#6b7280; margin-top:6px; }

/* =============================================================================
   FASE 5 · Clube de Vantagens + Showroom Virtual
   ============================================================================= */

.cs-wrap { display:flex; flex-direction:column; min-height:100vh; background:var(--background); }
.cs-header { border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; }
.cs-header h1 { font-size: 1.125rem; font-weight:600; line-height:1; }
.cs-header p { font-size:.75rem; color: var(--muted-foreground); margin-top:.125rem; }
.cs-tabs { display:flex; align-items:center; gap:.25rem; background:var(--muted); border-radius: .75rem; padding:.25rem; flex-wrap:wrap; width:fit-content; margin-top: 1rem; }
.cs-tab { display:inline-flex; align-items:center; gap:.5rem; padding:.5rem .75rem; border-radius:.5rem; font-size:.875rem; font-weight:500; color:var(--muted-foreground); background:transparent; border:0; cursor:pointer; white-space:nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.cs-tab:hover { color: var(--foreground); }
.cs-tab[data-active="true"] { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cs-body { flex:1; overflow:auto; padding: 1.5rem; }

/* KPI cards */
.kpi-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width:768px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width:1024px) { .kpi-grid { grid-template-columns: repeat(6, 1fr); } }
.kpi-card { border: 1px solid var(--border); background: var(--card); border-radius: .75rem; padding: 1rem; display:flex; flex-direction:column; gap:.5rem; }
.kpi-card .kpi-top { display:flex; align-items:center; justify-content:space-between; }
.kpi-card .kpi-label { font-size:.75rem; color:var(--muted-foreground); line-height:1.1; }
.kpi-card .kpi-icon-bg { padding:.375rem; border-radius:.5rem; display:inline-flex; }
.kpi-card .kpi-value { font-size:1.25rem; font-weight:700; }
.kpi-card .kpi-delta.up { color: var(--emerald-500); font-size:.75rem; font-weight:500; }
.kpi-card .kpi-delta.down { color: var(--rose-500); font-size:.75rem; font-weight:500; }

/* Tier/Plano pills */
.tier-pill { display:inline-flex; align-items:center; padding:.125rem .5rem; border:1px solid; border-radius:9999px; font-size:10px; font-weight:600; }
.tier-bronze   { color: #cd7f32; border-color: #cd7f3333; background: #cd7f3320; }
.tier-prata    { color: var(--slate-500); border-color: var(--slate-200); background: var(--slate-100); }
.tier-ouro     { color: var(--amber-600); border-color: var(--amber-200); background: var(--amber-100); }
.tier-platinum { color: var(--violet-600); border-color: var(--violet-200); background: var(--violet-100); }
.dark .tier-prata { color: var(--slate-300); border-color: color-mix(in oklch, var(--slate-500) 40%, transparent); background: color-mix(in oklch, var(--slate-500) 15%, transparent); }
.dark .tier-ouro { color: var(--amber-300); border-color: color-mix(in oklch, var(--amber-500) 40%, transparent); background: color-mix(in oklch, var(--amber-500) 15%, transparent); }
.dark .tier-platinum { color: var(--violet-300); border-color: color-mix(in oklch, var(--violet-500) 40%, transparent); background: color-mix(in oklch, var(--violet-500) 15%, transparent); }

/* Chart utility - vertical bars */
.vbars { display:flex; align-items:flex-end; gap:.5rem; height: 10rem; padding: .5rem 0; }
.vbars .vbar { flex:1; display:flex; flex-direction:column; gap:.125rem; align-items:center; }
.vbars .vbar .stack { width:100%; border-radius:.25rem .25rem 0 0; transition: height .3s; }
.vbars .vbar .xl { font-size:10px; color: var(--muted-foreground); margin-top:.25rem; }

/* Ring progress */
.ring { position:relative; width:6rem; height:6rem; border-radius:9999px; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--muted) 0); display:inline-flex; align-items:center; justify-content:center; }
.ring::before { content:''; position:absolute; inset:.375rem; border-radius:9999px; background: var(--card); }
.ring .value { position:relative; z-index:1; font-size:.875rem; font-weight:700; }

/* Status pills shared with commerce */
.pill.ativo     { background: color-mix(in oklch, var(--emerald-500) 15%, transparent); color: var(--emerald-700); border-color: color-mix(in oklch, var(--emerald-500) 40%, transparent); }
.pill.oculto    { background: color-mix(in oklch, var(--slate-500) 15%, transparent); color: var(--slate-600); border-color: color-mix(in oklch, var(--slate-500) 40%, transparent); }
.pill.arquivado { background: color-mix(in oklch, var(--slate-500) 10%, transparent); color: var(--slate-500); border-color: color-mix(in oklch, var(--slate-500) 30%, transparent); }
.pill.inativo   { background: color-mix(in oklch, var(--slate-500) 15%, transparent); color: var(--slate-500); border-color: color-mix(in oklch, var(--slate-500) 40%, transparent); }
.pill.suspenso  { background: color-mix(in oklch, var(--rose-500) 15%, transparent); color: var(--rose-600); border-color: color-mix(in oklch, var(--rose-500) 40%, transparent); }

/* Cards with color accents */
.feature-card { border-left: 3px solid var(--primary); padding: 1rem; border-radius: .5rem; background: var(--card); }

/* =============================================================================
   Dashboard AI
   ============================================================================= */
/* KPI grid: 4 cols for AI dashboard sections */
.ai-kpi-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width:768px)  { .ai-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width:1024px) { .ai-kpi-grid { grid-template-columns: repeat(4, 1fr); } }

/* KPI accent borders */
.kpi-card.token { border-left: 3px solid var(--emerald-500); }
.kpi-card.order { border-left: 3px solid var(--amber-500); }
.kpi-card.extra { border-left: 3px solid var(--cyan-500); }
.kpi-card .kpi-accent { color: var(--emerald-500); }

/* Section title separator */
.ai-section-title { display:flex; align-items:center; gap:.5rem; font-size:.8125rem; font-weight:600; color:var(--muted-foreground); text-transform:uppercase; letter-spacing:.06em; margin-bottom:.75rem; padding-bottom:.5rem; border-bottom:1px solid var(--border); }

/* Two-column layout: table + chart */
.ai-two-col { display:grid; grid-template-columns:1fr; gap:1rem; margin-top:1rem; }
@media (min-width:1024px) { .ai-two-col { grid-template-columns: 3fr 2fr; } }

/* Dialog wide (user detail modal) */
.dialog.dialog-wide { width: min(92vw, 1100px); max-height: 85vh; display:flex; flex-direction:column; }
.dialog.dialog-wide .dialog-body { overflow-y:auto; flex:1; padding:0; }
.dialog-header { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.25rem; border-bottom:1px solid var(--border); gap:.5rem; }
.dialog-header-title { font-size:.9375rem; font-weight:600; display:flex; align-items:center; gap:.5rem; }
.dialog-footer { display:flex; justify-content:flex-end; padding:.875rem 1.25rem; border-top:1px solid var(--border); }

/* Responsive filter bar for Dashboard AI */
@media (max-width: 768px) {
    .ai-filter-grid { grid-template-columns: 1fr 1fr !important; }
    .ai-filter-grid > div:first-child { grid-column: span 2; }
}

/* =============================================================================
   FASE 13 · Polimento - animações e transições
   ============================================================================= */
@keyframes s1-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes s1-slide-in-right { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes s1-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes s1-spin { to { transform: rotate(360deg); } }

.card, .kpi-card, .commerce-tab, .cs-tab, .project-type-card, .widget-item {
    animation: s1-fade-in .3s ease-out;
}
.toast { animation: s1-slide-in-right .25s ease-out; }
.loading-pulse { animation: s1-pulse 1.5s ease-in-out infinite; }
.loading-spin  { animation: s1-spin 1s linear infinite; }

/* Transitions globais */
.btn, .commerce-tab, .cs-tab, .project-type-card, .ui-toggle, .ui-switch-track,
.kpi-card, .card, .widget-item, .sidebar-item {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.btn:active { transform: translateY(1px); }
.card:hover { box-shadow: 0 4px 12px -4px rgba(0,0,0,.08); }

/* Logo 3D canvas placeholder */
.logo-3d-canvas { display:block; width:100%; max-width:360px; aspect-ratio:1; margin: 0 auto; }

/* Scrollbar styling (opcional) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in oklch, var(--muted) 80%, transparent); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in oklch, var(--muted-foreground) 60%, transparent); }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
