/* YouBot SaaS - Estilos */
:root{--emerald:#10b981;--emerald-dark:#059669;--gray-50:#f9fafb;--gray-100:#f3f4f6;--gray-200:#e5e7eb;--gray-300:#d1d5db;--gray-500:#6b7280;--gray-700:#374151;--gray-900:#111827;--radius:0.75rem}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:#fff;color:var(--gray-900);line-height:1.6;-webkit-font-smoothing:antialiased}

/* Utilities */
.hidden{display:none!important}.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.w-full{width:100%}.text-center{text-align:center}.text-sm{font-size:.875rem}.text-xs{font-size:.75rem}.text-lg{font-size:1.125rem}.text-xl{font-size:1.25rem}.text-2xl{font-size:1.5rem}.text-3xl{font-size:1.875rem}.text-4xl{font-size:2.25rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.font-medium{font-weight:500}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-20{padding-top:5rem;padding-bottom:5rem}.rounded{border-radius:var(--radius)}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.min-h-screen{min-height:100vh}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.grid{display:grid}.grid-cols-2{grid-template-columns:repeat(2,1fr)}.grid-cols-3{grid-template-columns:repeat(3,1fr)}.relative{position:relative}.absolute{position:absolute}.sticky{position:sticky}.top-0{top:0}.z-50{z-index:50}.shadow{box-shadow:0 1px 3px rgba(0,0,0,.1)}.shadow-lg{box-shadow:0 10px 15px -3px rgba(0,0,0,.1)}.shadow-xl{box-shadow:0 20px 25px -5px rgba(0,0,0,.1)}.border{border:1px solid var(--gray-200)}.border-b{border-bottom:1px solid var(--gray-200)}.cursor-pointer{cursor:pointer}.transition{transition:all .2s}.opacity-50{opacity:.5}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.625rem 1.25rem;border-radius:var(--radius);font-size:.875rem;font-weight:500;border:none;cursor:pointer;transition:all .15s;white-space:nowrap}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--emerald);color:#fff}.btn-primary:hover{background:var(--emerald-dark)}
.btn-outline{background:#fff;color:var(--gray-700);border:1px solid var(--gray-300)}.btn-outline:hover{background:var(--gray-50)}
.btn-ghost{background:transparent;color:var(--gray-600)}.btn-ghost:hover{background:var(--gray-100)}
.btn-lg{padding:.875rem 2rem;font-size:1rem;border-radius:.5rem}
.btn-sm{padding:.375rem .75rem;font-size:.8125rem}
.btn-danger{background:#fee2e2;color:#dc2626}.btn-danger:hover{background:#fecaca}

/* Form */
input[type=text],input[type=email],input[type=password],input[type=number],input[type=url],input[type=tel],input[type=time],input[type=date],select,textarea{width:100%;padding:.625rem .875rem;border:1px solid var(--gray-300);border-radius:var(--radius);font-size:.875rem;outline:none;transition:border-color .15s;background:#fff}
input:focus,select:focus,textarea:focus{border-color:var(--emerald);box-shadow:0 0 0 3px rgba(16,185,129,.1)}
label{display:block;font-size:.875rem;font-weight:500;color:var(--gray-700);margin-bottom:.375rem}
textarea{resize:vertical;min-height:80px}

/* Card */
.card{background:#fff;border:1px solid var(--gray-200);border-radius:.75rem;overflow:hidden}
.card-header{padding:1rem 1.25rem;border-bottom:1px solid var(--gray-100)}
.card-title{font-size:1rem;font-weight:600;color:var(--gray-900)}
.card-body{padding:1.25rem}

/* Badge */
.badge{display:inline-flex;align-items:center;padding:.25rem .625rem;border-radius:9999px;font-size:.75rem;font-weight:500}
.badge-new{background:#dbeafe;color:#1d4ed8}.badge-contacted{background:#fef3c7;color:#92400e}.badge-qualified{background:#d1fae5;color:#065f46}.badge-lost{background:#fee2e2;color:#991b1b}
.badge-confirmed{background:#d1fae5;color:#065f46}.badge-cancelled{background:#fee2e2;color:#991b1b}.badge-completed{background:#dbeafe;color:#1d4ed8}
.badge-active{background:#d1fae5;color:#065f46}.badge-starter{background:#e0e7ff;color:#3730a3}.badge-pro{background:#d1fae5;color:#065f46}.badge-business{background:#fef3c7;color:#92400e}

/* Layout */
.container{max-width:80rem;margin:0 auto;padding:0 1rem}
@media(min-width:640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,1fr)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}
@media(min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,1fr)}.md\:grid-cols-3{grid-template-columns:repeat(3,1fr)}.md\:col-span-2{grid-column:span 2}}
@media(min-width:1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,1fr)}}

/* Sidebar */
.sidebar{width:250px;background:var(--gray-900);color:#fff;min-height:100vh;display:flex;flex-direction:column;padding:1rem 0}
.sidebar-item{display:flex;align-items:center;gap:.75rem;padding:.625rem 1.25rem;color:var(--gray-300);cursor:pointer;transition:all .15s;font-size:.875rem;border-left:3px solid transparent}
.sidebar-item:hover{background:rgba(255,255,255,.05);color:#fff}
.sidebar-item.active{background:rgba(16,185,129,.1);color:var(--emerald);border-left-color:var(--emerald)}
.dashboard{display:flex;min-height:100vh}
.main-content{flex:1;background:var(--gray-50);padding:1.5rem;overflow-y:auto}

/* Table */
.table-container{overflow-x:auto;border-radius:.75rem;border:1px solid var(--gray-200);background:#fff}
table{width:100%;border-collapse:collapse}
th{background:var(--gray-50);padding:.75rem 1rem;text-align:left;font-size:.75rem;font-weight:600;color:var(--gray-500);text-transform:uppercase;letter-spacing:.05em}
td{padding:.75rem 1rem;font-size:.875rem;color:var(--gray-700);border-top:1px solid var(--gray-100)}
tr:hover td{background:var(--gray-50)}

/* Chat */
.chat-container{display:flex;flex-direction:column;height:500px;background:#fff;border-radius:1rem;overflow:hidden;border:1px solid var(--gray-100);box-shadow:0 4px 12px rgba(0,0,0,.05)}
.chat-header{padding:.875rem 1rem;display:flex;align-items:center;gap:.75rem}
.chat-messages{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.5rem;background:var(--gray-50)}
.chat-msg{max-width:80%;padding:.625rem 1rem;border-radius:1rem;font-size:.875rem;line-height:1.5;white-space:pre-line}
.chat-msg.user{align-self:flex-end;background:var(--emerald);color:#fff;border-bottom-right-radius:.25rem}
.chat-msg.bot{align-self:flex-start;background:#fff;color:var(--gray-800);border:1px solid var(--gray-100);border-bottom-left-radius:.25rem}
.chat-input{padding:.75rem;background:#fff;border-top:1px solid var(--gray-100);display:flex;gap:.5rem}
.chat-input input{flex:1;border:1px solid var(--gray-200);border-radius:9999px;padding:.625rem 1rem;font-size:.875rem;outline:none}
.chat-input input:focus{border-color:var(--emerald)}
.chat-input button{width:40px;height:40px;border-radius:9999px;background:var(--emerald);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center}

/* Typing animation */
.typing-dots{display:flex;gap:4px;padding:4px 0}
.typing-dots span{width:6px;height:6px;background:var(--gray-400);border-radius:50%;animation:tb 1.4s infinite ease-in-out}
.typing-dots span:nth-child(2){animation-delay:.16s}
.typing-dots span:nth-child(3){animation-delay:.32s}
@keyframes tb{0%,80%,100%{transform:scale(0)}40%{transform:scale(1)}}

/* Spinner */
.spinner{width:24px;height:24px;border:3px solid var(--gray-200);border-top-color:var(--emerald);border-radius:50%;animation:spin .6s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* Error */
.alert{padding:.75rem 1rem;border-radius:var(--radius);font-size:.875rem;margin-bottom:1rem}
.alert-error{background:#fee2e2;color:#dc2626;border:1px solid #fecaca}
.alert-success{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}

/* Tab bar */
.tab-bar{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--gray-200);padding-bottom:0}
.tab-item{padding:.5rem 1rem;font-size:.8125rem;font-weight:500;color:var(--gray-500);cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap;transition:all .15s}
.tab-item:hover{color:var(--gray-700)}
.tab-item.active{color:var(--emerald);border-bottom-color:var(--emerald);background:rgba(16,185,129,.05)}
