/* ECQUIZ CONNECT — premium design language shared with the ECQUIZ brand.
   Calm surfaces, typographic hierarchy, electric violet, limited micro-motion. */
:root{
  --ink:#24263b;--ink-2:#343954;--sub:#858ca5;--soft:#a4abc0;
  --violet:#7058e9;--violet-2:#8c75ff;--violet-bg:#f0edff;
  --edge:#e7e9f3;--bg:#f6f7fc;--paper:#fff;--green:#1f9d77;--pink:#e178ab;
  --shadow:0 18px 50px rgba(47,42,95,.052);--radius:19px;
  font-family:Manrope,system-ui,-apple-system,sans-serif;color-scheme:light;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-size:13px}
button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}
a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #a89afa88;outline-offset:2px}
::selection{background:#c2b6ff88}input,select,textarea{border:1px solid #dee2ef;background:#fff;color:var(--ink);border-radius:11px;padding:12px 14px;min-height:43px;width:100%;font-size:12px;font-weight:600;outline:0;transition:border .2s,box-shadow .2s}
input:focus,select:focus,textarea:focus{border-color:#9682fa;box-shadow:0 0 0 3px #9987f624}textarea{min-height:86px;resize:vertical}
input::placeholder,textarea::placeholder{color:#adb3c6}
label{font-size:11px;font-weight:750;color:#5d637c;display:flex;flex-direction:column;gap:8px}
kbd,code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
code{background:#f0eef9;padding:4px 6px;border-radius:6px;color:#6654c6;font-size:11px;word-break:break-all}
button svg{pointer-events:none}
.ec-loading{display:flex;min-height:100dvh;align-items:center;justify-content:center;gap:13px;flex-direction:column}
.ec-loading strong{font-size:21px;letter-spacing:-.06em}.ec-loading small{color:var(--sub);font-size:12px}
.ec-loading-orb{width:34px;height:34px;border:6px solid #dfd9ff;border-right-color:#735af2;border-radius:50%;animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100dvh}
.sidebar{background:#fff;border-right:1px solid var(--edge);padding:27px 15px 20px;display:flex;flex-direction:column;gap:28px;position:sticky;top:0;height:100dvh;z-index:8}
.brand-wrap{display:flex;align-items:center;gap:11px;padding:0 9px 10px}
.brand-icon{display:flex;justify-content:center;align-items:center;background:#ece8ff;color:#6350d8;border:1px solid #ddd6ff;border-radius:12px;font-weight:900;font-size:19px;letter-spacing:-.09em;width:37px;height:37px}
.brand-icon img{width:29px;height:29px;object-fit:contain}
.brand-text{display:flex;flex-direction:column;line-height:1.1;gap:6px}.brand-text strong{font-size:17px;letter-spacing:-.075em;font-weight:850}.brand-text strong i{font-style:normal;color:#6a53e6}.brand-text small{font-size:9px;letter-spacing:.15em;color:#9ca2b5;font-weight:850}
.sidebar-group{display:flex;flex-direction:column;gap:4px}.sidebar-label{font-size:9px;letter-spacing:.13em;font-weight:900;color:#b2b9c8;padding:0 16px;margin:10px 0}
.nav-item{border:1px solid transparent;background:none;color:#6d758e;border-radius:11px;text-align:left;padding:12px 14px;font-size:11px;font-weight:770;display:flex;align-items:center;gap:13px;transition:.18s}
.nav-item svg{width:17px;height:17px;stroke-width:1.7;flex-shrink:0}.nav-item:hover{background:#f6f5fc;color:#564bc8}
.nav-item.active{background:#f1eeff;color:#6953e5;border-color:#e8e3ff}
.nav-item span:last-child{margin-left:auto;font-size:10px;color:#aaa4db}
.sidebar-bottom{margin-top:auto;padding:17px 10px 6px;border-top:1px solid var(--edge);display:flex;flex-direction:column;gap:13px}
.switcher{border:1px solid #e6e5f3;border-radius:13px;padding:11px 12px;background:#fdfdff;display:flex;align-items:center;gap:8px;color:#666085;font-size:11px;font-weight:750}
.switcher:hover{border-color:#af9bf8}.switcher span{margin-left:auto;color:#9986ef}
.user-chip{display:flex;align-items:center;gap:9px;min-width:0}.avatar{width:30px;height:30px;display:grid;place-items:center;background:linear-gradient(140deg,#7256e9,#b093ef);border-radius:10px;color:#fff;font-weight:850}
.user-chip>div{display:flex;flex-direction:column;min-width:0}.user-chip strong{font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.user-chip small{color:#9ca5b7;font-size:9px}
.main{min-width:0;padding:0 clamp(20px,2.7vw,52px) 70px}
.topbar{min-height:91px;display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #e9eaf3;margin-bottom:36px}
.crumb{display:flex;align-items:center;gap:12px;color:#989eb2;font-size:11px;font-weight:730}.crumb b{color:#3b3f57}.crumb .slash{color:#c7c9d4}
.top-right{display:flex;align-items:center;gap:10px}.status{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #dcefe8;background:#f2fbf7;color:#278f72;border-radius:999px;font-size:10px;font-weight:770}
.status i{width:6px;height:6px;border-radius:100%;background:#30b986;box-shadow:0 0 0 3px #cff4e5}
.top-identity{font-size:11px;color:#a1a8b7;font-weight:700}.heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:26px}
.eyebrow{font-size:10px;font-weight:900;letter-spacing:.14em;color:#7560ea}
h1,h2,h3,p{margin-top:0}h1{font-size:clamp(29px,3vw,43px);letter-spacing:-.07em;font-weight:850;line-height:1.1;margin:10px 0 7px}h1 em{font-style:normal;color:var(--violet)}
.heading p{color:#929aad;line-height:1.7;margin:0;font-size:12px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:43px;padding:11px 16px;border-radius:12px;border:1px solid #e6e7ef;font-size:11px;font-weight:840;background:white;color:#424866;transition:background .18s,border-color .18s,transform .18s}
.btn:hover{border-color:#bfb5ef;transform:translateY(-1px)}.btn-primary{background:linear-gradient(105deg,#7359ed,#7359e8 70%,#856bfa);border-color:transparent;color:#fff;box-shadow:0 12px 30px #6f56eb20}.btn-primary:hover{border-color:transparent;box-shadow:0 15px 34px #6f56eb33}
.btn-ghost{border-color:transparent;background:transparent;color:#7d8197}.btn-danger{color:#c55573;border-color:#f7dbe3;background:#fff9fb}.btn-small{min-height:32px;padding:8px 11px;border-radius:9px;font-size:10px}
.grid-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:28px}
.metric{background:#fff;border:1px solid var(--edge);border-radius:16px;padding:19px 19px 17px;min-height:127px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:0 4px 13px #30295104}
.metric-head{display:flex;align-items:center;justify-content:space-between;color:#979cb0;font-size:10px;font-weight:760}.metric-head b{font-size:12px;color:#8170d9}
.metric strong{font-size:29px;font-weight:850;letter-spacing:-.065em}.metric small{font-size:10px;color:#b0b4c2}
.panel{background:#fff;border:1px solid var(--edge);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.panel-head{display:flex;justify-content:space-between;align-items:center;padding:22px 25px;border-bottom:1px solid #eff0f6;gap:20px}
.panel-head h2{font-size:15px;letter-spacing:-.04em;margin:0;font-weight:850}
.panel-head p{margin:6px 0 0;color:#a0a7bb;font-size:11px}
.split{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:18px}
.list{padding:4px 0}.list-row{padding:16px 25px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #f0f0f6}
.list-row:last-child{border-bottom:0}.list-row:hover{background:#fcfbff}.list-main{display:flex;align-items:center;gap:13px;min-width:0}
.app-mark{width:40px;height:40px;border-radius:11px;background:#f0edff;color:#6953d5;display:grid;place-items:center;flex-shrink:0;font-size:17px;font-weight:850}
.app-mark img{display:block;max-width:26px;max-height:26px;object-fit:contain}
.app-mark.telegram{background:#eaf5ff;color:#209fdb}.app-mark.sheets_script{background:#e8f8ef;color:#249a63}.app-mark.webhook{background:#f0ecff;color:#6c55db}
.list-text{min-width:0}.list-text strong{display:block;font-size:12px;font-weight:830;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-text small{display:block;font-size:10px;margin-top:5px;color:#9fa6b8}
.list-right{display:flex;align-items:center;gap:12px}.pill{display:inline-flex;padding:6px 9px;border-radius:100px;background:#f5f6fa;color:#a0a5b7;font-size:9px;font-weight:850;white-space:nowrap}.pill.active{background:#e9f8f1;color:#148867}.pill.failed{background:#fff0f1;color:#bc5971}.pill.retry{background:#fff4df;color:#bc822c}
.arrow-link{color:#978abf;font-size:20px;background:transparent;border:0;padding:4px 7px}.arrow-link:hover{color:#6550e4}
.info-block{padding:26px}.info-block p{font-size:11px;line-height:1.75;color:#8992a7}.feature-mini{padding:13px 14px;background:#f7f6ff;border:1px solid #eae6ff;border-radius:12px;margin-top:11px;font-size:11px;color:#5d5879}
.feature-mini strong{display:block;color:#484265;margin-bottom:5px;font-size:11px}.feature-mini small{font-size:10px;color:#9a91b6}
.empty{display:flex;flex-direction:column;align-items:flex-start;padding:45px 25px;gap:12px}.empty-icon{width:51px;height:51px;border-radius:16px;background:#f0ecff;display:grid;place-items:center;font-size:23px;color:var(--violet)}
.empty strong{font-size:15px;letter-spacing:-.04em}.empty p{color:#929aaf;line-height:1.7;margin:0;max-width:360px;font-size:11px}
.catalog{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.service-card{border:1px solid var(--edge);background:white;border-radius:16px;padding:21px;min-height:178px;display:flex;flex-direction:column;gap:8px}
.service-card:hover{border-color:#beb2fc}.service-card .app-mark{width:42px;height:42px}.service-card h3{font-size:13px;margin:4px 0 0}.service-card p{color:#98a0b3;font-size:10px;line-height:1.65;margin:0}.service-card .pill{margin-top:auto;align-self:flex-start}
.flow-toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.flow-toolbar input{max-width:340px;font-size:14px;font-weight:850;background:transparent;border:1px solid transparent;padding-left:5px}
.flow-toolbar input:focus{background:white;border-color:#aea5f9}.flow-toolbar .spacer{flex:1}
.flow-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.canvas-wrap{position:relative;min-height:580px;border-radius:19px;border:1px solid #e4e5f1;background:
radial-gradient(circle at 20% 22%,#efeaff99,transparent 38%),
radial-gradient(#cdd1e24c 1px,transparent 1px),
radial-gradient(90deg,#cdd1e24c 1px,transparent 1px),#fcfcff;background-size:auto,28px 28px,28px 28px,auto;overflow:auto;touch-action:pan-x pan-y}
.canvas-meta{position:sticky;left:0;top:0;z-index:5;display:flex;align-items:center;gap:8px;padding:18px 19px;color:#9aa3b7;font-size:10px;font-weight:700;pointer-events:none}
.canvas-meta b{background:#fff;border:1px solid #e6e5ef;padding:7px 9px;border-radius:8px;color:#8b85a4;font-size:9px}
.canvas{position:relative;width:1050px;height:620px}.wires{position:absolute;inset:0;overflow:visible;pointer-events:none}
.wires path{fill:none;stroke:#b4aaed;stroke-width:2.3;stroke-linecap:round}.wires .wire-pulse{stroke:#735af0;stroke-dasharray:3 16;stroke-width:3.5;animation:signal 5s linear infinite}
@keyframes signal{to{stroke-dashoffset:-190}}
.flow-node{width:225px;min-height:121px;position:absolute;border-radius:15px;border:1px solid #e3e3ed;background:white;box-shadow:0 14px 33px #27234a11;user-select:none;transition:border-color .17s,box-shadow .17s;touch-action:none}
.flow-node.selected{border-color:#8b75f8;box-shadow:0 0 0 3px #9986ed22,0 15px 34px #4f3ea51e}.flow-node:focus-within{border-color:#a38feb}
.node-head{display:flex;align-items:center;gap:9px;padding:14px 13px 9px;cursor:grab}.node-head:active{cursor:grabbing}
.node-icon{width:32px;height:32px;display:grid;place-items:center;background:#f0ecff;color:#785ce5;border-radius:10px;font-size:16px;font-weight:850}
.node-icon.source{background:#eaf2ff;color:#5482eb}.node-icon.filter{background:#fff4e9;color:#cb8c46}.node-icon.action{background:#e9f9f0;color:#2ea177}
.node-head b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.node-head small{font-size:9px;color:#9da5b7;display:block;margin-top:3px}
.node-body{padding:0 14px 13px;color:#9fa5b7;font-size:10px;min-height:38px;line-height:1.4;overflow:hidden;text-overflow:ellipsis}
.socket{position:absolute;width:14px;height:14px;background:#fff;border:3px solid #8d7ae9;border-radius:50%;top:54%;z-index:2;cursor:crosshair;transition:transform .14s}
.socket:hover{transform:scale(1.4)}.socket.in{left:-8px}.socket.out{right:-8px;background:#8c79eb;border-color:#fff;box-shadow:0 0 0 2px #927cea}
.inspector{border:1px solid #e7e8f2;border-radius:18px;background:#fff;overflow:hidden;box-shadow:var(--shadow)}
.inspector-head{padding:18px 19px;border-bottom:1px solid #edf0f7}.inspector-head span{font-size:9px;letter-spacing:.13em;color:#9da3b5;font-weight:900}.inspector-head h3{font-size:14px;margin:7px 0 0;letter-spacing:-.04em}
.inspector-body{padding:19px;display:flex;flex-direction:column;gap:16px}.inspector-note{font-size:10px;line-height:1.7;color:#939bb0}.input-row{display:flex;gap:7px}.input-row .btn{flex-shrink:0}
.inbound-copy{display:flex;gap:7px;align-items:stretch}.inbound-copy input{font-size:10px;color:#696785}
.toolbar-lower{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:17px}
.canvas-empty{padding:35px;color:#9fa6b5}
.notice{display:flex;align-items:center;gap:9px;padding:13px 16px;border-radius:12px;border:1px solid #e6e3fc;background:#faf9ff;color:#797291;font-size:11px;line-height:1.6;margin-bottom:18px}
.notice strong{color:#6652d5}.notice.warning{border-color:#f0dfcb;background:#fff9ef;color:#947451}
.events-table{width:100%;border-collapse:collapse}.events-table th{text-align:left;padding:15px 22px;background:#fcfcff;color:#a7aec0;text-transform:uppercase;font-size:9px;letter-spacing:.08em}
.events-table td{padding:16px 22px;border-top:1px solid #edf0f6;font-size:11px;color:#626c86}.events-table tr:hover td{background:#fcfbff}
.events-table td b{color:#353a53}.muted{color:#9fa7b9;font-size:11px}
.drawer-backdrop{position:fixed;inset:0;background:#16162e78;backdrop-filter:blur(5px);z-index:40;display:flex;align-items:center;justify-content:center;padding:20px}
.drawer{background:#fff;width:min(550px,100%);max-height:90dvh;overflow:auto;border:1px solid #e6e2f3;border-radius:23px;box-shadow:0 24px 85px #13112e40;padding:27px}
.drawer-head{display:flex;align-items:start;justify-content:space-between;gap:10px}.drawer-head h2{font-size:22px;letter-spacing:-.055em;margin:8px 0}.drawer-head p{font-size:11px;line-height:1.7;color:#969db1}
.drawer-body{display:flex;flex-direction:column;gap:16px;margin:23px 0}.drawer-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:26px}.provider-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.provider-btn{min-height:110px;border:1px solid #e6e6f0;background:#fff;border-radius:13px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:9px;font-size:10px;font-weight:800;color:#69728e}
.provider-btn.selected{background:#f4f1ff;border-color:#8d79ee;color:#6c57db}
.provider-btn b{font-size:24px}.tip{font-size:10px;color:#969eaf;line-height:1.7;margin:0}
.toast{position:fixed;bottom:24px;right:25px;z-index:100;background:#252744;color:#fff;padding:13px 17px;border-radius:12px;font-size:11px;font-weight:750;box-shadow:0 15px 35px #25264535;max-width:390px}
.auth-page{min-height:100dvh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);background:radial-gradient(ellipse at 27% 55%,#e9e5ff,#f7f8fc 72%)}
.auth-story{padding:clamp(30px,6vw,80px);display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
.auth-story .eyebrow{margin:34px 0 16px}.auth-story h1{font-size:clamp(48px,6vw,82px);line-height:1.05;max-width:770px}.auth-story h1 em{display:block}
.auth-story p{max-width:460px;font-size:14px;color:#878ea3;line-height:1.9;margin:20px 0}
.auth-flow{margin-top:45px;width:min(420px,100%);display:flex;flex-direction:column;gap:9px}
.auth-flow>div{display:flex;align-items:center;gap:14px;padding:14px 17px;background:#ffffffb5;border:1px solid #e9e6f5;border-radius:12px;color:#72718b;font-size:11px}
.auth-flow b{color:#6753dc;font-weight:850}
.auth-join{display:flex;align-items:center;justify-content:center;padding:30px}
.auth-card{width:min(450px,100%);border-radius:25px;border:1px solid #e7e5f3;background:#fff;padding:clamp(28px,4vw,53px);box-shadow:0 30px 90px #39317411}
.auth-card h2{font-size:26px;margin:18px 0 9px;letter-spacing:-.06em}.auth-card p{font-size:12px;color:#949db0;line-height:1.75}.auth-card .btn{width:100%;margin-top:10px}
.auth-card .legal{font-size:10px;margin-top:22px;color:#aeb5c4}
@media(max-width:1150px){.flow-layout{grid-template-columns:minmax(0,1fr)}.inspector{width:100%}.catalog{grid-template-columns:repeat(2,1fr)}}
@media(max-width:980px){.sidebar{width:78px;padding:25px 9px}.shell{grid-template-columns:78px 1fr}.brand-wrap{justify-content:center;padding:0}.brand-text,.sidebar-label,.nav-item span,.sidebar-bottom .switcher,.user-chip>div{display:none}.nav-item{justify-content:center;padding:13px}.sidebar-bottom{padding-left:0;padding-right:0}.grid-metrics{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}}
@media(max-width:640px){.shell{display:block}.sidebar{height:auto;width:100%;position:sticky;top:0;padding:10px 12px;flex-direction:row;align-items:center;justify-content:space-between;gap:4px;overflow:auto}.brand-wrap{padding:0}.sidebar-group{flex-direction:row;gap:2px}.sidebar-bottom{display:none}.nav-item{padding:9px}.main{padding:0 14px 50px}.topbar{min-height:69px;margin-bottom:23px}.top-right .top-identity,.top-right .status{display:none}.top-right{gap:3px}.top-right .btn{font-size:9px;padding:8px}.heading{align-items:start;flex-direction:column}.heading h1{font-size:31px}.grid-metrics{gap:8px}.metric{min-height:105px;padding:13px}.metric strong{font-size:23px}.split{gap:12px}.panel-head{padding:17px}.list-row{padding:13px 16px}.flow-toolbar{flex-wrap:wrap}.flow-toolbar input{max-width:100%;flex-basis:100%}.flow-toolbar .spacer{display:none}.canvas-wrap{min-height:490px}.canvas{height:530px}.catalog{grid-template-columns:1fr 1fr;gap:9px}.service-card{min-height:160px;padding:15px}.events-table th,.events-table td{padding:12px 10px;font-size:9px}.drawer{padding:22px}.auth-page{display:block}.auth-story{padding:28px 25px 0}.auth-story h1{font-size:48px}.auth-flow{display:none}.auth-join{padding:20px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}


/* ECQUIZ Connect / Personal OAuth V2 */
.oauth-actions{display:flex;flex-wrap:wrap;gap:9px;padding:16px 22px;border-bottom:1px solid #f0edf8}
.oauth-setup-note{padding:12px 22px;color:#a17d62;background:#fffaf5;font-size:10px;line-height:1.65}
.disabled-link{opacity:.45;cursor:not-allowed;pointer-events:auto!important}
.service-card .btn{align-self:flex-start;min-height:34px;margin-top:6px}
.sheet-drawer{width:min(760px,100%);max-height:92dvh}
.sheet-drawer .drawer-body{gap:15px}
.sheet-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px;background:#f8f7ff;border:1px solid #eae6ff;border-radius:13px}
.sheet-choice .tip{margin:7px 0 0}
.sheet-selected{background:#effbf4;border:1px solid #d5efdf;border-radius:13px;padding:15px;display:flex;flex-direction:column;gap:7px;overflow-wrap:anywhere}
.sheet-selected strong{color:#258668;font-size:12px}
.sheet-selected small{color:#8c9aa4;font-size:10px}
.sheet-selected a{color:#5e53bb;font-size:11px;font-weight:800}
.sheet-mapping{margin-top:10px;border:1px solid #e5e7f2;border-radius:15px;padding:18px;background:#fcfcff}
.sheet-mapping .tip{margin:11px 0 17px}
.sheet-map-row{display:grid;grid-template-columns:minmax(125px,.95fr) 20px minmax(120px,1.3fr) 31px;gap:8px;align-items:center;margin-bottom:9px}
.sheet-map-row>span{text-align:center;color:#9d94c5;font-weight:850}
.sheet-map-row select,.sheet-map-row input{font-size:11px;min-width:0}
.sheet-map-row button{padding:4px;min-height:35px}
.app-mark.google_sheets_oauth,.app-mark.google_oauth{background:#eaf8ee}
@media(max-width:640px){
.oauth-actions{padding:15px;gap:7px}.oauth-actions .btn{font-size:10px}
.sheet-drawer{width:100%;padding:18px}
.sheet-choice{align-items:flex-start;flex-direction:column}
.sheet-map-row{grid-template-columns:minmax(105px,.95fr) 14px minmax(100px,1.25fr) 30px;gap:5px}
.sheet-map-row input,.sheet-map-row select{padding:9px 7px;min-height:38px;font-size:10px}
}
