:root{--purple:#6744c8;--purple-dark:#472d91;--ink:#272335;--muted:#888294;--line:#eae7ef;--bg:#f7f6fa;--sidebar:#231d34}*{box-sizing:border-box}body{margin:0;font:14px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}a{color:var(--purple);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #ded9e8;border-radius:9px;background:#fff;color:#4f4662;padding:10px 16px;cursor:pointer;gap:8px;font-weight:600}button:hover,.button:hover{background:#f0ebfa;text-decoration:none}button.primary,.button.primary{background:var(--purple);color:white;border-color:var(--purple)}button.primary:hover{background:var(--purple-dark)}button:disabled{opacity:.45;cursor:not-allowed}.subtle{padding:6px 12px;font-size:12px}.text-button{border:0;background:transparent;padding:6px 0;color:var(--purple)}.danger{color:#b35265}.wide{width:100%}.muted{color:var(--muted)}.tiny{font-size:11px}.full{grid-column:1/-1}h1,h2,h3,p{margin-top:0}h1{font-size:29px;letter-spacing:-.8px;margin-bottom:8px}h2{font-size:18px;letter-spacing:-.3px}h3{font-size:15px}small{display:block;font-size:11px;color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:var(--purple);margin-bottom:8px}#sidebar{position:fixed;width:248px;inset:0 auto 0 0;background:var(--sidebar);padding:28px 18px;color:#c1b9d2;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:12px;color:white;padding:4px 8px 30px;font-size:23px;font-weight:650;letter-spacing:-.6px}.brand small{font-size:10px;color:#b3a8cb;letter-spacing:.3px}.brand-mark{display:grid;place-items:center;border:1px solid #8f70d5;border-radius:11px;width:42px;height:42px;color:#d6c7f6;font-size:25px}.nav-label{font-size:9px;letter-spacing:1.7px;color:#8f839f;padding:12px}.nav-dot{width:6px;height:6px;background:#8878a5;border-radius:50%;display:block;flex-shrink:0}#sidebar nav{overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;min-height:0}#sidebar nav::-webkit-scrollbar{display:none;width:0;height:0}nav a{display:flex;align-items:center;gap:13px;padding:10px 13px;color:#bbb1cb;border-radius:8px;font-size:12px;margin:2px 0}nav a:hover,nav a.active{color:white;background:#443357;text-decoration:none}nav a.active .nav-dot{background:#b397f2}.sidebar-bottom{margin-top:auto;padding:20px 10px 0;border-top:1px solid #44394f}.sidebar-bottom a{color:#d1c7df;display:block;font-size:12px;margin-bottom:10px}.sidebar-bottom .text-button{font-size:11px;color:#ab9abd}.workspace{margin-left:248px}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px}.crumb{font-size:12px;color:#70667e}.crumb span{padding:0 10px;color:#b9b1c7}.user-avatar,.avatar{width:34px;height:34px;display:grid;place-items:center;background:#ede6fa;border-radius:50%;color:var(--purple);font-weight:700}.icon-button{display:inline-flex;padding:8px 12px;flex-shrink:0}main{padding:34px 36px;max-width:1560px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}footer{text-align:center;font-size:10px;color:#a29aac;padding:24px}.card{background:white;border:1px solid var(--line);border-radius:14px;padding:25px;margin-bottom:22px;box-shadow:0 2px 3px #28203002}.card h2{margin-bottom:20px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.section-heading a{font-size:12px}.welcome{display:flex;align-items:center;justify-content:space-between;padding:25px 30px;background:linear-gradient(110deg,#ede6fb,#f6f2fc);border:1px solid #e7def5;border-radius:14px;margin-bottom:24px}.welcome h2{font-size:23px;color:#49316d;margin-bottom:6px}.welcome p{font-size:12px;color:#9182a6;margin:0}.welcome>span{font-size:12px;color:#796891}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:25px}.stat{border:1px solid var(--line);background:white;border-radius:13px;padding:22px}.stat>span{font-size:11px;color:#7c718e}.stat strong{font-size:30px;display:block;margin:12px 0 3px;letter-spacing:-1px}.stats .stat strong:has(+small){font-size:35px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px}thead{background:#faf9fc}th{padding:13px 12px;font-size:10px;letter-spacing:.2px;color:#94899f;text-align:left;font-weight:600;border-bottom:1px solid var(--line)}td{padding:16px 12px;border-bottom:1px solid #f0edf5;vertical-align:middle}td strong{font-size:12px}td small{margin-top:4px}.badge{display:inline-block;padding:5px 10px;border-radius:6px;background:#f0ebfa;color:#8065aa;font-size:10px;white-space:nowrap}.badge.green{background:#e9f5ed;color:#579567}.badge.amber{background:#fcf4e7;color:#b69552}.empty{text-align:center;padding:35px;color:#a89daf}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.search-form,.inline-form{display:flex;gap:10px;align-items:end}.search-form input{min-width:280px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px}.field>span{font-size:12px;font-weight:600;color:#7a6e8a}input,select,textarea{width:100%;border:1px solid #dfd9e7;border-radius:8px;background:#fff;padding:10px 12px;outline:none;color:#42354f}input:focus,select:focus,textarea:focus{border-color:#a98add;box-shadow:0 0 0 3px #ac88dd13}input[type=checkbox]{width:16px;height:16px;accent-color:var(--purple)}input[type=color]{padding:3px;height:42px}.check{display:flex;align-items:center;gap:7px;font-size:12px;color:#8b7d9d;margin:9px 0}.inline-checks{display:flex;gap:20px}.text-block{border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:20px}.permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:650px;overflow:auto;padding-right:8px}.permission-grid .field{margin:0}.permission-grid .field span{font-size:11px}.notice{padding:14px 18px;background:#fbf2e6;border:1px solid #eadac3;border-radius:9px;color:#978064;font-size:12px;margin:15px 0}.notice.success{background:#eaf5ee;border-color:#d3e8da;color:#4c8f61}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:22px}.balance strong{display:block;font-size:28px;margin-bottom:18px}.list-item{border-bottom:1px solid var(--line);padding:12px 0;display:flex;align-items:center;justify-content:space-between;gap:15px}.list-item form{font-size:11px}.list-item .check{font-size:10px}.comment{padding:16px 0;border-bottom:1px solid var(--line)}.comment strong{font-size:12px}.comment p{white-space:pre-wrap;margin:8px 0 0;font-size:13px}.history{display:grid;grid-template-columns:145px 160px 1fr;gap:15px;padding:12px 0;border-bottom:1px solid var(--line);font-size:11px}.history span{color:#aa9eb8}.history small{overflow-wrap:anywhere}.item-add{display:flex;gap:12px;align-items:center;margin-bottom:15px}.item-add>select{max-width:155px}.item-add>.autocomplete{flex:1}.autocomplete{position:relative}.lookup-results{position:absolute;top:100%;left:0;right:0;background:white;box-shadow:0 10px 30px #31274420;z-index:20;border-radius:8px;max-height:280px;overflow:auto}.lookup-result{display:block;width:100%;text-align:left;border-radius:0;border:0;border-bottom:1px solid #eee;padding:10px 14px;font-weight:400}.totals-row{display:flex;align-items:center;justify-content:space-between;margin-top:22px;gap:20px}.totals-row .field{max-width:430px;flex:1}.total strong{font-size:26px;color:var(--purple)}.save-bar{background:#f0eafb;border:1px solid #dfd2f4;border-radius:12px;padding:18px 25px;display:flex;align-items:center;justify-content:space-between;margin-bottom:25px}.save-bar span{font-size:12px;color:#927ea9}fieldset{border:0;padding:0;min-width:0}.client-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.client-grid a{display:flex;align-items:center;gap:12px;color:#665975;font-size:12px}.client-grid small{font-size:10px}.visit{display:flex;align-items:center;gap:25px;padding:18px 25px}.visit-hour{font-size:23px;color:var(--purple);font-weight:650}.visit h3{margin:0}.visit p{margin:4px 0;font-size:12px;color:#a394b2}.visit>a{margin-left:auto}.agenda>h2{font-size:13px;color:#7b688c}.notification{padding:20px 0;border-bottom:1px solid var(--line)}.notification.unread{border-left:3px solid var(--purple);padding-left:15px}.notification p{font-size:12px;margin:6px 0}.notification a{font-size:11px}.integration-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:25px}.integration-grid strong{display:block;margin-bottom:8px;font-size:13px}.support{position:fixed;bottom:24px;right:24px;z-index:40}.support summary{list-style:none;width:52px;height:52px;border-radius:50%;background:#ead755;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 20px #0002}.support summary svg{width:25px;height:25px}.support>div{position:absolute;bottom:68px;right:0;width:245px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px #0002;padding:20px}.support>div a{display:block;font-size:12px;margin-top:15px}.guest{background:#efebf6}.guest footer{position:static}.login-wrap{max-width:1060px;margin:10vh auto 0;display:grid;grid-template-columns:1fr 1fr;min-height:590px;border-radius:22px;overflow:hidden;box-shadow:0 18px 60px #43305612}.login-intro{padding:65px 55px;background:linear-gradient(140deg,#533193,#281c47);color:white;position:relative}.pill{font-size:10px;letter-spacing:2px;border:1px solid #9680bc;padding:8px 13px;border-radius:20px}.login-intro h1{margin-top:48px;font-size:52px;line-height:1.16;letter-spacing:-2px}.login-intro p{color:#bcb0d0;max-width:300px;line-height:1.8}.intro-lines{margin-top:45px;display:flex;gap:12px}.intro-lines span{height:80px;width:55px;background:#8b65c933;border:1px solid #9f7ecd26;border-radius:9px;transform:skewY(-10deg)}.intro-lines span:nth-child(2){margin-top:20px}.intro-lines span:nth-child(3){margin-top:40px}.login-card{padding:62px 52px;background:#fff}.login-card h2{font-size:28px;margin-top:15px;margin-bottom:5px}.login-card .muted{font-size:12px;margin-bottom:30px}.login-card button{margin-top:10px}.login-links{display:flex;justify-content:space-between;font-size:11px;margin-top:22px}.login-card .tiny{margin-top:35px}.error-card{max-width:500px;margin:16vh auto}.variable-insert{display:flex;gap:10px;max-width:350px;margin-bottom:20px}details summary{cursor:pointer;color:var(--purple);font-size:12px;margin:10px 0}pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:500px;font-size:10px}hr{border:0;border-top:1px solid var(--line);margin:20px 0}@media(max-width:1150px){.stats{grid-template-columns:repeat(2,1fr)}.permission-grid{grid-template-columns:repeat(2,1fr)}.client-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:800px){#sidebar{transform:translateX(-100%);transition:transform .2s}#sidebar.open{transform:none}.workspace{margin-left:0}.topbar{height:64px;padding:0 20px}.icon-button{display:inline-flex;padding:5px;border:0}.crumb{font-size:10px}.topbar .user-avatar{width:29px;height:29px}main{padding:24px 18px}.page-heading{margin-bottom:20px}h1{font-size:25px}.two-col,.form-grid,.client-grid{grid-template-columns:1fr}.welcome{padding:20px}.welcome>span{display:none}.stats{gap:10px}.stat{padding:17px}.stat strong{font-size:25px}.card{padding:20px}.toolbar{flex-wrap:wrap}.search-form input{min-width:0}.search-form{width:100%}.save-bar{padding:15px}.save-bar span{max-width:50%;font-size:10px}.item-add{flex-wrap:wrap}.item-add>.autocomplete{min-width:150px}.permission-grid{grid-template-columns:1fr}.login-wrap{margin:35px 18px 0;display:block;min-height:0}.login-intro{display:none}.login-card{padding:36px 26px}.history{grid-template-columns:1fr;gap:5px}.integration-grid{grid-template-columns:repeat(2,1fr)}.visit{gap:12px}.visit-hour{font-size:18px}.visit a{font-size:10px;padding:8px}.support{bottom:15px;right:15px}.support summary{width:46px;height:46px}.totals-row{align-items:start}.total strong{font-size:22px}}

/* Menu recolhível: opções acessíveis sem barra de rolagem visível. */
[hidden]{display:none!important}#sidebar{transition:transform .2s ease;max-height:100dvh}.brand,.nav-label,.sidebar-bottom{flex-shrink:0}.workspace{transition:margin-left .2s ease}.topbar{gap:14px}.crumb{flex:1}.menu-collapsed #sidebar{transform:translateX(-100%)}.menu-collapsed .workspace{margin-left:0}.menu-backdrop{position:fixed;inset:0;background:#15102180;border:0;border-radius:0;z-index:29;padding:0}.menu-backdrop:hover{background:#15102180}@media(max-width:800px){#sidebar{width:min(248px,85vw);padding-top:20px}.topbar #install-app{font-size:10px;padding:6px 8px}.topbar .crumb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body:has(#sidebar.open){overflow:hidden}}@media(prefers-reduced-motion:reduce){#sidebar,.workspace{transition:none}}
#delivery-signature{display:block;width:100%;max-width:600px;height:auto;aspect-ratio:3/1;background:#fff;border:1px solid #d8d0e5;border-radius:10px;touch-action:none;cursor:crosshair}#delivery-form{margin-top:20px}.signature-buttons{display:flex;gap:12px;flex-wrap:wrap}.signature-image{display:block;width:100%;max-width:400px;height:auto;background:white;border-bottom:1px solid #d8d0e5}#delivery-panel>summary{display:inline-block;cursor:pointer;list-style:none}#delivery-panel>summary::-webkit-details-marker{display:none}

body.delivery-open{position:fixed;width:100%;overflow:hidden;overscroll-behavior:none}#delivery-dialog{position:fixed;inset:0;margin:0;border:0;border-radius:0;width:100vw;max-width:none;height:var(--delivery-height,100dvh);max-height:none;padding:20px;padding: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:#faf8fd;color:#292336;overflow:hidden;overscroll-behavior:none}#delivery-dialog[open]{display:flex;flex-direction:column}#delivery-dialog::backdrop{background:#faf8fd}.delivery-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex:none}.delivery-header h2{margin:4px 0;font-size:20px}#delivery-form{margin:16px auto 0;width:100%;max-width:1000px;min-height:0;flex:1;display:flex;flex-direction:column}.delivery-step[hidden]{display:none}.delivery-step{min-height:0;flex:1;display:flex;flex-direction:column;gap:12px}.delivery-step h3,.delivery-step p{margin:0}#delivery-name-step{max-width:600px;width:100%;margin:0 auto;overflow-y:auto;padding:12px 0}#delivery-name-step input{font-size:18px}#delivery-name-step>button{align-self:flex-start}.signature-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}#delivery-dialog #delivery-signature{width:min(100%,120vh);max-width:900px;max-height:100%;object-fit:contain;border:2px solid #d8d0e5;background:#fff;touch-action:none}.signature-buttons{flex:none}.signature-buttons button{min-height:44px}@media(max-height:500px){#delivery-dialog{padding:8px 16px}.delivery-header h2{font-size:16px}#delivery-form{margin-top:6px}.delivery-step{gap:6px}#delivery-sign-step h3{font-size:15px}#delivery-sign-step>.tiny{display:none}.signature-buttons button{padding:8px 12px}}

.dashboard-recent th,.dashboard-recent td{text-align:center}.dashboard-recent td:last-child,.dashboard-recent th:last-child{text-align:center}

/* Tema escuro por usuário */
body.theme-dark{--ink:#f0ecf6;--muted:#aaa1b6;--line:#37303f;--bg:#15121b;--sidebar:#1c1728;background:var(--bg);color:var(--ink);color-scheme:dark}
.theme-dark .topbar,.theme-dark .card,.theme-dark .stat{background:#1d1924;border-color:var(--line)}
.theme-dark .welcome{background:linear-gradient(110deg,#2b2140,#201a2b);border-color:#3b2f52}
.theme-dark .welcome h2{color:#e7dcfb}.theme-dark .welcome p,.theme-dark .welcome>span{color:#b5a6c9}
.theme-dark thead{background:#211c29}.theme-dark th{color:#aaa0b4;border-color:var(--line)}.theme-dark td{border-color:#2f2938}
.theme-dark input,.theme-dark select,.theme-dark textarea{background:#24202c;border-color:#41394c;color:#f1edf6}
.theme-dark input:focus,.theme-dark select:focus,.theme-dark textarea:focus{border-color:#8f73d5;box-shadow:0 0 0 3px #8f73d522}
.theme-dark button,.theme-dark .button{background:#272130;border-color:#443b50;color:#e9e3f1}.theme-dark button:hover,.theme-dark .button:hover{background:#322a3e}
.theme-dark button.primary,.theme-dark .button.primary{background:var(--purple);border-color:var(--purple);color:white}.theme-dark button.primary:hover,.theme-dark .button.primary:hover{background:var(--purple-dark)}
.theme-dark .lookup-results{background:#24202c;box-shadow:0 10px 30px #0006}.theme-dark .lookup-result{background:#24202c;border-color:#37303f;color:#eee8f4}
.theme-dark .badge{background:#332944;color:#c6b2eb}.theme-dark .badge.green{background:#20382b;color:#8ec79d}.theme-dark .badge.amber{background:#40331f;color:#d6b36c}
.theme-dark .notice{background:#352b1f;border-color:#51412a;color:#d2b98d}.theme-dark .notice.success{background:#203328;border-color:#31513d;color:#8fc29c}
.theme-dark .save-bar{background:#2b2238;border-color:#403250}.theme-dark .save-bar span{color:#bba7cf}
.theme-dark .client-grid a,.theme-dark .crumb,.theme-dark .field>span,.theme-dark .check{color:#c3b9ce}
.theme-dark .user-avatar,.theme-dark .avatar{background:#35284b;color:#d5c0ff}
.theme-dark hr{border-color:var(--line)}.theme-dark footer{color:#81788c}
.theme-dark #delivery-dialog,.theme-dark #delivery-dialog::backdrop{background:#17131f;color:#f0ecf6}
.theme-dark #delivery-dialog #delivery-signature,.theme-dark .signature-image{background:#fff}
