:root{
  --ink:#131a19;--muted:#707b74;--muted-2:#8b968f;--line:#e7ebe7;--line-soft:#eef1ee;
  --green:#277065;--green-dark:#1d564e;--green-bright:#c8f653;--green-soft:#e7f0ec;--green-tint:#f2f7f4;
  --teal:#2f8a7c;--bg:#f4f6f5;--white:#fff;--sidebar:#0d1f1c;--sidebar-2:#132e2a;--orange:#f28a51;
  --danger:#e2574a;--danger-soft:#fdeeec;--warn:#c8850f;--warn-soft:#fff4de;
  --radius-xl:18px;--radius-lg:14px;--radius-md:10px;--radius-sm:7px;--radius-pill:999px;
  --shadow-xs:0 1px 2px rgba(13,31,28,.05);--shadow-sm:0 4px 14px rgba(13,31,28,.06);
  --shadow-md:0 10px 28px rgba(13,31,28,.09);--shadow-lg:0 24px 56px rgba(8,20,18,.16);
  --shadow-card:0 2px 6px rgba(13,31,28,.05);--shadow-card-hover:0 8px 22px rgba(13,31,28,.09);
  --shadow-brand:0 6px 16px rgba(39,112,101,.3);--shadow-brand-hover:0 10px 22px rgba(39,112,101,.38);
  --glow:0 0 0 4px rgba(39,112,101,.12);--brand-gradient:linear-gradient(135deg,#2f8a7c,#1d564e);
  --font-body:'DM Sans',system-ui,sans-serif;--font-display:'Bricolage Grotesque','DM Sans',system-ui,sans-serif;
}
*{box-sizing:border-box}
body{margin:0;font-family:'DM Sans',sans-serif;color:var(--ink);background:var(--bg);font-size:14px;-webkit-font-smoothing:antialiased}
::selection{background:#e5f9b4;color:#0f342e}
.app-shell{display:flex;min-height:100vh}

.sidebar{width:256px;background:var(--white);color:var(--ink);padding:22px 14px 16px;display:flex;flex-direction:column;position:fixed;height:100vh;z-index:5;border-right:1px solid var(--line)}
.brand{font:700 20px 'Bricolage Grotesque';display:flex;align-items:center;gap:10px;padding:2px 8px 22px;color:var(--ink)}
.brand-mark{width:33px;height:33px;border-radius:10px;background:var(--brand-gradient);display:grid;place-items:center;color:white;font-size:17px;box-shadow:0 6px 16px rgba(47,138,124,.28),inset 0 1px 0 rgba(255,255,255,.25)}
.brand-dot{color:var(--green)}

.company-switch{border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:var(--radius-md);padding:10px;display:flex;text-align:left;align-items:center;gap:9px;width:100%;cursor:pointer;transition:border-color .15s,transform .15s}
.company-switch:hover{border-color:var(--muted-2);transform:translateY(-1px)}
.company-switch small{display:block;color:var(--muted);font-size:10px;margin-bottom:3px}
.company-switch strong{font-size:13px}
.company-logo{width:32px;height:32px;background:var(--green-soft);color:var(--green-dark);border-radius:9px;display:grid;place-items:center;font-weight:700;font-size:11px;flex:none}
.company-logo.blue{background:#e8edff;color:#5870ce}
.company-logo.pink{background:#ffe8f0;color:#c64b78}
.company-logo.add{background:var(--line-soft);color:var(--muted)}
.chevron{margin-left:auto;transition:transform .15s;color:var(--muted);display:grid;place-items:center;flex:none}
.chevron svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.company-menu.open+.company-switch .chevron,.company-menu.open ~ .chevron{transform:rotate(180deg)}
.sidebar-footer{margin-top:14px;padding-top:14px;border-top:1px solid var(--line);position:relative}
.company-menu{display:none;position:absolute;bottom:64px;left:14px;width:216px;background:var(--white);border:1px solid var(--line);border-radius:var(--radius-md);padding:5px;box-shadow:var(--shadow-lg)}
.company-menu.open{display:block;animation:pop-in .14s ease-out}
.company-menu button{width:100%;display:flex;gap:8px;align-items:center;background:none;border:0;color:var(--ink);padding:9px 8px;border-radius:8px;cursor:pointer;text-align:left;font:500 12px 'DM Sans'}
.company-menu button:hover{background:var(--bg)}
.company-menu b{margin-left:auto;color:var(--green);display:grid;place-items:center}
.company-menu b svg,.company-menu button>svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.company-logo svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.sidebar nav{margin-top:16px;flex:1;overflow-y:auto;scrollbar-width:thin}
.nav-item{display:flex;align-items:center;width:100%;gap:12px;border:0;background:transparent;color:#5c6862;padding:10px 12px;border-radius:var(--radius-sm);font:500 12.5px var(--font-body);cursor:pointer;margin:1px 0;position:relative;transition:background .15s,color .15s,transform .12s}
.nav-item svg{width:17px;height:17px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.nav-item:hover{background:var(--bg);color:var(--ink);transform:translateX(1px)}
.nav-item.active{background:var(--green-soft);color:#1e675c;box-shadow:inset 3px 0 var(--green)}
.nav-item.active svg{opacity:1;color:var(--green)}
.badge{background:var(--brand-gradient);color:white;border-radius:20px;font-size:10px;font-weight:700;padding:2px 7px;margin-left:auto;box-shadow:0 2px 6px rgba(39,112,101,.32)}
.badge.hidden{display:none}

.avatar{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:#fff;box-shadow:0 2px 6px rgba(0,0,0,.15);flex:none}
.avatar.purple{background:linear-gradient(135deg,#8b7ff0,#6a5cd6)}

.shell-profile-block{position:relative}
.profile-trigger{border:2px solid transparent;background:none;padding:0;border-radius:50%;cursor:pointer;display:inline-flex;line-height:0;transition:border-color .15s,transform .15s}
.profile-trigger:hover{border-color:var(--green-soft);transform:translateY(-1px)}
.profile-trigger:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.profile-menu{display:none;position:absolute;top:52px;right:0;width:252px;background:var(--white);border:1px solid var(--line);border-radius:var(--radius-lg);padding:6px;box-shadow:var(--shadow-lg);z-index:10}
.profile-menu.open{display:block;animation:pop-in .14s ease-out}
.profile-menu-header{display:flex;align-items:center;gap:11px;padding:10px 8px 12px}
.profile-menu-header .avatar{width:42px;height:42px;font-size:13px}
.profile-menu-identity{min-width:0;flex:1}
.profile-menu-identity strong{font-size:13px;display:block;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-menu-identity small{display:block;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.profile-role-badge{display:inline-block;margin-top:7px;font-size:9px;font-weight:700;letter-spacing:.4px;color:var(--green-dark);background:var(--green-soft);padding:3px 8px;border-radius:var(--radius-pill)}
.profile-menu-divider{height:1px;background:var(--line);margin:0 4px 6px}
.profile-menu button{width:100%;text-align:left;display:flex;align-items:center;gap:9px;background:none;border:0;color:var(--ink);padding:9px 10px;border-radius:8px;cursor:pointer;font:500 12px var(--font-body)}
.profile-menu button svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--muted)}
.profile-menu button:hover{background:var(--bg)}
.profile-menu #logoutButton{color:#c54a42}
.profile-menu #logoutButton svg{color:currentColor}
.profile-menu #logoutButton:hover{background:var(--danger-soft)}

.main-col{flex:1;display:flex;flex-direction:column;min-width:0;margin-left:256px;width:calc(100% - 256px)}
.app-shell.inbox-mode .sidebar{display:none}
.app-shell.inbox-mode .main-col{margin-left:0;width:100%}
.app-shell.inbox-mode .main-topbar{display:none}
#main{flex:1;min-width:0}

.main-topbar{height:64px;background:var(--white);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:flex-end;gap:14px;padding:0 22px;flex:none}
.main-topbar .shell-profile-block{position:relative}

.inbox-topbar{height:64px;background:var(--white);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:28px;padding:0 22px;flex:none}
.inbox-topbar .brand{padding:0}
.inbox-shortcuts{display:flex;align-items:center;gap:3px;margin-right:auto}
.inbox-shortcuts button{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:#5c6862;padding:9px 13px;border-radius:20px;font:600 12px 'DM Sans';cursor:pointer;transition:background .15s,color .15s}
.inbox-shortcuts button svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.inbox-shortcuts button:hover:not(.active){background:var(--bg);color:var(--ink)}
.inbox-shortcuts button.active{background:var(--green-soft);color:#1e675c}
.inbox-topbar .shell-profile-block{position:relative;border-left:1px solid var(--line);padding-left:14px}
.top-actions{display:flex;gap:9px;align-items:center}
/* ---------- Botões circulares de ícone (padrão .flow-icon-btn) ---------- */
.icon-btn,.filter-btn,.icon-circle{width:34px;height:34px;flex:none;border:1px solid var(--line);background:#fff;border-radius:50%;color:#5c6862;cursor:pointer;display:inline-grid;place-items:center;padding:0;transition:border-color .15s,color .15s,background .15s,box-shadow .15s}
.icon-btn svg,.filter-btn svg,.icon-circle svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-btn:hover,.filter-btn:hover,.icon-circle:hover{border-color:var(--green);color:var(--green-dark);background:var(--green-tint)}
.icon-btn:disabled,.filter-btn:disabled,.icon-circle:disabled{opacity:.5;cursor:not-allowed}
.filter-btn{width:38px;height:38px}
.notification{position:relative}
.notification i{width:6px;height:6px;border-radius:50%;background:var(--danger);position:absolute;top:6px;right:6px;box-shadow:0 0 0 2px #fff}

/* ---------- Sistema de botões (mesma linguagem do construtor de fluxos) ---------- */
.btn,.primary,.secondary,.ghost-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;padding:0 18px;border-radius:var(--radius-pill);font:600 12.5px var(--font-body);cursor:pointer;white-space:nowrap;text-decoration:none;transition:transform .12s,box-shadow .15s,border-color .15s,background .15s,color .15s}
.btn svg,.primary svg,.secondary svg,.ghost-btn svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.btn:disabled,.primary:disabled,.secondary:disabled,.ghost-btn:disabled{opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}
.primary,.btn.primary{border:0;background:var(--brand-gradient);color:#fff;box-shadow:var(--shadow-brand)}
.primary:hover:not(:disabled),.btn.primary:hover:not(:disabled){transform:translateY(-1px);box-shadow:var(--shadow-brand-hover)}
.primary:active:not(:disabled),.btn.primary:active:not(:disabled){transform:translateY(0)}
.secondary,.btn.secondary{border:1px solid var(--line);background:#fff;color:var(--ink)}
.secondary:hover:not(:disabled),.btn.secondary:hover:not(:disabled){border-color:var(--green);color:var(--green-dark);background:var(--green-tint)}
.ghost-btn,.btn.ghost{border:0;background:transparent;color:var(--muted)}
.ghost-btn:hover:not(:disabled),.btn.ghost:hover:not(:disabled){background:var(--bg);color:var(--ink)}
.btn.danger{border:1px solid #f0cfcb;background:#fff;color:#b8443d}
.btn.danger:hover:not(:disabled){background:var(--danger-soft)}
.btn.sm,.primary.sm,.secondary.sm{height:32px;padding:0 14px;font-size:11.5px}
.btn.block{width:100%}

.inbox-grid{display:grid;grid-template-columns:320px minmax(430px,1fr) 288px;height:calc(100vh - 64px);transition:grid-template-columns .18s ease}
.inbox-grid.details-collapsed{grid-template-columns:320px minmax(430px,1fr) 0px}
.inbox-grid.details-collapsed .details-panel{overflow:hidden;border:0}
.chat-header-identity{display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:6px;margin:-6px 0;border-radius:10px;cursor:pointer;text-align:left;font:inherit;color:inherit;transition:background .15s}
.chat-header-identity:hover{background:var(--bg)}
.chat-header-identity h3,.chat-header-identity small{pointer-events:none}
.conversation-list,.chat-panel,.details-panel{background:white;border-right:1px solid var(--line);overflow:auto}
.list-tools{display:flex;padding:16px 14px 10px;gap:8px}
.search{height:38px;background:var(--bg);border:1px solid var(--line-soft);border-radius:var(--radius-sm);display:flex;align-items:center;padding:0 11px;gap:8px;flex:1;transition:border-color .15s,box-shadow .15s}
.search:focus-within{border-color:var(--green);box-shadow:var(--glow);background:#fff}
.search svg{width:14px;height:14px;stroke:var(--muted);fill:none;stroke-width:2;flex:none}
.search input{border:0;background:transparent;outline:0;width:100%;font-family:inherit;font-size:12px}
.tabs{display:flex;padding:9px 12px;gap:5px;overflow-x:auto}
.tabs button{border:0;background:transparent;font-size:11px;font-weight:600;color:#7c867f;padding:7px 11px;white-space:nowrap;cursor:pointer;border-radius:20px;transition:background .15s,color .15s}
.tabs button.active{color:#1e675c;background:var(--green-soft)}
.tabs button:hover:not(.active){background:var(--line-soft)}
.tabs b{background:#eff2f0;border-radius:9px;padding:1px 6px;font-size:9px;margin-left:5px}
.tabs button.active b{background:#d6f2ee;color:#1e675c}
.list-caption{display:flex;justify-content:space-between;padding:14px 16px 8px;font-size:9px;font-weight:700;color:#95a099;letter-spacing:.7px}
.list-caption button{display:inline-flex;align-items:center;gap:4px;border:0;background:none;font-size:9px;color:#7d8880;cursor:pointer;font-weight:600}
.list-caption button svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.conversation{display:grid;grid-template-columns:40px 1fr auto;gap:11px;padding:13px 14px;cursor:pointer;border-left:3px solid transparent;position:relative;transition:background .12s}
.conversation:hover{background:#f8fafa}
.conversation.active{background:linear-gradient(90deg,var(--green-tint),#fbfdfd);border-left-color:var(--green)}
.conversation .avatar{width:38px;height:38px}
.conversation h3{font-size:12px;margin:1px 0 5px;font-weight:700}
.conversation p{font-size:10.5px;color:#78827b;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.conversation time{font-size:9px;color:#9aa29d}
.conversation .unread{position:absolute;right:14px;top:39px;background:var(--brand-gradient);color:white;border-radius:20px;padding:2px 6px;font-size:9px;font-weight:700;box-shadow:0 2px 6px rgba(39,112,101,.35)}
.status-dot{position:absolute;width:10px;height:10px;border:2px solid white;border-radius:50%;background:var(--green-bright);margin:29px 0 0 28px;box-shadow:0 0 0 1px rgba(200,246,83,.3)}

.chat-panel{display:flex;flex-direction:column}
.chat-header{height:66px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 18px;gap:10px;flex:none;background:#fff}
.chat-header .avatar{width:38px;height:38px}
.chat-header h3{font-size:13px;margin:0 0 3px;font-weight:700}
.chat-header small{font-size:10px;color:#51a498;display:inline-flex;align-items:center;gap:5px}
.chat-header small::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.chat-header .header-actions{margin-left:auto;display:flex;gap:7px;align-items:center}
.chat-header .action-btn{height:34px;padding:0 12px;border:1px solid var(--line);background:#fff;border-radius:var(--radius-pill);font:600 11px var(--font-body);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:background .15s,border-color .15s,color .15s}
.chat-header .action-btn:hover{background:var(--bg)}
.chat-header .action-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.chat-header .action-btn.active{border-color:var(--green);color:#23796c;background:var(--green-soft)}
.chat-header .action-btn.warn{border-color:#d49c36;color:#9a6c14;background:#fff7e8}
.chat-header .action-btn.icon-only{width:34px;padding:0}
.picker-list{display:flex;flex-direction:column;gap:2px}
.picker-row{display:flex;align-items:center;gap:8px;width:100%;background:none;border:0;padding:11px 10px;border-radius:8px;cursor:pointer;text-align:left;font:500 13px 'DM Sans';color:var(--ink)}
.picker-row:hover{background:var(--bg)}
.picker-row.active{color:#23796c;font-weight:700}
.picker-row svg{width:14px;height:14px;flex:none;margin-left:auto;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--green)}
.header-menu-wrap{position:relative}
.header-menu{display:none;position:absolute;top:42px;right:0;width:200px;background:var(--white);border:1px solid var(--line);border-radius:var(--radius-md);padding:6px;box-shadow:var(--shadow-lg);z-index:20}
.header-menu.open{display:block;animation:pop-in .14s ease-out}
.header-menu button{width:100%;display:flex;gap:9px;align-items:center;background:none;border:0;color:var(--ink);padding:10px 9px;border-radius:8px;cursor:pointer;text-align:left;font:500 12.5px 'DM Sans'}
.header-menu button:hover{background:var(--bg)}
.header-menu button svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--muted)}
.header-menu button + button{margin-top:2px;position:relative}
.header-menu button + button::before{content:'';position:absolute;top:-4px;left:9px;right:9px;height:1px;background:var(--line)}
.header-menu .menu-empty{padding:9px 8px;color:var(--muted);font-size:12px}
.chat-body{padding:22px 24px;flex:1;background:linear-gradient(180deg,#fafcfc,#f7fafa);overflow:auto}
.date-divider{text-align:center;margin:0 0 20px;color:#9aa39d;font-size:9px}
.date-divider span{background:var(--line-soft);padding:5px 11px;border-radius:20px;font-weight:600}
.message{max-width:73%;margin-bottom:14px;animation:msg-in .18s ease-out}
.message.received{margin-right:auto}
.message.sent{margin-left:auto}
.bubble{padding:10px 13px;border-radius:4px 14px 14px 14px;background:#fff;border:1px solid #e6ebe7;box-shadow:var(--shadow-xs);font-size:12.5px;line-height:1.5}
.sent .bubble{background:linear-gradient(160deg,#e6f8f5,#d6f3ef);border-color:#c9ddd5;border-radius:14px 4px 14px 14px}
.message time{display:block;text-align:right;color:#96a099;font-size:8px;margin-top:4px}
.message time b{color:var(--green-bright)}
.agent-label{font-size:9px;color:#7e8a83;margin:0 0 4px 4px;font-weight:600}
.system-event{text-align:center;font-size:9px;color:#8e9992;margin:18px 0}
.chat-compose{border-top:1px solid var(--line);padding:13px 16px;background:#fff;flex:none}
.composer{border:1px solid #dfe5e1;border-radius:var(--radius-md);padding:9px 10px;transition:border-color .15s,box-shadow .15s}
.composer:focus-within{border-color:var(--green);box-shadow:var(--glow)}
.composer textarea{border:0;resize:none;outline:0;width:100%;height:32px;font:12.5px 'DM Sans'}
.compose-actions{display:flex;align-items:center;gap:6px;color:var(--muted)}
.compose-actions button{background:none;border:0;cursor:pointer;color:var(--muted);width:30px;height:30px;border-radius:50%;display:inline-grid;place-items:center;padding:0;transition:background .15s,color .15s}
.compose-actions button svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.compose-actions button:hover:not(.send):not(:disabled){background:var(--green-tint);color:var(--green-dark)}
.compose-actions .send{margin-left:auto;background:var(--brand-gradient);color:white;width:34px;height:34px;border-radius:50%;display:inline-grid;place-items:center;box-shadow:0 4px 12px rgba(39,112,101,.35);transition:transform .12s}
.compose-actions .send:hover:not(:disabled){transform:translateY(-1px) scale(1.03)}
.compose-actions .send svg{width:15px;height:15px}

.details-panel{border:0;display:flex;flex-direction:column}
.details-title{height:57px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 17px;font-weight:700;font-size:12px}
.details-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 12px;gap:4px;flex:none}
.details-tabs button{border:0;background:none;font:600 11px 'DM Sans';color:var(--muted);padding:11px 10px;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .15s,border-color .15s}
.details-tabs button.active{color:#1e675c;border-color:var(--green)}
.details-tab-panel{display:none}
.details-tab-panel.active{display:block}
.customer-card{text-align:center;padding:22px 15px 16px;border-bottom:1px solid var(--line)}
.customer-card .avatar{width:56px;height:56px;margin:auto;font-size:16px;box-shadow:0 6px 16px rgba(0,0,0,.12)}
.customer-card h3{font-size:13px;margin:10px 0 3px;font-weight:700}
.customer-card p{font-size:10px;color:var(--muted);margin:0}
.details-section{padding:16px;border-bottom:1px solid var(--line)}
.details-section h4{font-size:9px;color:#909a94;letter-spacing:.9px;font-weight:700;margin:0 0 12px}
.detail-row{display:flex;gap:10px;margin:12px 0;align-items:flex-start}
.detail-row svg{width:14px;height:14px;stroke:#89968e;fill:none;stroke-width:1.8;margin-top:1px;flex:none}
.detail-row div{font-size:10px}
.detail-row small{display:block;color:#9aa39e;font-size:8px;margin-bottom:2px;font-weight:600;letter-spacing:.3px}
.detail-row strong{font-weight:600}
.tag{display:inline-flex;background:#fff0e7;color:#c56b36;border-radius:20px;padding:4px 9px;font-size:9px;margin-right:4px;font-weight:600}
.tag.green{background:var(--green-soft);color:#227367}
.assign{display:flex;align-items:center;gap:8px;border:1px solid var(--line);padding:8px;border-radius:var(--radius-sm)}
.assign .avatar{width:27px;height:27px}
.assign div{font-size:10px;flex:1}
.assign small{display:block;font-size:8px;color:#8d9891}
.resolve{width:100%;height:38px;border:1px solid var(--green);color:#23796c;background:#fff;border-radius:var(--radius-pill);font-weight:700;font-size:11px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:background .15s,color .15s}
.resolve:hover{background:var(--green-soft)}
.resolve svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.generic-page{padding:30px;max-width:1180px;margin:auto}
.generic-page .table,.generic-page .connections-empty{margin-top:22px}
.generic-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.generic-head h1{font:700 24px var(--font-display);margin:0 0 3px;letter-spacing:-.3px}
.generic-head p{color:var(--muted);font-size:12px;margin:0}
.generic-head-eyebrow{display:block;font-size:9px;color:var(--green);font-weight:700;letter-spacing:1.2px;margin-bottom:6px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:24px 0}
.stat,.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow-card);transition:box-shadow .15s,transform .15s,border-color .15s}
.stat:hover,.card:hover{box-shadow:var(--shadow-card-hover);border-color:#d4ddd7;transform:translateY(-1px)}
.stat span{font-size:11px;color:var(--muted)}
.stat strong{font:700 28px var(--font-display);display:block;margin:8px 0;letter-spacing:-.5px}
.stat small{color:#2a8f80;font-weight:600;display:inline-flex;align-items:center;gap:4px}

.team-section{margin-bottom:26px}
.team-section-head{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
.team-section-head h2{font:700 15px var(--font-display);margin:0}
.team-section-head span{font-size:11px;color:var(--muted)}
.team-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
.team-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-card);padding:16px;display:flex;flex-direction:column;gap:12px;transition:box-shadow .15s,border-color .15s}
.team-card:hover{box-shadow:var(--shadow-card-hover);border-color:#d4ddd7}
.team-card header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.team-card header h3{font:700 13.5px var(--font-display);margin:0}
.team-card-delete{width:28px;height:28px;flex:none;border:1px solid var(--line);background:#fff;border-radius:50%;color:#5c6862;display:grid;place-items:center;padding:0;cursor:pointer;transition:border-color .15s,color .15s,background .15s}
.team-card-delete svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.team-card-delete:hover{border-color:#e6b3ad;color:#b8443d;background:var(--danger-soft)}
.team-card-empty{font-size:11px;color:var(--muted);margin:4px 0}
.team-member-row{display:flex;align-items:center;gap:9px}
.team-member-row>div:nth-child(2){flex:1;min-width:0}
.team-member-row strong{display:block;font-size:11.5px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-member-row small{font-size:9.5px;color:var(--muted)}
.team-member-row button{background:none;border:0;color:var(--muted);cursor:pointer;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;flex:none;padding:0;transition:background .15s,color .15s}
.team-member-row button svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.team-member-row button:hover{background:var(--danger-soft);color:#b8443d}
.team-card header>div{display:flex;flex-direction:column;gap:3px}
.team-member-count{font-size:10px;color:var(--muted);font-weight:600}
/* pilha compacta de avatares no card: altura fixa, não cresce com o tamanho da equipe */
.team-avatar-stack{display:flex;align-items:center;min-height:34px}
.team-avatar-stack .avatar{border:2px solid #fff;margin-left:-10px;transition:transform .15s}
.team-avatar-stack .avatar:first-child{margin-left:0}
.team-avatar-stack .avatar:hover{transform:translateY(-2px);z-index:1}
.team-stack-more{background:var(--line-soft);color:var(--muted);font-size:9px}
.team-card-footer{border-top:1px solid var(--line);padding-top:12px;margin-top:auto}
.team-card-footer .secondary{width:100%;justify-content:center;height:34px;font-size:11px}
.team-manage-list{display:flex;flex-direction:column;max-height:420px;overflow-y:auto;margin-top:4px}
.team-manage-row{display:flex;align-items:center;gap:10px;padding:9px 2px;border-bottom:1px solid var(--line-soft)}
.team-manage-row:last-child{border-bottom:0}
.team-manage-row>div:nth-child(2){flex:1;min-width:0;display:flex;flex-direction:column}
.team-manage-row small{color:var(--muted);font-size:10px}
.team-manage-toggle{border:1px solid var(--line);background:#fff;color:var(--green-dark);border-radius:var(--radius-pill);padding:0 12px;height:30px;font:600 10.5px var(--font-body);cursor:pointer;display:inline-flex;align-items:center;gap:5px;flex:none;transition:border-color .15s,background .15s,color .15s}
.team-manage-toggle:hover{border-color:var(--green);background:var(--green-tint)}
.team-manage-toggle.added{color:#b8443d}
.team-manage-toggle.added:hover{border-color:#e6b3ad;background:var(--danger-soft)}
.team-manage-toggle:disabled{opacity:.5;cursor:not-allowed}
.team-manage-toggle svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.new-team-card{border:1.5px dashed #ccd6d0;background:transparent;box-shadow:none;align-items:center;justify-content:center;color:var(--muted);cursor:pointer;min-height:120px;font:600 12px var(--font-body)}
.new-team-card:hover{border-color:var(--green);color:var(--green-dark);background:var(--green-tint)}
.new-team-card svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.avatar.sm{width:26px;height:26px;font-size:9px}
.member-row{flex-wrap:wrap;row-gap:10px}
.member-row>div:nth-child(2){flex:1 1 170px;min-width:0}
.role-select{border:1px solid var(--line);border-radius:var(--radius-sm);padding:7px 9px;font-size:11px;font-weight:600;color:var(--ink);background:#fff;cursor:pointer}
.role-badge{display:inline-flex;align-items:center;font-size:9px;font-weight:700;letter-spacing:.3px;padding:5px 10px;border-radius:var(--radius-pill);background:var(--line-soft);color:var(--muted)}
.role-badge.owner{background:#fff4de;color:#a76b15}
.stat small svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2}
.card h2{font:700 15px var(--font-display);margin:0 0 6px}
.card p{color:var(--muted);font-size:11.5px;line-height:1.55}
.card .primary,.card .secondary{margin-top:12px}
.table{width:100%;border-collapse:collapse;background:white;border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--line);box-shadow:var(--shadow-card)}
.table th,.table td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--line-soft);font-size:12px}
.table th{font-size:9px;color:var(--muted);background:#fafbfa;font-weight:700;letter-spacing:.9px}
.table td small{color:var(--muted);font-size:10px}
.table tr:last-child td{border-bottom:0}
.table tbody tr{transition:background .12s}
.table tbody tr:hover td{background:var(--green-tint)}
.status{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;background:var(--green-soft);color:var(--green-dark);border-radius:var(--radius-pill);font-size:10px;font-weight:600}
.status::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.empty-state{text-align:center;padding:80px 20px}
.empty-state .big-icon{font-size:40px;color:var(--green)}
.empty-state .big-icon svg{width:40px;height:40px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

.modal-backdrop{position:fixed;inset:0;background:rgba(11,28,25,.55);backdrop-filter:blur(2px);z-index:20;display:grid;place-items:center;animation:fade-in .15s ease-out}
.modal{width:430px;max-width:90vw;background:white;border-radius:var(--radius-xl);padding:26px;box-shadow:var(--shadow-lg);animation:pop-in .18s ease-out}
.modal h2{font:700 19px 'Bricolage Grotesque';margin:0;letter-spacing:-.2px}
.modal p{color:var(--muted);font-size:12px}
.field{margin:15px 0}
.field label{display:block;font-size:11px;font-weight:700;margin-bottom:6px}
.field input,.field select{width:100%;border:1px solid #dfe4e0;border-radius:var(--radius-sm);padding:11px;font:12px inherit;transition:border-color .15s,box-shadow .15s}
.field textarea{width:100%;border:1px solid #dfe4e0;border-radius:var(--radius-sm);padding:11px;font:12px/1.55 var(--font-body);resize:vertical;min-height:88px;transition:border-color .15s,box-shadow .15s}
.field input:focus,.field select:focus,.field textarea:focus{outline:0;border-color:var(--green);box-shadow:var(--glow)}
.field-hint{font-size:10px;color:var(--muted);line-height:1.5;margin:6px 0 0}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}

/* ---------- Drawer lateral (mesmo padrão do .flow-side-panel) ---------- */
.modal-backdrop.sheet{background:rgba(11,28,25,.28);backdrop-filter:none;display:flex;justify-content:flex-end;align-items:stretch;place-items:stretch}
.modal-backdrop.sheet .modal{width:430px;max-width:92vw;height:100%;border-radius:0;padding:0;box-shadow:-14px 0 40px rgba(13,31,28,.14);display:flex;flex-direction:column;animation:sheet-in .22s cubic-bezier(.2,.8,.3,1)}
.sheet-head{display:flex;align-items:flex-start;gap:12px;padding:20px 20px 16px;border-bottom:1px solid var(--line);flex:none}
.sheet-icon{width:36px;height:36px;border-radius:var(--radius-md);background:var(--green-tint);color:var(--green-dark);display:grid;place-items:center;flex:none}
.sheet-icon svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sheet-titles{flex:1;min-width:0}
.sheet-titles h2{font:700 15px var(--font-display);margin:0;letter-spacing:-.1px}
.sheet-titles p{font-size:11px;color:var(--muted);margin:3px 0 0;line-height:1.5}
.sheet-close{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:6px;border-radius:var(--radius-sm);display:grid;place-items:center;flex:none}
.sheet-close svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sheet-close:hover{background:var(--bg);color:var(--ink)}
.sheet-body{flex:1;overflow-y:auto;padding:18px 20px}
.sheet-body .field:first-child{margin-top:0}
.modal-backdrop.sheet .modal-actions{flex:none;margin:0;padding:14px 20px;border-top:1px solid var(--line);background:#fff}
@keyframes sheet-in{from{transform:translateX(28px);opacity:.5}to{transform:none;opacity:1}}
.toast{position:fixed;z-index:50;right:24px;top:24px;background:#0f2421;color:white;padding:12px 18px;border-radius:var(--radius-pill);box-shadow:var(--shadow-lg);opacity:0;transform:translateY(-10px);transition:.25s;pointer-events:none;font-size:12.5px;font-weight:500;display:inline-flex;align-items:center;gap:9px}
.toast svg{width:15px;height:15px;flex:none;stroke:#bff042;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.toast.show{opacity:1;transform:none}

@keyframes msg-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes pop-in{from{opacity:0;transform:scale(.97) translateY(4px)}to{opacity:1;transform:none}}
@keyframes fade-in{from{opacity:0}to{opacity:1}}

@media(max-width:1100px){.details-panel{display:none}.inbox-grid{grid-template-columns:320px 1fr}}
@media(max-width:760px){
  .sidebar{width:72px;padding:22px 10px}
  .brand span,.company-switch>span:not(.company-logo),.nav-item{font-size:0}
  .brand{padding-left:10px}
  .company-switch{justify-content:center}
  .nav-item{justify-content:center;gap:0}
  .badge{display:none}
  .main-col{margin-left:72px;width:calc(100% - 72px)}
  .app-shell.inbox-mode .main-col{margin-left:0;width:100%}
  .inbox-topbar{padding:0 12px;gap:10px}
  .inbox-shortcuts button span,.inbox-shortcuts button{font-size:0;padding:9px;gap:0}
  .inbox-shortcuts button svg{width:16px;height:16px}
  .inbox-grid{grid-template-columns:1fr}
  .conversation-list{display:none}
  .stats{grid-template-columns:1fr 1fr}
}

.agent-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);margin-bottom:18px}
.agent-tabs button{border:0;background:transparent;padding:10px 4px;margin-right:18px;font:600 12px var(--font-body);color:var(--muted);cursor:pointer;border-bottom:2px solid transparent}
.agent-tabs button.active{color:var(--ink);border-bottom-color:var(--green)}
.agent-tabs button:disabled{cursor:not-allowed;opacity:.55}
.agent-archived-toggle{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);cursor:pointer;flex:none;white-space:nowrap}
.agent-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-top:14px}
.agent-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-card);padding:16px;cursor:pointer;transition:box-shadow .15s,border-color .15s;display:flex;flex-direction:column;gap:10px}
.agent-card:hover{box-shadow:var(--shadow-card-hover);border-color:#d4ddd7}
.agent-card-head{display:flex;align-items:center;gap:10px}
.agent-card-icon{width:34px;height:34px;border-radius:10px;background:var(--green-soft);color:var(--green-dark);display:grid;place-items:center;flex:none}
.agent-card-icon svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8}
.agent-card-head h3{flex:1;min-width:0;font:700 13px var(--font-display);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agent-card-menu-wrap{position:relative;flex:none}
.agent-card-menu-btn{width:28px;height:28px;border:0;background:transparent;color:var(--muted);border-radius:7px;cursor:pointer;display:grid;place-items:center}
.agent-card-menu-btn:hover{background:var(--bg)}
.agent-card-menu-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8}
.agent-card-menu{display:none;position:absolute;top:32px;right:0;width:170px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);padding:6px;box-shadow:var(--shadow-lg);z-index:5}
.agent-card-menu.open{display:block}
.agent-card-menu button{width:100%;display:flex;align-items:center;gap:8px;background:none;border:0;padding:8px;border-radius:7px;cursor:pointer;font-size:11.5px;color:var(--ink);text-align:left}
.agent-card-menu button:hover{background:var(--bg)}
.agent-card-menu button svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;color:var(--muted)}
.agent-card-menu button.danger{color:#b8443d}
.agent-card-menu button.danger svg{color:#b8443d}
.agent-card-tags{display:flex;flex-wrap:wrap;gap:4px}
.agent-card-desc{font-size:11px;color:var(--muted);line-height:1.5;margin:0;flex:1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.agent-card time{font-size:9.5px;color:var(--muted-2)}

.agent-editor{padding:0}
.agent-editor-top{position:sticky;top:0;z-index:4;min-height:64px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:10px 24px}
.agent-editor-title{min-width:0;display:flex;flex-direction:column;gap:1px}
.agent-editor-eyebrow{font:600 9.5px var(--font-body);letter-spacing:.08em;text-transform:uppercase;color:var(--muted-2)}
.agent-editor-top h1{font:700 15px var(--font-display);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agent-editor-top-spacer{flex:1}
.agent-save-state{display:inline-flex;align-items:center;gap:6px;font:600 11px var(--font-body);color:var(--muted);white-space:nowrap}
.agent-save-state svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.2}
.agent-save-state.is-saved{color:var(--green-dark)}
.agent-save-state.is-dirty{color:var(--warn)}
.agent-save-state.is-dirty i{width:7px;height:7px;border-radius:50%;background:var(--warn);animation:agent-ping 1.6s ease-out infinite}
.agent-editor-top .primary{display:inline-flex;align-items:center;gap:7px;transition:opacity .2s,transform .2s}
.agent-editor-top .primary:disabled{opacity:.45;cursor:default;box-shadow:none;transform:none}
.agent-editor-top .primary svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.2}
.agent-editor-layout{display:grid;grid-template-columns:272px minmax(0,1fr);gap:20px;padding:24px;max-width:1180px;margin:auto;align-items:start}
.agent-editor-nav{position:sticky;top:88px;display:flex;flex-direction:column;gap:2px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:8px;height:max-content}
.agent-editor-nav button{display:flex;align-items:flex-start;gap:11px;border:0;background:transparent;border-radius:var(--radius-md);padding:11px;cursor:pointer;text-align:left;transition:background .15s}
.agent-editor-nav button:hover{background:var(--bg)}
.agent-editor-nav button.active{background:var(--green-tint);box-shadow:inset 0 0 0 1px rgba(39,112,101,.18)}
.agent-editor-nav button span{width:28px;height:28px;border-radius:9px;background:var(--bg);color:var(--muted);display:grid;place-items:center;flex:none;transition:background .15s,color .15s}
.agent-editor-nav button.active span{background:var(--brand-gradient);color:#fff;box-shadow:var(--shadow-brand)}
.agent-editor-nav button span svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8}
.agent-editor-nav button strong{display:flex;align-items:center;gap:6px;font-size:12px}
.agent-editor-nav button strong em{font:600 8.5px var(--font-body);font-style:normal;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:var(--bg);border:1px solid var(--line);border-radius:var(--radius-pill);padding:2px 6px}
.agent-editor-nav button small{display:block;font-size:10px;color:var(--muted);line-height:1.4;margin-top:2px}
.agent-editor-content{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:26px 28px 30px;min-width:0}
.agent-editor-head{margin-bottom:22px}
.agent-editor-head h2{font:700 18px var(--font-display);letter-spacing:-.01em;margin:0}
.agent-editor-head p{margin:4px 0 0;font-size:12px;color:var(--muted);line-height:1.5}
.agent-section{display:grid;grid-template-columns:200px minmax(0,1fr);gap:24px;padding:22px 0;border-top:1px solid var(--line-soft)}
.agent-section:last-child{padding-bottom:0}
.agent-section-title h3{font:700 13px var(--font-display);margin:0 0 4px}
.agent-section-title p{margin:0;font-size:11px;color:var(--muted);line-height:1.5}
.agent-section-body{display:flex;flex-direction:column;gap:16px;min-width:0}
.agent-field{display:block;min-width:0}
.agent-field-label{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:11px;font-weight:700;margin-bottom:7px}
.agent-field-label b{font-weight:500;font-size:10px;color:var(--muted-2);font-variant-numeric:tabular-nums}
.agent-field input,.agent-field textarea{display:block;width:100%;border:1px solid var(--line);border-radius:var(--radius-md);padding:10px 12px;font:12.5px var(--font-body);color:var(--ink);background:#fff;outline:0;resize:vertical;transition:border-color .15s,box-shadow .15s}
.agent-field input::placeholder,.agent-field textarea::placeholder{color:var(--muted-2)}
.agent-field input:focus,.agent-field textarea:focus{border-color:var(--green);box-shadow:var(--glow)}
.agent-field textarea{line-height:1.55;min-height:96px}
.agent-field>small{display:block;font-size:10.5px;color:var(--muted);margin-top:5px;line-height:1.4}
.agent-row-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.agent-switch-row{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:var(--radius-md);padding:9px 12px;cursor:pointer;min-height:41px;transition:border-color .15s,background .15s}
.agent-switch-row:hover{border-color:rgba(39,112,101,.35);background:var(--green-tint)}
.agent-switch-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.agent-switch-copy strong{font-size:11.5px}
.agent-switch-copy small{font-size:10px;color:var(--muted);line-height:1.35}
.agent-preview-bubble{align-self:flex-start;max-width:340px;background:var(--green-soft);border:1px solid rgba(39,112,101,.16);border-radius:14px 14px 14px 4px;padding:10px 13px;font-size:12px;line-height:1.5;color:var(--body)}
.agent-preview-bubble p{margin:0}
.agent-preview-bubble em{display:block;margin-top:4px;font-style:normal;font-weight:600;font-size:11px;color:var(--green-dark)}
.agent-subgroup-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 -6px}
.agent-choice-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.agent-choice-card{position:relative;display:flex;flex-direction:column;gap:3px;text-align:left;border:1px solid var(--line);background:#fff;border-radius:var(--radius-md);padding:12px 36px 12px 13px;cursor:pointer;color:var(--ink);transition:border-color .15s,background .15s,box-shadow .15s}
.agent-choice-card:hover{border-color:rgba(39,112,101,.4);background:var(--green-tint)}
.agent-choice-card.active{border-color:var(--green);background:var(--green-tint);box-shadow:inset 0 0 0 1px var(--green)}
.agent-choice-card strong{font:700 12px var(--font-body)}
.agent-choice-card small{font-size:10.5px;color:var(--muted);line-height:1.4}
.agent-choice-card.active small{color:var(--body)}
.agent-choice-check{position:absolute;top:10px;right:10px;width:18px;height:18px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center;color:#fff;transition:background .15s,border-color .15s}
.agent-choice-check svg{width:10px;height:10px;stroke:currentColor;fill:none;stroke-width:3;opacity:0}
.agent-choice-card.active .agent-choice-check{background:var(--green);border-color:var(--green)}
.agent-choice-card.active .agent-choice-check svg{opacity:1}
.agent-choice-group{display:flex;flex-wrap:wrap;gap:8px}
.agent-choice-group button{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:var(--radius-pill);padding:8px 14px;font:600 11px var(--font-body);cursor:pointer;color:var(--ink);transition:border-color .15s,background .15s,color .15s}
.agent-choice-group button:hover{border-color:rgba(39,112,101,.4);background:var(--green-tint)}
.agent-choice-group button.active{border-color:var(--green);color:var(--green-dark);background:var(--green-tint)}
.agent-choice-group button svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2.5}
.agent-chip-row{display:flex;flex-wrap:wrap;align-items:center;gap:7px;font-size:10.5px;color:var(--muted);font-weight:600}
.agent-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);background:#fff;color:var(--green-dark);border-radius:var(--radius-pill);padding:5px 11px;font:600 10.5px var(--font-body);cursor:pointer;transition:border-color .15s,background .15s}
.agent-chip svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2}
.agent-chip:hover{border-color:var(--green);background:var(--green-tint)}
.agent-stages-box{border:1px solid var(--line);border-radius:var(--radius-md);padding:16px;margin-bottom:18px}
.agent-stages-box>strong{display:block;font-size:12.5px;margin-bottom:3px}
.agent-stages-box .agent-subgroup-label{text-transform:none;letter-spacing:0;font-weight:600;margin:0 0 10px}
.agent-stage-list{display:flex;flex-direction:column;gap:8px;margin:14px 0}
.agent-stage-row{display:flex;align-items:flex-start;gap:8px;border:1px solid var(--line-soft);border-radius:var(--radius-sm);padding:8px}
.agent-stage-move{display:flex;flex-direction:column;gap:2px;flex:none;padding-top:2px}
.agent-stage-move button{width:22px;height:18px;border:0;background:var(--bg);border-radius:4px;font-size:8px;color:var(--muted);cursor:pointer}
.agent-stage-move button:disabled{opacity:.35;cursor:not-allowed}
.agent-stage-row textarea{flex:1;border:1px solid var(--line);border-radius:var(--radius-sm);padding:7px 9px;font:11.5px/1.5 var(--font-body);resize:vertical;outline:0}
.agent-stage-row textarea:focus{border-color:var(--green)}
.agent-stage-remove{flex:none;border:0;background:transparent;color:var(--muted);cursor:pointer;padding:4px;border-radius:6px}
.agent-stage-remove:hover{background:#fff0ef;color:#b8443d}
.agent-stage-remove svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8}
.agent-skills-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px}
@media(max-width:1024px){
  .agent-section{grid-template-columns:1fr;gap:12px}
}
@media(max-width:900px){
  .agent-editor-layout{grid-template-columns:1fr}
  .agent-editor-nav{position:static}
  .agent-row-2{grid-template-columns:1fr}
  .agent-save-state{display:none}
  .agent-editor-content{padding:20px}
}
@keyframes agent-ping{0%{box-shadow:0 0 0 0 rgba(200,133,15,.45)}100%{box-shadow:0 0 0 8px rgba(200,133,15,0)}}
}
