:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;color:#243a34;background:#f5f7f5;font-synthesis:none;--green:#087a5a;--border:#e1e8e2;--muted:#74837b}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0;border-radius:7px;padding:12px 18px;background:var(--green);color:#fff;font-size:13px;font-weight:600;transition:background .15s}button:hover{background:#065d45}button:disabled{opacity:.5;cursor:wait}button.quiet{background:transparent;color:var(--muted);padding:9px}.secondary{background:#e8f1eb;color:#225943}.danger{background:#fbe9e6;color:#a5362c}.danger:hover{background:#f3d7d2}a{color:inherit;text-decoration:none}input,select,textarea{width:100%;border:1px solid #dce4de;border-radius:7px;padding:12px;background:#fff;color:#233d32;margin-top:7px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #087a5a15}label{display:block;font-size:13px;font-weight:600;margin:18px 0}textarea{font-family:ui-monospace,monospace;font-size:12px;min-height:125px;resize:vertical}small{font-size:11px;color:var(--muted)}h1,h2,h3,p{margin-top:0}h1{font-size:32px;letter-spacing:-1.2px;font-weight:600}h2{font-size:23px;letter-spacing:-.5px}h3{font-size:15px}p{color:var(--muted);font-size:14px;line-height:1.7}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:#788e81}.brand{display:flex;gap:15px;align-items:center;font-size:25px;font-weight:800;letter-spacing:-1px}.brand>span{font-size:20px;letter-spacing:2px}.brand small{display:block;font-size:8px;letter-spacing:2.2px;font-weight:400;margin-top:4px}.login-shell{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.login-story{background:#112f26;color:#f2f6ee;padding:55px 65px;display:flex;flex-direction:column;justify-content:space-between;min-height:100vh}.login-story h1{font-size:clamp(36px,4.5vw,65px);font-weight:500;line-height:1.12;letter-spacing:-2px;margin:25px 0}.login-story em{font-style:normal;color:#a7dc83}.login-story p{color:#a0b9a8}.login-card{display:grid;place-items:center;padding:45px}.login-form{width:min(370px,100%)}.login-form h2{margin:23px 0 7px}.login-form button{width:100%;display:flex;justify-content:space-between;margin:26px 0}.pill{font-size:9px;font-weight:700;letter-spacing:1.1px;padding:7px 10px;background:#e8eee5;border-radius:5px;color:#526e54}.workspace{display:flex;min-height:100vh}aside{width:225px;background:#142c25;color:#dae6dc;position:fixed;height:100vh;padding:30px 18px;display:flex;flex-direction:column}.workspace .brand{padding:0 13px 35px;color:#c5e4a6}.nav-caption{font-size:9px;letter-spacing:1.5px;margin:20px 14px 10px;color:#789586}nav{display:grid;gap:6px}nav button{background:none;text-align:left;color:#8fa99b;font-weight:400;display:flex;gap:13px;align-items:center;padding:13px 15px}nav button:hover,nav button.active{background:#274337;color:#e7f0e4}nav button.active{box-shadow:inset 3px 0 #b1dc8d}.aside-bottom{margin-top:auto;padding:20px 10px 0;display:grid;gap:25px;font-size:11px;color:#a5b5ab}.version{font-size:9px;letter-spacing:1.5px;color:#678574}main{margin-left:225px;width:calc(100% - 225px)}header{height:76px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 38px;font-size:11px;color:var(--muted);background:#fafbf9}header>div{display:flex;gap:20px;align-items:center}.live{font-size:10px;color:var(--green);white-space:nowrap}.page{padding:37px 38px;min-height:calc(100vh - 126px)}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:20px}.page-heading h1{margin:8px 0}.page-heading p{margin-bottom:0}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin:28px 0}.stat,.card{background:white;border:1px solid var(--border);border-radius:10px}.stat{padding:22px}.stat small{display:block}.stat strong{font-size:32px;font-weight:500;display:block;margin:12px 0}.stat span{font-size:10px;color:var(--green)}.card{padding:24px;margin-bottom:20px}.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;gap:15px}.card-head h3{margin:0}.grid-2{display:grid;grid-template-columns:1.3fr 1fr;gap:20px}.hero{background:#eaf1e4;border:1px solid #d9e5d0;padding:30px;border-radius:10px;margin-bottom:25px}.hero h2{max-width:430px;font-size:26px}.hero p{max-width:580px;color:#60745a}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap}th{text-align:left;font-size:10px;letter-spacing:.6px;font-weight:500;color:#85928a;background:#fafbf9;padding:13px 14px;border-bottom:1px solid var(--border)}td{padding:14px;border-bottom:1px solid #eef1ed;max-width:300px;overflow:hidden;text-overflow:ellipsis}tr:last-child td{border-bottom:0}td button{padding:6px 9px;margin:0 3px;font-size:11px}code{font:11px ui-monospace,monospace;background:#f1f4f0;padding:5px 7px;border-radius:4px}pre{background:#142c25;color:#c9e0c6;padding:20px;border-radius:8px;overflow:auto;font-size:12px;line-height:1.8}.badge{display:inline-flex;padding:4px 8px;background:#e8f4ec;color:#38714b;border-radius:4px;font-size:10px}.badge.muted{background:#f3eee5;color:#8c794a}.empty{text-align:center;padding:48px 15px;color:var(--muted)}.empty strong{display:block;color:#506357;margin-bottom:9px;font-size:16px}.split-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--border);font-size:13px}.split-row:last-child{border:0}.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:18px;flex-wrap:wrap}.toolbar input{margin:0;max-width:350px;font-size:12px}.toolbar select{margin:0;max-width:200px}.toolbar .grow{flex:1}.pager{display:flex;gap:14px;align-items:center;justify-content:flex-end;margin-top:16px;font-size:12px;color:var(--muted)}footer{padding:17px 38px;color:#94a092;font-size:10px;border-top:1px solid var(--border);display:flex;justify-content:space-between}dialog{border:1px solid var(--border);border-radius:13px;max-width:590px;width:calc(100% - 30px);padding:27px;color:#263d30;max-height:90vh;overflow:auto}dialog::backdrop{background:#10291fc0;backdrop-filter:blur(3px)}.modal-heading{display:flex;justify-content:space-between;align-items:center}.modal-heading h2{margin:0;font-size:21px}.modal-footer{display:flex;justify-content:flex-end;margin-top:20px}#modal-error,#login-error{color:#ad443b;font-size:12px}#toast{position:fixed;bottom:25px;right:25px;background:#173c2a;color:white;padding:14px 22px;border-radius:9px;z-index:10;max-width:90vw;font-size:13px}.check{display:flex;align-items:center;gap:10px}.check input{width:auto;margin:0}.secret{word-break:break-all;background:#f2f6ef;padding:17px;border:1px dashed #98b887;font-family:monospace;font-size:13px}.help{font-size:12px;line-height:1.6}.connection{display:flex;justify-content:space-between;padding:17px 0;border-bottom:1px solid var(--border)}[hidden]{display:none!important}@media(max-width:1000px){aside{width:190px}main{margin-left:190px;width:calc(100% - 190px)}.stats{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}.page{padding:25px}.login-story{padding:35px}header{padding:0 25px}#account{display:none}}@media(max-width:650px){.login-shell{grid-template-columns:1fr}.login-story{min-height:auto;padding:25px}.login-story>div,.login-story>small{display:none}.login-card{padding:40px 25px}.workspace{display:block}aside{position:relative;width:100%;height:auto;padding:16px}.workspace .brand{padding-bottom:12px}aside nav{display:flex;overflow:auto}nav button{padding:10px;white-space:nowrap;font-size:11px}.nav-caption,.aside-bottom{display:none}main{margin-left:0;width:100%}header{height:55px;padding:0 18px}header>div{gap:7px}.page{padding:24px 16px}.page-heading{align-items:start}.page-heading h1{font-size:26px}.page-heading .eyebrow{font-size:8px}.stats{gap:10px}.stat{padding:16px}.card{padding:15px}.page-heading p{font-size:12px}.page-heading button{padding:10px;font-size:11px}footer{padding:15px}.hero{padding:22px}}
#provider-fields .connection { gap: 16px; align-items: flex-start; }
#provider-fields .connection small { display: block; margin-top: 5px; }
#provider-fields .connection .badge { flex-shrink: 0; }
@media(max-width: 600px) { #provider-fields .connection { flex-direction: column; gap: 10px; } }

/* Interface moderna: profundidade suave, foco visível e blocos de permissão */
:root{--ink:#1d3b32;--soft:#fff;--line:#e6ece7;--ring:#087a5a26;--shadow:0 1px 2px #16301f0a,0 8px 24px #16301f0d}
body{background:linear-gradient(180deg,#f7f9f6,#f2f5f1 420px) fixed;-webkit-font-smoothing:antialiased}
button{border-radius:10px;transition:background .15s,transform .12s,box-shadow .15s}
button:not(.quiet):hover{transform:translateY(-1px);box-shadow:0 6px 16px #08543c24}
button:active{transform:translateY(0)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,nav button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
input,select,textarea{border-radius:10px;border-color:var(--line);transition:border-color .15s,box-shadow .15s}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px var(--ring)}
.secondary{background:#eef4ef;color:#1f5a43}.secondary:hover{background:#e2ede5}
header{position:sticky;top:0;z-index:5;background:#fafbf9e6;backdrop-filter:blur(10px)}
nav button{border-radius:9px;transition:background .15s,color .15s}
nav button.active{box-shadow:inset 3px 0 #b1dc8d,0 1px 0 #ffffff08}
.stat,.card,.hero{border-radius:14px;box-shadow:var(--shadow)}
.stat{transition:transform .15s,box-shadow .15s}
.stat:hover{transform:translateY(-2px);box-shadow:0 2px 4px #16301f0d,0 14px 30px #16301f12}
.stat strong{letter-spacing:-1.5px}
.hero{background:linear-gradient(135deg,#eaf1e4,#f3f7ee 70%)}
tbody tr{transition:background .12s}
tbody tr:hover{background:#f8faf7}
th{text-transform:uppercase}
.badge{border-radius:999px;padding:5px 11px;font-weight:600;align-items:center;gap:6px}
.badge::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.65}
.row-actions{white-space:nowrap;text-align:right}
code{border:1px solid var(--line)}
dialog{border-radius:16px;box-shadow:0 24px 60px #0d251b33;animation:rise .18s ease-out}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
#toast{box-shadow:0 12px 30px #0d251b40;animation:rise .18s ease-out}
.perms{border:1px solid var(--line);border-radius:12px;background:#fbfcfa;margin:18px 0;overflow:hidden}
.perms-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;background:#f1f5f0;border-bottom:1px solid var(--line);font-size:12px;font-weight:600;color:#3f5d4f}
.perms-head select{margin:0;width:auto;max-width:190px;font-size:12px;padding:8px 10px;background:#fff}
.perm-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 15px;border-bottom:1px solid #eef2ed}
.perm-row:last-child{border-bottom:0}
.perm-name{flex:1;font-size:13px;font-weight:600;color:var(--ink);word-break:break-word}
.perm-mode{margin:0;width:auto;min-width:180px;font-size:12px;padding:9px 10px}
.perm-custom{display:flex;gap:14px;flex-wrap:wrap;width:100%;padding:4px 2px 0;font-size:12px}
.perm-custom .check{font-weight:500;color:#5a6e62}
fieldset{border:1px solid var(--line);border-radius:12px;padding:8px 16px 16px;margin:18px 0;background:#fbfcfa}
legend{font-size:11px;font-weight:700;letter-spacing:1px;color:#5d7567;text-transform:uppercase;padding:0 6px}
.token-block .check{margin:12px 0}
.token-extra{border-top:1px dashed #d9e3da;margin-top:6px}
.secret{border-radius:10px;border-color:#a9c99a;background:#f4f8f0}
@media(max-width:650px){.perm-mode{min-width:0;flex:1}.perms-head{flex-direction:column;align-items:stretch}.perms-head select{max-width:none}.row-actions{text-align:left}}

/* Menu lateral mais legível: ícones em traço, rótulos com contraste e estado ativo evidente */
aside{width:248px;padding:26px 14px;background:linear-gradient(180deg,#153029,#102420);border-right:1px solid #0c1d18}
main{margin-left:248px;width:calc(100% - 248px)}
.workspace .brand{padding:0 12px 26px;color:#d6efb8;border-bottom:1px solid #22423699}
.nav-caption{font-size:9px;letter-spacing:1.8px;font-weight:700;margin:22px 12px 12px;color:#8fae9c}
nav{gap:3px}
nav button{color:#cfe0d3;font-size:13px;font-weight:500;gap:12px;padding:11px 13px;box-shadow:none;position:relative}
.nav-icon{width:19px;height:19px;flex:0 0 19px;color:#8dbf9c;transition:color .15s,transform .12s}
nav button:hover{background:#1f3a30;color:#fff}
nav button:hover .nav-icon{color:#bfe0a4}
nav button.active{background:#24483a;color:#fff;font-weight:600;box-shadow:none}
nav button.active .nav-icon{color:#c4e7a3}
nav button.active::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:3px;background:#b1dc8d}
.aside-bottom a{color:#cadfce;font-weight:500}
.aside-bottom a:hover{color:#fff}
@media(max-width:1000px){aside{width:214px;padding:22px 10px}main{margin-left:214px;width:calc(100% - 214px)}nav button{font-size:12px;padding:10px}}
@media(max-width:650px){aside{width:100%;padding:14px 12px}main{margin-left:0;width:100%}aside nav{gap:6px}nav button{padding:9px 11px}nav button.active::before{display:none}.nav-icon{width:17px;height:17px;flex-basis:17px}}

/* Fluxos guiados de organização, usuário e token */
.steps{display:grid;gap:10px;margin:4px 0 0}
.step{display:flex;gap:14px;align-items:flex-start;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:#fbfcfa}
.step b{display:flex;align-items:center;justify-content:center;width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:#e4f0e2;color:#2f6b4b;font-size:12px}
.step span{font-size:13px;color:#4c6156;line-height:1.6}
.step-done b{background:var(--green);color:#fff}
.locked-org{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:13px 15px;border:1px solid #d7e6d3;border-radius:12px;background:#f2f8ef;font-size:13px;font-weight:600;color:#2c5a43;margin:18px 0}
.row-actions{white-space:nowrap}
