/* Tema branco: barra lateral clara no estilo ChatGPT, superfícies e azul de ação no estilo ManyChat. */
:root{--bg:#fff;--side:#f9f9f9;--line:#ececec;--line-2:#e3e3e3;--text:#0d0d0d;--text-2:#3d3d3d;--muted:#6e6e6e;--soft:#f4f4f4;--blue:#006bff;--blue-2:#3d8bff;--blue-soft:#eef4ff;--violet:#7b5cf0;--green:#10a37f;--green-soft:#e7f7f1;--amber:#b7791f;--amber-soft:#fff7e0;--red:#d93a52;--red-soft:#fdeef1;--shadow-sm:0 1px 2px #0000000a,0 1px 1px #00000005;--shadow:0 4px 18px #0000000d,0 1px 3px #0000000a;--shadow-lg:0 24px 60px #00000021,0 4px 14px #00000012;--ease:cubic-bezier(.2,.8,.2,1);--paper:#fff;--obsidian:#0d0d0d;--graphite:#6e6e6e;--smoke:#8f8f8f;--ash:#f4f4f4;--hairline:#ececec;background:var(--bg);color:var(--text);font-size:15px;line-height:1.55;letter-spacing:-.005em}
body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
::selection{background:#cfe2ff}
.ico{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
/* Tipografia */
h1{font-size:28px;line-height:1.25;letter-spacing:-.025em;font-weight:600;color:var(--text);margin:0 0 6px}
h2{font-size:18px;font-weight:600;letter-spacing:-.015em;color:var(--text)}h3{font-weight:600;color:var(--text)}
p,small,.hint,.meta,.muted{color:var(--muted)}.hint{font-size:13px}
label{color:var(--text-2);font-weight:500;font-size:13px;margin:18px 0}
/* Botões */
button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--blue);border:1px solid var(--blue);color:#fff;border-radius:10px;padding:10px 18px;font-size:14px;font-weight:550;box-shadow:0 1px 2px #006bff33,inset 0 1px 0 #ffffff26;transition:background .15s,box-shadow .2s,transform .12s var(--ease),border-color .15s,color .15s}
button:hover{background:#0060e6;color:#fff;box-shadow:0 4px 14px #006bff40}
button:active:not(:disabled){transform:scale(.97)}
button:disabled{opacity:.45;box-shadow:none}
.ghost{background:#fff;color:var(--text);border:1px solid var(--line-2);box-shadow:var(--shadow-sm)}
.ghost:hover{background:var(--soft);color:var(--text);box-shadow:var(--shadow-sm)}
button:focus-visible,a:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
/* Campos */
input,textarea,select{background:#fff;color:var(--text);border:1px solid var(--line-2);border-radius:12px;padding:11px 14px;font-size:14px;transition:border-color .15s,box-shadow .15s}
input:hover,textarea:hover,select:hover{border-color:#cfcfcf}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 4px #006bff1f}
input::placeholder,textarea::placeholder{color:#a0a0a0}
textarea{border-radius:14px}
select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236e6e6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center;padding-right:40px}
input[type=checkbox]{accent-color:var(--blue);width:18px;height:18px}
input[type=date],input[type=time],input[type=datetime-local]{color-scheme:light}
input[type=file]{border-style:dashed;background:#fafcff}input[type=file]::file-selector-button{background:var(--blue-soft);color:var(--blue);border:0;border-radius:8px;font-weight:550}
/* Barra lateral */
.topbar{position:fixed;inset:0 auto 0 0;width:264px;height:100vh;padding:18px 12px;margin:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:22px;background:var(--side);border-right:1px solid var(--line);z-index:20;max-width:none}
.topbar .wordmark{display:flex;align-items:center;gap:10px;padding:6px 10px;font-size:18px;font-weight:650;letter-spacing:-.02em;color:var(--text)}
.logo{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:linear-gradient(135deg,#006bff,#7b5cf0);color:#fff;box-shadow:0 4px 12px #006bff40;position:relative;overflow:hidden}
.logo:after{content:'';position:absolute;inset:0;background:linear-gradient(120deg,transparent 30%,#ffffff59 50%,transparent 70%);transform:translateX(-120%);animation:shine 5s ease-in-out 1.2s infinite}
.logo .ico{width:17px;height:17px;stroke-width:2.2}
.nav-label{font-size:11px;font-weight:600;color:#9a9a9a;text-transform:uppercase;letter-spacing:.06em;padding:0 12px;margin-bottom:-14px}
.navigation{display:flex;flex-direction:column;align-items:stretch;gap:2px}
.nav{position:relative;justify-content:flex-start;gap:12px;width:100%;background:transparent;border:0;box-shadow:none;color:var(--text-2);border-radius:10px;padding:10px 12px;font-size:14px;font-weight:500;text-align:left}
.nav .ico{color:#7a7a7a;transition:color .15s,transform .25s var(--ease)}
.nav:hover{background:#ececec;color:var(--text);box-shadow:none}.nav:hover .ico{transform:scale(1.1);color:var(--text)}
.nav.active{background:#fff;color:var(--text);box-shadow:var(--shadow-sm),0 0 0 1px var(--line)}
.nav.active .ico{color:var(--blue)}
.nav.active:before{content:'';position:absolute;left:-12px;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;background:var(--blue);animation:grow .3s var(--ease)}
.nav:active{transform:none}
.side-card{margin-top:auto;display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:12px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-sm);font-size:12px;color:var(--muted)}
.side-card strong{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text);font-weight:600}
.topbar>#logout{margin-top:auto;justify-content:flex-start;gap:12px;background:transparent;border:0;box-shadow:none;color:var(--muted);padding:10px 12px;font-weight:500}
.topbar>#logout:hover{background:#ececec;color:var(--text)}
/* Área principal */
#app>main{margin-left:264px;max-width:none;min-height:100vh;padding:40px clamp(24px,4vw,64px) 32px;position:relative;isolation:isolate}
#app>main:before{content:'';position:absolute;inset:0 0 auto 0;height:300px;z-index:-1;pointer-events:none;background:radial-gradient(600px 220px at 12% -40px,#006bff14,transparent 70%),radial-gradient(520px 200px at 70% -60px,#7b5cf012,transparent 70%)}
.page-header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:34px;animation:rise .45s var(--ease) both}
.page-header p{font-size:15px;max-width:640px;margin:0}
.header-actions{display:flex;gap:12px;align-items:center}
.badge,.pill{display:inline-flex;align-items:center;gap:7px;background:var(--soft);color:var(--text-2);border:1px solid transparent;border-radius:999px;padding:5px 12px;font-size:12px;font-weight:550;white-space:nowrap}
.badge:before{content:'';width:8px;height:8px;border-radius:50%;background:#b5b5b5}
.badge.ready{background:var(--green-soft);color:#0b7a5e}.badge.ready:before{background:var(--green);animation:pulse 2s infinite}
.badge.qr,.badge.syncing,.badge.starting{background:var(--amber-soft);color:var(--amber)}.badge.qr:before,.badge.syncing:before,.badge.starting:before{background:#e0a526;animation:pulse 1.2s infinite}
.badge.disconnected{background:var(--red-soft);color:var(--red)}.badge.disconnected:before{background:var(--red)}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
/* Seções aparecem com movimento suave ao trocar de aba */
#app>main>section:not([hidden]){animation:rise .4s var(--ease) both}
/* Cartões */
.kit-card,.job,.empty,.kit-step,.slot-row,.moderation-editor,.connection,.composer,.agenda>.filter+div:empty{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-sm)}
.kit-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.kit-card{padding:22px;transition:transform .25s var(--ease),box-shadow .25s var(--ease),border-color .2s;animation:rise .45s var(--ease) both}
.kit-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:#dcdcdc}
.kit-card:before{content:'';display:block;width:38px;height:38px;border-radius:11px;margin-bottom:14px;background:var(--i-layers) center/20px no-repeat,linear-gradient(135deg,#006bff,#7b5cf0);box-shadow:0 6px 14px #006bff33}
.kit-card:nth-child(2){animation-delay:.04s}.kit-card:nth-child(3){animation-delay:.08s}.kit-card:nth-child(4){animation-delay:.12s}.kit-card:nth-child(5){animation-delay:.16s}.kit-card:nth-child(n+6){animation-delay:.2s}
.kit-card h3{font-size:17px;margin-bottom:8px}
.kit-meta .pill{font-size:11.5px;background:var(--blue-soft);color:var(--blue)}
.kit-preview li{border-color:var(--line);font-size:13px}.kit-preview span{color:var(--muted)}
.card-actions button{font-size:13px;padding:8px 13px;border-radius:9px}
.empty{padding:48px 24px;text-align:center;background:#fff;border-style:dashed;border-color:#dcdcdc;box-shadow:none}
.empty:before{content:'';display:block;width:56px;height:56px;margin:0 auto 14px;border-radius:16px;background:var(--blue-soft) var(--i-inbox) center/26px no-repeat}
.empty h2,.empty h3{color:var(--text)}
.editor{border-top:1px solid var(--line);margin-top:48px;padding-top:32px;animation:rise .35s var(--ease) both}
.kit-step{padding:22px;animation:rise .3s var(--ease) both}
.step-top h3{display:flex;align-items:center;gap:10px}
.step-top h3:before{content:'';width:8px;height:8px;border-radius:50%;background:var(--blue);box-shadow:0 0 0 4px var(--blue-soft)}
.step-when{font-size:12px;font-weight:550;color:var(--blue);background:var(--blue-soft);border-radius:999px;padding:3px 10px}
/* Cartão que mudou de posição ao editar dia/horário */
.kit-step.moved{border-color:#9cc2ff;box-shadow:0 0 0 4px #006bff1f,var(--shadow);animation:none}
.kit-step.moved .step-when{background:var(--blue);color:#fff;transition:background .3s,color .3s}
/* Abas segmentadas */
.tabs{display:flex;gap:4px;padding:4px;background:var(--soft);border-radius:12px;margin:20px 0}
.tabs button{flex:1;background:transparent;border:0;box-shadow:none;color:var(--muted);padding:8px 12px;font-size:13px;border-radius:9px}
.tabs button:hover{background:#eaeaea;color:var(--text);box-shadow:none}
.tabs button.selected{background:#fff;color:var(--text);box-shadow:var(--shadow-sm),0 0 0 1px var(--line)}
/* Agenda */
.workspace{display:grid;grid-template-columns:minmax(320px,420px) minmax(0,1fr);gap:28px;align-items:start}
.composer{padding:6px 24px 24px;position:sticky;top:24px}
.composer>h2{margin-top:18px}
.timing-block{border-top:1px solid var(--line)}
.slot-row{padding:12px;box-shadow:none;background:#fafafa}
.slot-row input,.slot-row select{background:#fff}
.remove-slot{width:40px;height:40px;padding:0;border-radius:10px}
.job{padding:18px 20px;transition:box-shadow .2s,transform .2s var(--ease);animation:rise .35s var(--ease) both}
.job:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
.job p{color:var(--text-2)}
.history-header{margin-top:40px;display:flex;align-items:baseline;justify-content:space-between}
.history-item{border-color:var(--line);padding:14px 4px}
.history-item p{font-size:13px;margin:8px 0 0}
/* Moderação */
.moderation-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}
.moderation-editor{padding:6px 24px 22px}
.permission-note{font-size:13px;padding:12px 14px;background:var(--blue-soft);border-radius:12px;color:#2f5f9e}
.rule-preview{margin-top:28px;padding-top:22px;border-top:1px solid var(--line)}
.check{display:flex;gap:10px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;margin:10px 0;font-weight:500;transition:border-color .15s,background .15s;cursor:pointer}
.check:hover{border-color:#cfdcf0;background:#fafcff}
.check:has(input:checked){border-color:#b9d3ff;background:var(--blue-soft)}
.check input{margin:0}
.check{flex-wrap:wrap}.check small.hint{flex-basis:100%;margin:-4px 0 0 28px;font-weight:400;font-size:12px}
/* Conexão */
.connection{display:flex;justify-content:space-between;gap:40px;max-width:880px;padding:32px}
.connection h2{display:flex;align-items:center;gap:12px}
.connection h2:before{content:'';width:40px;height:40px;border-radius:12px;background:#25d366 var(--i-phone) center/20px no-repeat;box-shadow:0 6px 16px #25d36640}
.connection-actions img{border-radius:16px;border:1px solid var(--line);padding:10px;background:#fff;box-shadow:var(--shadow);animation:pop .4s var(--ease) both}
/* Diálogo e avisos */
dialog{background:#fff;color:var(--text);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-lg);padding:28px}
dialog[open]{animation:pop .3s var(--ease) both}
dialog::backdrop{background:#0d0d0d40;backdrop-filter:blur(4px)}
#toast{background:#0d0d0d;color:#fff;border-radius:14px;box-shadow:var(--shadow-lg);font-size:14px;animation:toast .35s var(--ease) both}
.error,.success{color:var(--text)}
footer{color:#9a9a9a;font-size:12px;border-top:1px solid var(--line)}
/* Login */
.login{position:relative;overflow:hidden;background:#fff}
.login:before,.login:after{content:'';position:absolute;width:520px;height:520px;border-radius:50%;filter:blur(70px);opacity:.5;z-index:0;animation:float 14s ease-in-out infinite alternate}
.login:before{background:#7fb2ff;top:-180px;left:-120px}.login:after{background:#c4b4ff;bottom:-200px;right:-140px;animation-delay:-7s}
.login-card{position:relative;z-index:1;background:#ffffffd9;backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow-lg);padding:36px;animation:pop .5s var(--ease) both}
.login-card .wordmark{display:flex;align-items:center;gap:10px;color:var(--text);font-size:20px}
.login-card h1{font-size:30px;margin:28px 0 20px}
.login-card button{width:100%;margin-top:20px;padding:12px}
/* Ícones usados em CSS (Lucide, ISC) */
:root{--i-layers:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z'/%3E%3Cpath d='m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65'/%3E%3Cpath d='m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65'/%3E%3C/svg%3E");--i-inbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006bff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E");--i-phone:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='20' x='5' y='2' rx='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E")}
/* Movimento */
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes pop{from{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}
@keyframes toast{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
@keyframes pulse{0%{box-shadow:0 0 0 0 #10a37f66}70%{box-shadow:0 0 0 7px #10a37f00}100%{box-shadow:0 0 0 0 #10a37f00}}
@keyframes grow{from{transform:scaleY(0)}to{transform:none}}
@keyframes shine{0%,70%{transform:translateX(-120%)}85%,100%{transform:translateX(120%)}}
@keyframes float{from{transform:translate(0,0) scale(1)}to{transform:translate(60px,40px) scale(1.1)}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Responsivo */
@media(min-width:1600px){#app>main{padding-left:6vw;padding-right:6vw}}
@media(max-width:1050px){.topbar{width:232px}#app>main{margin-left:232px;padding:32px 24px}.moderation-layout,.workspace{grid-template-columns:1fr}.composer{position:static}.header-actions{flex-direction:column;align-items:flex-end}}
@media(max-width:650px){
 .topbar{position:sticky;top:0;width:100%;height:auto;padding:10px 12px;gap:10px;flex-direction:row;flex-wrap:wrap;align-items:center;border-right:0;border-bottom:1px solid var(--line);background:#f9f9f9f2;backdrop-filter:blur(10px)}
 .topbar .wordmark{padding:4px 6px;font-size:16px}.nav-label,.side-card{display:none}
 .topbar>#logout{margin-left:auto;width:auto;padding:8px 10px}
 .navigation{order:3;width:100%;flex-direction:row;overflow-x:auto;gap:4px;scrollbar-width:none;padding-bottom:2px}
 .navigation::-webkit-scrollbar{display:none}
 .nav{width:auto;flex-shrink:0;padding:8px 12px;font-size:13px;gap:8px}.nav.active:before{display:none}
 #app>main{margin-left:0;padding:24px 16px}
 h1{font-size:24px}.page-header{flex-direction:column;align-items:flex-start;gap:16px;margin-bottom:24px}.header-actions{flex-direction:row;width:100%;justify-content:space-between}
 .kit-library{grid-template-columns:1fr}.connection{flex-direction:column;padding:22px}.composer,.moderation-editor{padding:4px 16px 18px}
}
