:root {
  --account-muted: #625e57;
  color-scheme: light;
  --pine: #173d35;
  --pine-2: #214c42;
  --green: #3b7562;
  --mint: #dceee5;
  --lime: #ddeb91;
  --paper: #f4f7f4;
  --white: #ffffff;
  --ink: #1c2c28;
  --muted: #71807a;
  --line: #e3eae5;
  --line-dark: rgba(255,255,255,.15);
  --blue-soft: #e4eff3;
  --lilac-soft: #eee9f7;
  --peach-soft: #f8e9df;
  --gold-soft: #f5efdb;
  --danger: #9b4941;
  --shadow: 0 14px 36px rgba(24, 52, 43, .08);
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}


* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #87a88d; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 246px; padding: 28px 16px 17px; background: var(--pine); color: #f5faf6; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; color: #fff; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 25px; height: 25px; border-radius: 8px; background: var(--lime); transform: rotate(-8deg); }
.brand-mark span { display: block; width: 3px; border-radius: 5px; background: var(--pine); transform: rotate(8deg); }
.brand-mark span:nth-child(1) { height: 8px; margin-top: 5px; }
.brand-mark span:nth-child(2) { height: 13px; margin-top: -2px; }
.brand-mark span:nth-child(3) { height: 9px; margin-top: 3px; }
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.07em; }
.workspace-switcher { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 34px; padding: 10px 10px; text-align: left; border: 1px solid var(--line-dark); border-radius: 12px; background: rgba(255,255,255,.07); color: #f5faf6; cursor: pointer; }
.workspace-avatar, .profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; border-radius: 10px; background: #d9eaa1; color: #294238; font-weight: 700; }
.workspace-copy, .profile-copy { display: grid; min-width: 0; gap: 1px; flex: 1; }
.workspace-copy strong, .profile-copy strong { font-size: 12px; font-weight: 600; }
.workspace-copy small, .profile-copy small { color: #b6c9c0; font-size: 11px; }
.chevron { color: #a8bdb4; font-size: 18px; }
.nav-label { margin: 31px 12px 9px; color: #a9c0b6; font-size: 11px; font-weight: 600; }
.nav-label-spaced { margin-top: 27px; }
.primary-nav, .secondary-nav { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; width: 100%; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #c7d6cf; text-align: left; cursor: pointer; transition: background .16s ease, color .16s ease; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.is-active { background: #31584d; color: #fff; }
.nav-item > span:nth-child(2) { flex: 1; font-size: 13px; }
.nav-icon { display: inline-flex; width: 18px; height: 18px; color: currentColor; }
.nav-icon svg, [data-icon] svg { display: block; width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 7px; background: #44695e; color: #f2f7f3; font-size: 11px; }
.connection-dot { width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #ddeb91; }
.sidebar-spacer { flex: 1; min-height: 26px; }
.sidebar-note { position: relative; margin: 0 2px 15px; padding: 15px 12px 14px 41px; border-radius: 12px; background: #20473e; color: #d8e6de; }
.sidebar-note p { margin: 0; font-size: 11px; line-height: 1.55; }
.sidebar-note strong { color: #fff; font-weight: 600; }
.note-spark { position: absolute; top: 14px; left: 14px; color: var(--lime); font-size: 17px; }
.profile-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 5px 0; border: 0; border-top: 1px solid var(--line-dark); background: transparent; color: #fff; text-align: left; cursor: pointer; }
.profile-avatar { width: 30px; height: 30px; border-radius: 50%; background: #bdd9d3; }
.profile-copy small { color: #afc1b9; }
.more-dots { color: #b6c9c0; letter-spacing: 2px; }

.main-area { min-height: 100vh; margin-left: 246px; padding: 0 48px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 76px; border-bottom: 1px solid #e7ece8; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #839089; font-size: 12px; }
.breadcrumb strong { color: #42534c; font-weight: 600; }
.breadcrumb-separator { color: #b1bbb5; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-button { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #61736a; cursor: pointer; font-weight: 600; }
.mobile-brand { display: none; align-items: center; gap: 8px; color: var(--pine); }
.mobile-brand .brand-mark { width: 23px; height: 23px; }
.mobile-brand .brand-name { font-size: 18px; }
.demo-strip { display: flex; align-items: center; gap: 10px; margin: 18px 0 27px; min-height: 40px; padding: 8px 11px; border: 1px solid #e3e9d7; border-radius: 9px; background: #f1f4e9; color: #58664f; font-size: 11px; }
.demo-strip strong { color: #384b3f; font-weight: 700; }
.demo-strip-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; background: #e2e9c7; color: #51683a; font-size: 13px; }
.demo-strip-close { margin-left: auto; border: 0; background: none; color: #718069; font-size: 18px; cursor: pointer; }

.view { display: none; max-width: 1220px; margin: 0 auto; animation: view-in .2s ease both; }
.view.is-visible { display: block; }
@keyframes view-in { from { opacity: .75; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 28px 0 27px; }
.dashboard-heading { margin-top: 31px; margin-bottom: 28px; }
.greeting-line, .section-kicker { margin: 0 0 7px; color: var(--green); font-size: 12px; font-weight: 700; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { margin-top: 0; font-family: var(--font-display); letter-spacing: -.045em; }
h1 { margin-bottom: 7px; color: var(--ink); font-size: clamp(27px, 3vw, 34px); line-height: 1.2; font-weight: 700; }
.page-subtitle { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--pine); color: #fff; }
.button-primary:hover { background: #245347; }
.button-secondary { border-color: #d8e2db; background: #fff; color: #314840; }
.button-secondary:hover { border-color: #aebfb5; background: #fbfdfb; }
.button-small { min-height: 36px; padding: 0 12px; font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--green); font-size: 11px; font-weight: 700; cursor: pointer; }
.text-link:hover { color: var(--pine); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(320px, .87fr); gap: 18px; align-items: stretch; }
.featured-agent { position: relative; min-height: 254px; overflow: hidden; padding: 21px 23px 18px; border-radius: 16px; background: var(--pine); color: #fff; isolation: isolate; }
.featured-agent::before { position: absolute; z-index: -1; top: -130px; right: -72px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(99, 149, 126, .25), rgba(99,149,126,0) 68%); content: ""; }
.featured-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eyebrow-light { color: #c0d4cb; font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 20px; background: rgba(220,238,229,.13); color: #e7f1eb; font-size: 10px; font-weight: 600; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #91c897; box-shadow: 0 0 0 3px rgba(145,200,151,.12); }
.featured-content { display: flex; align-items: center; gap: 17px; margin-top: 27px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font-family: var(--font-body); }
.avatar-xl { width: 63px; height: 63px; border: 3px solid rgba(255,255,255,.77); font-size: 31px; box-shadow: 0 0 0 5px rgba(255,255,255,.1); }
.avatar-lilac { background: #d7cbeb; }
.avatar-peach { background: #f3d1bd; }
.avatar-blue { background: #bdd7de; }
.avatar-yellow { background: #e5e39c; }
.avatar-rose { background: #ebc8d3; }
.featured-copy h2 { margin: 0 0 2px; font-size: 21px; font-weight: 700; letter-spacing: -.05em; }
.featured-copy p { margin: 0; color: #bdd1c8; font-size: 12px; }
.featured-divider { position: relative; z-index: 1; height: 1px; margin: 24px 0 15px; background: rgba(255,255,255,.15); }
.featured-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.featured-task { display: flex; align-items: center; gap: 10px; }
.task-icon { display: grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; border-radius: 10px; }
.task-icon svg { width: 16px; height: 16px; }
.task-icon-pale { background: rgba(255,255,255,.11); color: #d8eb9b; }
.featured-task > span:last-child { display: grid; gap: 1px; }
.featured-task small { color: #acc4b8; font-size: 10px; }
.featured-task strong { font-size: 11px; font-weight: 600; }
.round-arrow { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.05); color: #fff; cursor: pointer; }
.round-arrow:hover { background: rgba(255,255,255,.15); }
.orbit { position: absolute; z-index: -1; border: 1px solid rgba(209,235,215,.15); border-radius: 50%; pointer-events: none; }
.orbit-one { top: 47px; right: 50px; width: 125px; height: 125px; }
.orbit-two { top: 68px; right: 70px; width: 83px; height: 83px; border-color: rgba(209,235,215,.1); }

.approval-panel { min-height: 254px; padding: 20px 21px 17px; border: 1px solid #e3eae5; border-radius: 16px; background: #fff; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; }
.approval-heading { align-items: center; margin-bottom: 14px; }
.approval-heading .section-kicker, .recent-heading .section-kicker { margin-bottom: 4px; font-size: 10px; }
.approval-count { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #eff3df; color: #5d7038; font-size: 11px; font-weight: 700; }
.approval-item { padding: 12px 12px 11px; border: 1px solid #e9eee8; border-radius: 11px; background: #fbfcfa; }
.approval-item + .approval-item { margin-top: 8px; }
.approval-item-top { display: flex; align-items: center; gap: 8px; }
.mini-avatar { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #e6dff1; font-size: 14px; }
.approval-item-top strong { font-size: 11px; }
.approval-item-top small { margin-left: auto; color: #9aa49e; font-size: 10px; }
.approval-item p { margin: 9px 0 11px; color: #53645c; font-size: 11px; line-height: 1.5; }
.approval-actions { display: flex; gap: 7px; }
.approval-actions button { min-height: 29px; padding: 0 10px; border: 1px solid #dce6dc; border-radius: 7px; background: #fff; color: #53665a; font-size: 10px; font-weight: 700; cursor: pointer; }
.approval-actions .approve-button { border-color: var(--pine); background: var(--pine); color: #fff; }
.approval-panel > .text-link { margin-top: 12px; }
.empty-approval { display: grid; place-items: center; min-height: 124px; border: 1px dashed #dfe7e0; border-radius: 11px; color: #7d8b82; font-size: 11px; text-align: center; }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 16px 0 31px; }
.quick-action { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 68px; padding: 11px 12px; border: 1px solid #e4eae5; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color .16s ease, transform .16s ease; }
.quick-action:hover { transform: translateY(-2px); border-color: #b8cbc0; }
.quick-action-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; }
.quick-action-icon svg { width: 16px; height: 16px; }
.quick-icon-lime { background: #edf3d8; color: #61763d; }
.quick-icon-blue { background: var(--blue-soft); color: #4d7383; }
.quick-icon-lilac { background: var(--lilac-soft); color: #766298; }
.quick-action > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; flex: 1; }
.quick-action strong { font-size: 11px; font-weight: 700; }
.quick-action small { overflow: hidden; color: #84918b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quick-arrow { align-self: flex-start; color: #9ca9a2; font-size: 12px; }
.recent-section { margin-top: 0; }
.recent-heading { align-items: flex-end; margin-bottom: 13px; }
.recent-heading h2 { font-size: 18px; }
.activity-table { overflow: hidden; border: 1px solid #e2e9e4; border-radius: 12px; background: #fff; }
.activity-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 15px; }
.activity-row + .activity-row { border-top: 1px solid #edf1ee; }
.activity-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: #5b7467; background: #edf3e8; }
.activity-mark svg { width: 15px; height: 15px; }
.activity-mark.mail { background: #e6eff1; color: #527584; }
.activity-mark.calendar { background: #f1edda; color: #857b43; }
.activity-mark.phone { background: #e7e3f1; color: #776894; }
.activity-mark.task { background: #e2efe7; color: #557a64; }
.activity-copy { display: grid; gap: 1px; min-width: 0; }
.activity-copy strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy small, .activity-row time { color: #909d96; font-size: 10px; }
.activity-state { color: #64836d; font-size: 10px; font-weight: 600; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 17px; }
.search-field { display: flex; align-items: center; gap: 9px; width: min(100%, 280px); height: 40px; padding: 0 11px; border: 1px solid #dfe7e1; border-radius: 9px; background: #fff; color: #75847b; }
.search-field svg { width: 16px; height: 16px; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-field input::placeholder { color: #a0aaa4; }
.filter-chips { display: flex; align-items: center; gap: 5px; }
.filter-chip { padding: 7px 10px; border: 1px solid transparent; border-radius: 20px; background: transparent; color: #76837d; font-size: 10px; cursor: pointer; }
.filter-chip.is-selected { border-color: #dce6dd; background: #fff; color: var(--pine); font-weight: 700; }
.agent-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.agent-card { position: relative; padding: 17px; border: 1px solid #e2e9e3; border-radius: 14px; background: #fff; transition: border-color .15s ease; }
.agent-card:hover { border-color: #b8c9bd; }
.agent-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.agent-card-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.agent-card .avatar { width: 48px; height: 48px; font-size: 24px; }
.agent-card-identity h2 { margin: 0 0 2px; font-size: 15px; }
.agent-card-identity p { margin: 0; color: #84918a; font-size: 10px; }
.agent-menu { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #76847d; cursor: pointer; font-size: 17px; }
.agent-menu:hover { border-color: var(--line); background: #f7f9f7; }
.agent-card-description { min-height: 38px; margin: 16px 0 12px; color: #687870; font-size: 11px; line-height: 1.55; }
.agent-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid #edf1ee; }
.agent-card-meta { display: flex; align-items: center; gap: 7px; color: #8b9991; font-size: 10px; }
.agent-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; color: #66806d; }
.agent-status.is-paused { color: #9a8c6d; }
.agent-status .status-dot { width: 6px; height: 6px; box-shadow: none; }
.agent-status.is-paused .status-dot { background: #ccb87c; }
.agent-card-actions { display: flex; align-items: center; gap: 6px; }
.small-action { padding: 5px 8px; border: 1px solid #e1e8e2; border-radius: 7px; background: #fff; color: #56685e; font-size: 10px; font-weight: 600; cursor: pointer; }
.small-action:hover { background: #f3f7f3; }
.small-action.danger { color: var(--danger); }
.add-agent-tile { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 13px; padding: 14px 17px; border: 1px dashed #c8d5cc; border-radius: 13px; background: transparent; color: #51635a; text-align: left; cursor: pointer; }
.add-agent-tile:hover { border-color: #829b8b; background: rgba(255,255,255,.5); }
.add-agent-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #e7efdc; color: #5c7444; font-size: 20px; }
.add-agent-tile > span:last-child { display: grid; gap: 2px; }
.add-agent-tile strong { font-size: 11px; }
.add-agent-tile small { color: #8a978f; font-size: 10px; }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 45px 20px; border: 1px dashed #d5e0d7; border-radius: 14px; color: #7a8980; text-align: center; }
.empty-state strong { color: #40554a; font-size: 13px; }
.empty-state p { max-width: 360px; margin: 0; font-size: 11px; }

.work-tabs { display: flex; gap: 20px; margin: 0 0 17px; border-bottom: 1px solid #dfe7e1; }
.work-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 1px 11px; border: 0; background: transparent; color: #86928b; font-size: 11px; cursor: pointer; }
.work-tab.is-selected { color: var(--pine); font-weight: 700; }
.work-tab.is-selected::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 3px; background: var(--green); content: ""; }
.work-tab span { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px; background: #e8eee8; color: #6f7d74; font-size: 9px; }
.work-list { display: grid; gap: 9px; }
.work-item { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 75px; padding: 13px 15px; border: 1px solid #e2e9e3; border-radius: 12px; background: #fff; }
.work-item-main { min-width: 0; }
.work-item-main strong { display: block; margin-bottom: 3px; font-size: 12px; }
.work-item-main p { overflow: hidden; margin: 0; color: #84918a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.work-item-side { display: grid; justify-items: end; gap: 5px; }
.work-item-side small { color: #9aa59e; font-size: 10px; }
.state-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; background: #edf3e8; color: #668065; font-size: 9px; font-weight: 700; white-space: nowrap; }
.state-chip.is-pending { background: #f4efd9; color: #8a7843; }
.state-chip.is-failed { background: #f8e8e3; color: #9b5e4c; }
.work-actions { display: flex; gap: 6px; margin-top: 7px; }

.activity-summary { display: flex; align-items: center; justify-content: space-between; margin: 3px 0 17px; padding: 16px 18px; border: 1px solid #e1e9e2; border-radius: 12px; background: #fff; }
.activity-summary > div:first-child { display: flex; align-items: center; gap: 12px; }
.activity-summary-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #e5efe5; color: #4f745f; }
.activity-summary-icon svg { width: 17px; height: 17px; }
.activity-summary > div:first-child > div { display: grid; gap: 0; }
.activity-summary strong { font-family: var(--font-display); font-size: 19px; line-height: 1.1; }
.activity-summary small { color: #85918a; font-size: 10px; }
.summary-period { display: inline-flex; align-items: center; gap: 7px; color: #74837a; font-size: 10px; }
.summary-period .status-dot { width: 6px; height: 6px; background: #84ad83; box-shadow: none; }
.activity-timeline { display: grid; gap: 0; padding: 6px 0; border: 1px solid #e2e9e3; border-radius: 12px; background: #fff; }
.timeline-day { padding: 13px 18px 4px; color: #7d8b82; font-size: 10px; font-weight: 700; }
.timeline-row { display: grid; grid-template-columns: 44px 34px minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 12px 18px; }
.timeline-row + .timeline-row { border-top: 1px solid #f0f3f0; }
.timeline-time { padding-top: 6px; color: #9ba79f; font-size: 10px; }
.timeline-row .activity-mark { margin-top: 1px; }
.timeline-text { display: grid; gap: 2px; }
.timeline-text strong { font-size: 11px; font-weight: 600; }
.timeline-text p { margin: 0; color: #89958e; font-size: 10px; }
.timeline-agent { color: #698075; font-size: 10px; }

.connection-intro { display: flex; align-items: center; gap: 12px; margin: 2px 0 15px; padding: 13px 15px; border-radius: 10px; background: #e9f0e9; color: #55705f; }
.connection-intro-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: rgba(255,255,255,.7); }
.connection-intro-icon svg { width: 15px; height: 15px; }
.connection-intro p { margin: 0; font-size: 11px; }
.connection-list { display: grid; gap: 10px; }
.connection-card { display: flex; align-items: center; gap: 13px; min-height: 83px; padding: 14px 16px; border: 1px solid #e2e9e3; border-radius: 12px; background: #fff; }
.connection-logo { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid #edf0ed; border-radius: 12px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.connection-logo.google { color: #4285f4; }
.connection-logo.microsoft { color: #2877cf; font-size: 19px; }
.connection-logo.phone { background: #e9f0e9; color: #426a56; }
.connection-logo svg { width: 20px; height: 20px; }
.connection-copy { flex: 1; min-width: 0; }
.connection-copy h2 { margin: 0 0 3px; font-size: 12px; letter-spacing: -.02em; }
.connection-copy p { margin: 0; color: #87938c; font-size: 10px; }
.connection-state { display: flex; align-items: center; gap: 6px; margin-right: 8px; color: #87948c; font-size: 10px; white-space: nowrap; }
.connection-state::before { width: 6px; height: 6px; border-radius: 50%; background: #c3ccc5; content: ""; }
.connection-state.is-connected { color: #5f8268; }
.connection-state.is-connected::before { background: #77ad7d; }
.connection-card .button { min-height: 34px; padding: 0 11px; font-size: 10px; }
.privacy-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 17px; padding: 14px 15px; border: 1px solid #e1e8e2; border-radius: 11px; background: #fafcf9; color: #5d7664; }
.privacy-note > span { display: inline-flex; width: 18px; height: 18px; margin-top: 1px; }
.privacy-note svg { width: 17px; height: 17px; }
.privacy-note strong { display: block; margin-bottom: 3px; color: #40584b; font-size: 11px; }
.privacy-note p { margin: 0; color: #819087; font-size: 10px; }

.settings-layout { display: grid; grid-template-columns: 186px minmax(0,1fr); gap: 20px; align-items: start; }
.settings-nav { display: grid; gap: 4px; padding: 7px; border: 1px solid #e2e9e3; border-radius: 12px; background: #fff; }
.settings-tab { min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #75837b; text-align: left; font-size: 11px; cursor: pointer; }
.settings-tab.is-selected { background: #edf3e9; color: #42614e; font-weight: 700; }
.settings-content { min-height: 340px; padding: 20px; border: 1px solid #e2e9e3; border-radius: 12px; background: #fff; }
.settings-pane { display: none; }
.settings-pane.is-visible { display: block; }
.settings-title { margin-bottom: 17px; }
.settings-title h2 { margin: 0 0 4px; font-size: 17px; }
.settings-title p { margin: 0; color: #87938c; font-size: 11px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; border-top: 1px solid #edf1ee; cursor: pointer; }
.setting-row > span:first-child { display: grid; gap: 3px; }
.setting-row strong { font-size: 11px; font-weight: 600; }
.setting-row small { color: #87938c; font-size: 10px; }
.setting-row-static { cursor: default; }
.setting-value { display: inline-flex; gap: 12px; align-items: center; color: #6f8075; font-size: 10px; }
.switch { appearance: none; position: relative; flex: 0 0 auto; width: 33px; height: 19px; margin: 0; border: 0; border-radius: 12px; background: #cbd5ce; cursor: pointer; transition: background .16s ease; }
.switch::after { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,37,26,.2); content: ""; transition: transform .16s ease; }
.switch:checked { background: #4b8064; }
.switch:checked::after { transform: translateX(14px); }
.settings-save { margin-top: 16px; }
.team-list { margin: 0 0 14px; border: 1px solid #edf1ee; border-radius: 10px; }
.team-member { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.team-member + .team-member { border-top: 1px solid #edf1ee; }
.team-member-avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #e7edda; color: #52634c; font-size: 10px; font-weight: 700; }
.team-member-copy { display: grid; gap: 1px; flex: 1; }
.team-member-copy strong { font-size: 10px; }
.team-member-copy small { color: #8e9a93; font-size: 9px; }
.team-role { color: #789082; font-size: 9px; }
.role-note { margin-top: 14px; padding: 11px 12px; border-radius: 9px; background: #f4f7f3; color: #7c8980; font-size: 10px; line-height: 1.9; }
.role-note strong { color: #53695c; }
.advanced-tag { display: inline-flex; margin-bottom: 8px; padding: 4px 8px; border-radius: 20px; background: #f4efd9; color: #877748; font-size: 9px; font-weight: 700; }
.advanced-warning { display: flex; gap: 10px; margin-bottom: 17px; padding: 11px 12px; border-radius: 9px; background: #f2f5e8; color: #66764d; }
.advanced-warning > span { display: inline-flex; flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
.advanced-warning svg { width: 16px; height: 16px; }
.advanced-warning p { margin: 0; font-size: 10px; }
.form-label { display: block; margin: 13px 0 6px; color: #506057; font-size: 10px; font-weight: 700; }
.form-control { width: 100%; min-height: 39px; padding: 0 11px; border: 1px solid #dfe7e1; border-radius: 8px; background: #fff; color: #415349; font-size: 11px; }
.technical-details { margin-top: 17px; padding: 13px; border: 1px solid #e7ede7; border-radius: 9px; background: #fbfcfb; }
.technical-details h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: -.01em; }
.technical-details p { display: flex; align-items: center; gap: 7px; margin: 5px 0 0; color: #849188; font-size: 9px; }
.advanced-inline { margin-top: 17px; border-top: 1px solid #edf1ee; }
.advanced-inline summary { padding: 12px 0 3px; color: #61736a; font-size: 10px; font-weight: 700; cursor: pointer; }
.advanced-inline[open] summary { margin-bottom: 3px; }
.agent-detail-head { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.agent-detail-head > div { display: grid; gap: 2px; }
.agent-detail-head strong { font-family: var(--font-display); font-size: 16px; }
.agent-detail-head p { margin: 0; color: #829088; font-size: 10px; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 15px 0 4px; }
.detail-meta span { display: grid; gap: 3px; padding: 10px; border: 1px solid #e9efea; border-radius: 9px; color: #718078; font-size: 10px; }
.detail-meta strong { color: #42574a; font-size: 9px; }
.connection-modal-intro { display: flex; align-items: center; gap: 13px; }
.connection-modal-intro .connection-logo { flex: 0 0 auto; }
.service-dot { width: 6px; height: 6px; border-radius: 50%; }
.service-demo { background: #d1b965; }
.service-ready { background: #7cae83; }

.modal-root { position: fixed; z-index: 50; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(18, 42, 34, .48); backdrop-filter: blur(4px); }
.modal-root.is-open { display: flex; }
.modal-card { width: min(100%, 620px); max-height: min(90vh, 800px); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 30px 90px rgba(9,32,23,.28); animation: modal-in .18s ease both; }
@keyframes modal-in { from { opacity: .7; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 25px 17px; border-bottom: 1px solid #edf1ee; }
.modal-header h2 { margin: 0 0 4px; font-size: 18px; }
.modal-header p { margin: 0; color: #839088; font-size: 11px; }
.modal-close { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid #e6ece7; border-radius: 9px; background: #fff; color: #68776e; cursor: pointer; font-size: 18px; }
.modal-body { padding: 19px 25px 22px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 25px; border-top: 1px solid #edf1ee; background: #fafcfa; }
.wizard-progress { display: flex; align-items: center; gap: 5px; margin-bottom: 19px; }
.wizard-step-dot { flex: 1; height: 4px; border-radius: 5px; background: #e8ede9; }
.wizard-step-dot.is-complete { background: #75a487; }
.wizard-step-label { margin-left: 8px; color: #86938b; font-size: 10px; white-space: nowrap; }
.wizard-content h3 { margin: 0 0 5px; font-size: 15px; }
.wizard-content > p { margin: 0 0 15px; color: #87948c; font-size: 10px; }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.template-option { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-height: 108px; padding: 12px; border: 1px solid #e3eae4; border-radius: 11px; background: #fff; text-align: left; cursor: pointer; }
.template-option.is-selected { border-color: #71917d; background: #f1f6f0; box-shadow: inset 0 0 0 1px #71917d; }
.template-emoji { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: #eaf1dd; font-size: 16px; }
.template-option:nth-child(2) .template-emoji { background: #e5eef1; }
.template-option:nth-child(3) .template-emoji { background: #f3e9dd; }
.template-option strong { font-size: 10px; line-height: 1.35; }
.template-option small { color: #8a978f; font-size: 9px; line-height: 1.35; }
.field-group { display: grid; gap: 6px; margin-top: 14px; }
.field-group label { color: #54655a; font-size: 10px; font-weight: 700; }
.field-group input, .field-group textarea, .field-group select { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid #dde6df; border-radius: 8px; background: #fff; color: #35463d; font-size: 11px; }
.field-group textarea { min-height: 82px; resize: vertical; line-height: 1.5; }
.field-group small { color: #8d9992; font-size: 9px; }
.form-error { display: none; margin-top: 5px; color: #a44a42; font-size: 10px; }
.form-error.is-visible { display: block; }
.tone-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.tone-option { min-height: 38px; padding: 0 9px; border: 1px solid #e1e8e2; border-radius: 8px; background: #fff; color: #68786f; font-size: 10px; cursor: pointer; }
.tone-option.is-selected { border-color: #7c9b83; background: #f0f5ed; color: #40634a; font-weight: 700; }
.avatar-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 16px; }
.avatar-choice { display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid transparent; border-radius: 50%; background: #eee8f7; font-size: 26px; cursor: pointer; }
.avatar-choice:nth-child(2) { background: #f3ddce; }
.avatar-choice:nth-child(3) { background: #d9e9e9; }
.avatar-choice:nth-child(4) { background: #e7e4b5; }
.avatar-choice:nth-child(5) { background: #f1dce3; }
.avatar-choice.is-selected { border-color: #4d7960; box-shadow: 0 0 0 3px #e5efe5; }
.voice-list { display: grid; gap: 7px; }
.voice-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 11px; border: 1px solid #e4eae5; border-radius: 9px; background: #fff; cursor: pointer; }
.voice-choice.is-selected { border-color: #7a9a82; background: #f5f8f4; }
.voice-wave { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e8f0e7; color: #52775d; font-size: 12px; }
.voice-choice > span:nth-child(2) { display: grid; flex: 1; gap: 1px; }
.voice-choice strong { font-size: 10px; }
.voice-choice small { color: #8d9991; font-size: 9px; }
.voice-choice input { accent-color: #3c7056; }
.task-options, .rule-options { display: grid; gap: 7px; }
.task-option, .rule-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 11px; border: 1px solid #e4eae5; border-radius: 9px; background: #fff; cursor: pointer; }
.task-option input, .rule-option input { flex: 0 0 auto; margin: 2px 0 0; accent-color: #41745a; }
.task-option span, .rule-option span { display: grid; gap: 2px; }
.task-option strong, .rule-option strong { font-size: 10px; }
.task-option small, .rule-option small { color: #89958e; font-size: 9px; line-height: 1.45; }
.wizard-note { display: flex; gap: 9px; margin-top: 12px; padding: 10px; border-radius: 9px; background: #f2f5e8; color: #6f7d53; font-size: 9px; }
.wizard-note span { flex: 0 0 auto; }
.modal-secondary { border: 0; background: transparent; color: #718077; font-size: 11px; font-weight: 600; cursor: pointer; }
.modal-footer-right { display: flex; gap: 8px; }
.compact-modal { width: min(100%, 440px); }
.compact-modal .modal-body { padding-top: 18px; }
.modal-copy { color: #708077; font-size: 11px; line-height: 1.6; }
.modal-copy strong { color: #3d5147; }
.task-prompt { width: 100%; min-height: 115px; padding: 11px; border: 1px solid #dfe7e1; border-radius: 9px; resize: vertical; font-size: 11px; }
.select-agent-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.select-agent-row .field-group { margin: 0; }
.modal-inline-note { display: flex; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 8px; background: #eff4e9; color: #66764f; font-size: 9px; }
.modal-inline-note svg { flex: 0 0 auto; width: 14px; height: 14px; }
.toast-region { position: fixed; z-index: 80; right: 22px; bottom: 22px; display: grid; gap: 8px; width: min(360px, calc(100vw - 30px)); }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border: 1px solid #dce7dd; border-radius: 10px; background: #fff; box-shadow: var(--shadow); color: #42564b; font-size: 11px; animation: toast-in .2s ease both; }
.toast-mark { display: grid; place-items: center; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: #e8f1e4; color: #4f7858; font-size: 11px; font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); border: 0; }

@media (max-width: 1100px) {
  .main-area { padding-right: 28px; padding-left: 28px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr) minmax(285px,.9fr); gap: 12px; }
  .quick-action { padding-right: 9px; padding-left: 9px; }
  .quick-action small { max-width: 170px; }
}

@media (max-width: 850px) {
  .sidebar { width: 210px; }
  .main-area { margin-left: 210px; padding-right: 20px; padding-left: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .approval-panel { min-height: 0; }
  .quick-actions { grid-template-columns: 1fr; gap: 8px; }
  .quick-action { min-height: 60px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { grid-template-columns: repeat(3,1fr); }
  .settings-tab { text-align: center; }
}

@media (max-width: 640px) {
  .sidebar { inset: auto 0 0; width: 100%; height: 66px; flex-direction: row; justify-content: space-around; padding: 5px 7px max(5px, env(safe-area-inset-bottom)); border-top: 1px solid #2d5549; }
  .sidebar > .brand, .workspace-switcher, .nav-label, .secondary-nav, .sidebar-spacer, .sidebar-note, .profile-button { display: none; }
  .primary-nav { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 2px; }
  .nav-item { flex-direction: column; justify-content: center; gap: 2px; min-height: 54px; padding: 3px 1px; border-radius: 8px; }
  .nav-item > span:nth-child(2) { flex: 0 0 auto; font-size: 8px; }
  .nav-icon { width: 17px; height: 17px; }
  .nav-count, .connection-dot { display: none; }
  .main-area { margin-left: 0; padding: 0 16px 90px; }
  .topbar { height: 59px; }
  .mobile-brand { display: flex; }
  .breadcrumb { display: none; }
  .topbar-actions { gap: 7px; }
  .help-button { width: 29px; height: 29px; }
  .top-create { min-height: 33px; padding: 0 9px; font-size: 10px; }
  .top-create svg { width: 14px; }
  .demo-strip { align-items: flex-start; margin: 12px 0 19px; padding: 8px; font-size: 9px; line-height: 1.45; }
  .demo-strip-icon { flex: 0 0 auto; }
  .demo-strip-close { line-height: 1; }
  .dashboard-heading, .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin: 22px 0 19px; }
  .dashboard-heading .button { display: none; }
  h1 { font-size: 26px; }
  .page-subtitle { font-size: 11px; }
  .featured-agent { min-height: 234px; padding: 17px; }
  .featured-content { margin-top: 22px; }
  .approval-panel { padding: 17px; }
  .quick-actions { margin-bottom: 25px; }
  .activity-row { grid-template-columns: 33px minmax(0,1fr) auto; gap: 9px; padding: 9px 10px; }
  .activity-row time { display: none; }
  .activity-state { font-size: 9px; }
  .agent-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .search-field { width: 100%; }
  .filter-chips { overflow-x: auto; max-width: 100%; }
  .page-heading > .button { width: 100%; }
  .connection-card { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .connection-logo { width: 37px; height: 37px; }
  .connection-copy { flex: 1 1 calc(100% - 56px); }
  .connection-state { margin-left: 47px; margin-right: auto; }
  .connection-card .button { margin-left: auto; }
  .settings-content { padding: 15px; }
  .settings-nav { gap: 2px; padding: 4px; }
  .settings-tab { padding: 0 4px; font-size: 9px; }
  .work-item { grid-template-columns: 31px minmax(0,1fr); gap: 9px; padding: 11px; }
  .work-item-side { grid-column: 2; display: flex; align-items: center; justify-items: start; gap: 9px; }
  .work-tabs { gap: 14px; overflow-x: auto; }
  .work-tab { white-space: nowrap; }
  .timeline-row { grid-template-columns: 34px 31px minmax(0,1fr); gap: 7px; padding: 11px 10px; }
  .timeline-agent { display: none; }
  .activity-summary { padding: 13px; }
  .summary-period { font-size: 9px; }
  .modal-root { align-items: flex-end; padding: 0; }
  .modal-card { width: 100%; max-height: 93vh; border-radius: 17px 17px 0 0; }
  .modal-header { padding: 18px 18px 14px; }
  .modal-body { padding: 16px 18px 20px; }
  .modal-footer { padding: 12px 18px max(12px, env(safe-area-inset-bottom)); }
  .template-grid { grid-template-columns: 1fr; }
  .template-option { flex-direction: row; align-items: center; min-height: 55px; padding: 9px; }
  .template-option > span:last-child { display: grid; gap: 2px; }
  .template-emoji { flex: 0 0 auto; }
  .tone-options { grid-template-columns: 1fr; }
  .tone-option { min-height: 34px; }
  .wizard-progress { gap: 3px; }
  .wizard-step-label { font-size: 9px; }
  .select-agent-row { grid-template-columns: 1fr; }
  .toast-region { right: 12px; bottom: 77px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Workspace Hub adaptation: warm shell, pill navigation, task search,
   compact metrics, a clear approval tile and a true week grid. */
:root {
  --pine: #191815;
  --pine-2: #292722;
  --green: #626a60;
  --paper: #eeedeb;
  --ink: #1b1916;
  --muted: #77746e;
  --line: #e6e3df;
  --shadow: 0 12px 30px rgba(34, 30, 24, .06);
  --accent: #f26322;
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: #dc4f13; }

@media (min-width: 641px) {
  body { background: #eeedeb; }
  .sidebar {
    position: relative; inset: auto; z-index: 20; display: flex; flex-direction: row; align-items: center;
    gap: clamp(12px, 2vw, 30px); width: 100%; min-height: 74px; height: auto;
    padding: 10px clamp(22px, 4.3vw, 68px); border-bottom: 1px solid #e4e1dd;
    background: #f7f6f4; color: var(--ink);
  }
  .brand { flex: 0 0 auto; padding: 0 4px 0 0; color: var(--ink); }
  .brand-mark { border-radius: 9px; background: var(--accent); }
  .brand-mark span { background: #fff; }
  .workspace-switcher, .nav-label, .sidebar-note { display: none; }
  .primary-nav, .secondary-nav { display: flex; align-items: center; gap: 3px; }
  .primary-nav { flex: 0 1 auto; }
  .secondary-nav { flex: 0 0 auto; }
  .nav-item {
    display: inline-flex; width: auto; min-height: 39px; padding: 0 12px; gap: 8px;
    border-radius: 999px; color: #716e68;
  }
  .nav-item:hover { background: #eeece9; color: var(--ink); }
  .nav-item.is-active { background: #201e1a; color: #fff; }
  .nav-item > span:nth-child(2) { flex: 0 0 auto; font-size: 11px; white-space: nowrap; }
  .nav-icon { width: 15px; height: 15px; }
  .nav-count { min-width: 18px; height: 18px; border-radius: 99px; background: rgba(255,255,255,.16); color: inherit; font-size: 10px; }
  .connection-dot { background: var(--accent); }
  .sidebar-spacer { flex: 1; min-width: 0; }
  .profile-button { width: auto; flex: 0 0 auto; gap: 8px; margin-left: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--line); color: var(--ink); }
  .profile-avatar { background: #ffe0cf; color: #9b441b; }
  .profile-copy small, .more-dots { color: #88847d; }
  .main-area { min-height: calc(100vh - 74px); margin-left: 0; padding: 0 clamp(22px, 4.3vw, 68px) 64px; }
  .topbar { height: 61px; border-bottom: 0; }
  .view { max-width: 1480px; }
  .demo-strip { margin: 8px 0 20px; border-radius: 12px; }
  .dashboard-heading { margin: 19px 0 17px; }
  h1 { font-size: clamp(29px, 2.7vw, 36px); }
  .greeting-line, .section-kicker { color: #77736d; }
  .button-primary { background: var(--accent); color: #fff; }
  .button-primary:hover { background: #dc4f13; }
  .button-secondary { border-radius: 999px; }

  .delegation-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .9fr); align-items: center; gap: 23px; margin: 0 0 20px; }
  .delegation-composer {
    display: grid; grid-template-columns: 35px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
    min-height: 76px; margin: 0; padding: 11px 13px 11px 17px; border: 1px solid #e3e0dc;
    border-radius: 17px; background: #fff; box-shadow: 0 7px 20px rgba(34,30,24,.045);
  }
  .composer-search { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff0e7; color: var(--accent); }
  .composer-search svg { width: 17px; height: 17px; }
  .delegation-composer input { min-width: 0; height: 45px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: clamp(13px, 1.15vw, 16px); }
  .delegation-composer input::placeholder { color: #8e8a84; }
  .delegation-composer .button { min-height: 43px; border-radius: 999px; white-space: nowrap; }
  .composer-hint { color: #99948d; font-size: 10px; white-space: nowrap; }
  .dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: center; min-width: 0; }
  .dashboard-metrics > div { display: grid; gap: 2px; min-width: 0; padding: 4px 11px; border-left: 1px solid #dcd9d5; }
  .dashboard-metrics > div:first-child { border-left: 0; }
  .dashboard-metrics strong { color: #201e1b; font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -.06em; line-height: 1.05; }
  .dashboard-metrics span { color: #85817b; font-size: 10px; line-height: 1.3; }

  .dashboard-grid { grid-template-columns: repeat(4, minmax(0,1fr)); align-items: stretch; gap: 12px; }
  .featured-agent { min-height: 259px; padding: 19px 18px 16px; border-radius: 17px; background: #201e1b; }
  .featured-agent::before { background: radial-gradient(circle, rgba(242,99,34,.2), rgba(242,99,34,0) 68%); }
  .featured-topline { align-items: flex-start; flex-wrap: wrap; }
  .eyebrow-light { color: #d0cbc4; }
  .status-pill { background: rgba(255,255,255,.12); }
  .featured-content { gap: 13px; margin-top: 28px; }
  .avatar-xl { width: 54px; height: 54px; font-size: 27px; }
  .featured-copy h2 { font-size: 19px; }
  .featured-copy p { color: #bcb6af; font-size: 11px; }
  .featured-divider { margin: 22px 0 13px; background: rgba(255,255,255,.17); }
  .featured-task { gap: 8px; min-width: 0; }
  .featured-task > span:last-child { min-width: 0; }
  .featured-task strong { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .approval-panel { min-height: 259px; padding: 19px 17px 16px; border: 0; border-radius: 17px; background: var(--accent); color: #fff; box-shadow: 0 9px 22px rgba(242,99,34,.16); }
  .approval-panel .section-kicker { color: rgba(255,255,255,.82); }
  .approval-panel .section-heading h2 { color: #fff; font-size: 16px; }
  .approval-panel .text-link { color: #fff; }
  .approval-count { background: #fff; color: #b84915; }
  .approval-item { padding: 10px; border: 0; border-radius: 11px; background: #fffaf7; color: #29241f; }
  .approval-item + .approval-item { margin-top: 6px; }
  .approval-item-top strong { font-size: 10px; }
  .approval-item p { margin: 7px 0 8px; font-size: 10px; line-height: 1.4; }
  .approval-actions button { min-height: 27px; border-radius: 999px; }
  .approval-actions .approve-button { border-color: #211f1b; background: #211f1b; }
  .empty-approval { min-height: 105px; border-color: rgba(255,255,255,.42); color: #fff; }
  .integration-summary, .week-pulse { min-height: 259px; padding: 19px 17px 16px; border: 1px solid #e3e0dc; border-radius: 17px; background: #fff; }
  .integration-summary h2 { font-size: 16px; }
  .integration-summary-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f5f3ef; color: #625e57; }
  .integration-summary-list { display: grid; gap: 9px; margin: 17px 0 14px; }
  .integration-summary-list > span { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 28px; color: #38352f; font-size: 11px; font-weight: 600; }
  .integration-summary-list small { color: #9a958d; font-size: 9px; font-weight: 500; }
  .summary-dot { width: 7px; height: 7px; border-radius: 50%; background: #c3beb5; }
  .summary-dot-mail { background: #62a47a; }
  .summary-dot-calendar { background: #d8a44a; }
  .summary-dot-phone { background: #aaa0c3; }
  .integration-summary > .text-link { color: #46423c; }
  .week-pulse { position: relative; overflow: hidden; }
  .pulse-top { display: flex; align-items: center; justify-content: space-between; color: #77736d; font-size: 10px; font-weight: 600; }
  .pulse-mark { color: var(--accent); font-size: 18px; }
  .pulse-number { display: block; margin-top: 15px; color: #201e1b; font-family: var(--font-display); font-size: 45px; font-weight: 700; line-height: 1; letter-spacing: -.07em; }
  .week-pulse p { margin: 5px 0 11px; color: #77736d; font-size: 10px; }
  .pulse-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 69px; padding: 0 2px 2px; border-bottom: 1px solid #ebe8e4; }
  .pulse-chart > span { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
  .pulse-chart i { display: block; width: 100%; height: var(--bar); border-radius: 999px 999px 4px 4px; background: #e7e3de; }
  .pulse-chart > span:nth-child(4) i { background: var(--accent); }
  .pulse-chart small { color: #99948d; font-size: 8px; }
  .pulse-caption { display: block; margin-top: 7px; color: #aaa59e; font-size: 8px; }

  .week-overview { margin-top: 18px; padding: 20px 22px 24px; border: 1px solid #e3e0dc; border-radius: 18px; background: #fff; }
  .week-heading { align-items: center; margin-bottom: 13px; }
  .week-heading h2 { font-size: 18px; }
  .week-layout { display: block; }
  .week-calendar { position: relative; padding: 0 0 33px; }
  .schedule-grid { display: grid; grid-template-columns: 52px repeat(5, minmax(0,1fr)); grid-template-rows: 35px repeat(4, 53px); position: relative; }
  .schedule-corner { grid-column: 1; grid-row: 1; }
  .schedule-day { display: grid; place-items: center; align-self: center; justify-self: center; width: min(100%, 86px); height: 27px; border-radius: 999px; color: #6f6b65; font-size: 10px; }
  .schedule-day strong { margin-left: 3px; font-size: 10px; }
  .schedule-day.is-today { background: #211f1b; color: #fff; }
  .schedule-time { display: grid; align-items: start; padding-top: 8px; color: #aaa59e; font-size: 9px; }
  .schedule-time-1 { grid-column: 1; grid-row: 2; }
  .schedule-time-2 { grid-column: 1; grid-row: 3; }
  .schedule-time-3 { grid-column: 1; grid-row: 4; }
  .schedule-time-4 { grid-column: 1; grid-row: 5; }
  .schedule-cell { border-top: 1px solid #f0eeeb; border-left: 1px solid #f3f1ee; }
  .schedule-event { z-index: 1; display: grid; align-content: center; gap: 1px; min-width: 0; margin: 4px; padding: 5px 8px; overflow: hidden; border-radius: 9px; }
  .schedule-event small { font-size: 8px; }
  .schedule-event strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-event span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-event-one { grid-column: 2; grid-row: 2; }
  .schedule-event-two { grid-column: 3; grid-row: 3; }
  .schedule-event-three { grid-column: 4; grid-row: 3; }
  .schedule-event-four { grid-column: 2 / span 2; grid-row: 5; }
  .schedule-event-five { grid-column: 6; grid-row: 4; }
  .event-mint { background: #e7f1e9; color: #476d53; }
  .event-lilac { background: #eeeaf5; color: #665682; }
  .event-orange { background: #fff0e7; color: #a54a20; }
  .event-blue { background: #e9f0f2; color: #4e7482; }
  .standup-card { position: absolute; z-index: 3; right: 24px; bottom: -1px; display: flex; align-items: center; gap: 10px; width: 225px; min-height: 67px; padding: 10px 11px; border-radius: 13px; background: #1e1c19; color: #fff; box-shadow: 0 10px 24px rgba(29,27,23,.2); }
  .standup-icon { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff; }
  .standup-card > span:nth-child(2) { display: grid; min-width: 0; gap: 1px; }
  .standup-card small, .standup-card i { color: #b7b2ab; font-size: 8px; font-style: normal; }
  .standup-card strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .standup-card button { display: grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; margin-left: auto; border: 0; border-radius: 50%; background: #fff; color: #211f1b; cursor: pointer; }
  .quick-actions { gap: 10px; margin: 16px 0 26px; }
  .quick-action { border-radius: 14px; }
  .activity-table { border-color: #e3e0dc; border-radius: 14px; }
}

@media (min-width: 641px) and (max-width: 1050px) {
  .sidebar { gap: 10px; padding-right: 18px; padding-left: 18px; }
  .brand-name { font-size: 18px; }
  .nav-item { padding: 0 9px; gap: 6px; }
  .nav-item > span:nth-child(2) { font-size: 10px; }
  .profile-copy, .more-dots { display: none; }
  .profile-button { display: none; }
  .main-area { padding-right: 22px; padding-left: 22px; }
  .delegation-row { grid-template-columns: minmax(0,1.25fr) minmax(270px,.85fr); gap: 12px; }
  .delegation-composer { grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; padding-left: 12px; }
  .composer-hint { display: none; }
  .delegation-composer .button { padding: 0 12px; font-size: 10px; }
  .dashboard-metrics > div { padding-right: 6px; padding-left: 8px; }
  .dashboard-metrics strong { font-size: 22px; }
  .dashboard-metrics span { font-size: 9px; }
  .dashboard-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (min-width: 641px) and (max-width: 850px) {
  .secondary-nav, .profile-button { display: none; }
  .sidebar-spacer { display: block; }
}

@media (max-width: 640px) {
  body { background: #eeedeb; }
  .main-area { margin-left: 0; padding: 0 14px 92px; }
  .topbar { border-bottom: 0; }
  .delegation-row { display: grid; gap: 12px; margin-bottom: 16px; }
  .delegation-composer { display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 7px 9px; margin: 0; padding: 10px; border: 1px solid #e3e0dc; border-radius: 15px; background: #fff; }
  .composer-search { grid-row: 1; grid-column: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff0e7; color: var(--accent); }
  .delegation-composer input { grid-row: 1; grid-column: 2; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font-size: 12px; }
  .composer-hint { display: none; }
  .delegation-composer .button { grid-row: 2; grid-column: 1 / -1; width: 100%; min-height: 39px; border-radius: 999px; background: var(--accent); }
  .dashboard-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 8px 3px; border: 1px solid #e3e0dc; border-radius: 13px; background: #fff; }
  .dashboard-metrics > div { padding: 2px 8px; }
  .dashboard-metrics strong { font-size: 21px; }
  .dashboard-metrics span { font-size: 8px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .featured-agent { min-height: 221px; border-radius: 16px; background: #201e1b; }
  .approval-panel { border: 0; border-radius: 16px; background: var(--accent); color: #fff; }
  .approval-panel .section-kicker, .approval-panel .text-link { color: #fff; }
  .approval-panel .section-heading h2 { color: #fff; }
  .approval-item { background: #fffaf7; }
  .empty-approval { color: #fff; }
  .integration-summary, .week-pulse { min-height: 0; border-radius: 16px; background: #fff; }
  .week-pulse { padding-bottom: 17px; }
  .week-overview { margin-top: 15px; padding: 16px 13px 20px; border: 1px solid #e3e0dc; border-radius: 16px; background: #fff; }
  .week-heading { align-items: flex-start; flex-direction: column; }
  .week-calendar { overflow-x: auto; padding: 0 0 37px; }
  .schedule-grid { min-width: 565px; grid-template-rows: 33px repeat(4, 49px); }
  .standup-card { right: 12px; }
  .integration-summary-list { margin: 13px 0; }
  .quick-action { border-radius: 12px; }
}

/* Clearer agent identities, guided appearance builder and document workflows. */
.chibi-avatar { display: block; flex: 0 0 auto; overflow: visible; }
.library-search { display: grid; gap: 7px; margin: 18px 0; }
.library-search label { font-size: 11px; font-weight: 600; color: #5d5953; }
.library-search > div { display: flex; gap: 8px; min-width: 0; }
.library-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #dedbd5; border-radius: 10px; background: #fff; font: inherit; font-size: 12px; }
.library-search p { margin: 0; color: #77746e; font-size: 10px; }
.document-preview { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30vh; overflow: auto; margin: 12px 0; padding: 12px; border: 1px solid #e8e3db; border-radius: 9px; background: #faf8f5; color: #48443e; font: 11px/1.6 var(--font-body, sans-serif); }
@media(max-width: 450px) { .document-actions { flex-wrap: wrap; justify-content: end; max-width: 90px; } .library-search > div { flex-wrap: wrap; } .library-search .button { min-height: 36px; } }
.pulse-chart[hidden] { display: none; }
.avatar-chibi { display: grid; place-items: center; overflow: hidden; padding: 0; background: transparent; }
.avatar-chibi .chibi-avatar { width: 100%; height: 100%; }
.featured-agent .avatar-chibi .chibi-avatar { border-radius: 50%; }
.agent-card { min-width: 0; padding: 17px; border-color: #e1ded9; border-radius: 15px; box-shadow: 0 4px 13px rgba(34,30,24,.025); }
.agent-card-header, .agent-card-identity, .agent-card-identity > span:last-child { min-width: 0; }
.agent-card-identity { gap: 11px; }
.agent-card-identity .avatar { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; }
.agent-card-identity h2 { margin: 0 0 3px; color: #24221e; font-size: 14px; }
.agent-card-identity p { color: #77746e; font-size: 11px; }
.agent-card-description { min-height: 0; margin: 13px 0 15px; color: #5f5c56; font-size: 12px; line-height: 1.55; }
.agent-card-footer { align-items: flex-start; min-height: 43px; padding-top: 11px; }
.agent-card-meta { display: grid; gap: 4px; color: #77746e; font-size: 11px; }
.agent-card-meta strong { color: #34312c; font-size: 10px; }
.agent-status { flex: 0 0 auto; padding-top: 3px; color: #527453; font-size: 10px; }
.agent-card-actions { justify-content: flex-start; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.agent-card-actions .small-action { min-height: 31px; padding: 0 10px; font-size: 10px; }
.agent-reporting { margin: 9px 0 0; padding-top: 8px; border-top: 1px solid #f0eeeb; color: #77746e; font-size: 10px; }
.agent-reporting strong { color: #4a5c4d; }

.modal-root { overflow-x: hidden; }
.modal-card { width: min(100%, 680px); max-height: min(92vh, 900px); overflow: hidden; border: 1px solid #e4e0db; border-radius: 17px; }
.modal-body, .wizard-content, .modal-footer, .modal-header { min-width: 0; }
.modal-body { overflow-y: auto; overflow-x: hidden; }
.wizard-content { width: 100%; max-width: 100%; }
.wizard-content h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.035em; }
.wizard-content > p { max-width: 560px; margin: 0 0 18px; color: #77746e; font-size: 12px; line-height: 1.5; }
.wizard-progress { grid-template-columns: repeat(4, minmax(0,1fr)) auto; min-width: 0; }
.wizard-step-label { white-space: nowrap; }
.template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.template-option { min-width: 0; min-height: 68px; gap: 11px; padding: 11px; border-color: #e7e4df; }
.template-option > span:last-child { display: grid; min-width: 0; gap: 3px; }
.template-emoji { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #f5f1eb; color: #ac5730; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.template-option strong { font-size: 11px; }
.template-option small { font-size: 10px; line-height: 1.35; }
.field-group { min-width: 0; }
.field-group label { color: #393630; font-size: 11px; }
.field-group input, .field-group textarea, .field-group select { min-width: 0; min-height: 42px; color: #33312c; font-size: 12px; }
.field-group textarea { min-height: 90px; }
.tone-options { grid-template-columns: repeat(3, minmax(0,1fr)); }
.tone-option { min-height: 40px; padding: 6px; font-size: 10px; line-height: 1.25; }

.appearance-wizard > p { margin-bottom: 15px; }
.avatar-builder { display: grid; grid-template-columns: 224px minmax(0,1fr); gap: 20px; align-items: start; }
.avatar-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 190px; border: 1px solid #e7e3de; border-radius: 13px; background: linear-gradient(145deg,#faf8f5,#f0ede8); }
.avatar-preview strong { color: #67635d; font-size: 10px; font-weight: 600; }
.avatar-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; align-content: center; }
.avatar-setting { display: grid; gap: 5px; min-width: 0; color: #5e5a54; font-size: 10px; font-weight: 650; }
.avatar-setting select { width: 100%; min-width: 0; height: 37px; padding: 6px 8px; border: 1px solid #e4e0da; border-radius: 8px; background: #fff; color: #34312c; font-size: 11px; }
.look-check { display: flex; align-items: center; gap: 7px; min-height: 34px; color: #5d5953; font-size: 11px; }
.look-check input { width: 16px; height: 16px; margin: 0; accent-color: #58765c; }
.voice-field { margin-top: 18px; }
.voice-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.voice-heading > span:first-child { display: grid; gap: 3px; }
.voice-heading strong { color: #393630; font-size: 11px; }
.voice-heading small, .voice-demo-label { color: #87827b; font-size: 9px; }
.voice-demo-label { padding: 5px 8px; border-radius: 999px; background: #f5f2ee; white-space: nowrap; }
.voice-list { gap: 6px; }
.voice-choice { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; min-width: 0; min-height: 57px; padding: 8px 10px; }
.voice-radio-label { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
.voice-radio-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.voice-radio-mark { display: grid; place-items: center; width: 17px; height: 17px; border: 1.5px solid #aaa69e; border-radius: 50%; }
.voice-radio-label input:checked + .voice-radio-mark { border: 5px solid #58785e; }
.voice-radio-label input:focus-visible + .voice-radio-mark { outline: 3px solid #f3c8ad; outline-offset: 2px; }
.voice-copy { display: grid; min-width: 0; gap: 2px; }
.voice-copy strong { font-size: 11px; }
.voice-copy small { color: #827e77; font-size: 10px; line-height: 1.3; }
.voice-preview-button { align-self: center; min-height: 31px; padding: 0 10px; border: 1px solid #e5e1dc; border-radius: 999px; background: #fff; color: #5e6258; font-size: 10px; white-space: nowrap; cursor: pointer; }
.voice-preview-button:hover { border-color: #c8d2c6; background: #f8f8f5; }
.advanced-inline { margin-top: 13px; padding-top: 10px; border-top: 1px solid #ece9e4; }
.advanced-inline summary { color: #716d66; font-size: 10px; font-weight: 600; cursor: pointer; }
.advanced-inline[open] { padding-bottom: 4px; }

.mission-section { margin-top: 17px; }
.mission-section h4 { margin: 0 0 7px; color: #34312c; font-size: 12px; }
.mission-hint { margin: 0 0 8px !important; color: #77746e !important; font-size: 10px !important; }
.task-options, .rule-options { gap: 7px; min-width: 0; }
.task-option, .rule-option { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: start; gap: 10px; min-width: 0; padding: 11px 12px; border-color: #e6e2dc; border-radius: 10px; }
.task-option input, .rule-option input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: #57785d; }
.task-option span, .rule-option span { display: grid; min-width: 0; gap: 3px; }
.task-option strong, .rule-option strong { color: #34312c; font-size: 11px; line-height: 1.35; }
.task-option small, .rule-option small { color: #77746e; font-size: 10px; line-height: 1.4; }
.rule-option { background: #faf9f7; }
.wizard-note { align-items: flex-start; margin-top: 14px; padding: 10px 12px; background: #f4f1e9; color: #6b6457; font-size: 10px; line-height: 1.45; }
.wizard-note span:first-child { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #c8bfa9; border-radius: 50%; font-size: 10px; }
.modal-footer { flex-wrap: wrap; }
.modal-footer-right { flex-wrap: wrap; justify-content: flex-end; }

.work-item { grid-template-columns: 28px minmax(0,1fr) auto; gap: 12px; cursor: default; }
.work-item .activity-mark { width: 28px; height: 28px; }
.work-item .activity-mark svg { width: 14px; height: 14px; }
.work-item-main strong { color: #302e29; font-size: 12px; }
.work-item-main p { max-width: 100%; color: #77746e; font-size: 10px; }
.work-detail-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 0; border: 0; background: transparent; color: #73533e; font-size: 10px; font-weight: 650; cursor: pointer; }
.work-detail-link:hover { color: #ad5224; }
.task-detail-summary { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e8e4de; border-radius: 11px; background: #fbfaf8; }
.task-detail-summary > div { min-width: 0; }
.task-detail-summary > div strong { display: block; color: #302e29; font-size: 12px; }
.task-detail-summary p { margin: 3px 0 0; color: #827e77; font-size: 10px; }
.task-detail-description { color: #5e5a54; font-size: 11px; line-height: 1.55; }
.process-heading { margin-top: 18px; }
.process-heading h3 { margin: 0; color: #302e29; font-size: 13px; }
.process-heading p { margin: 3px 0 8px; color: #827e77; font-size: 10px; }
.process-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.process-step { position: relative; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: start; gap: 9px; min-height: 55px; padding: 8px 0; }
.process-step:not(:last-child)::after { position: absolute; top: 31px; bottom: -6px; left: 11px; width: 1px; background: #e7e3dc; content: ""; }
.process-step-mark { z-index: 1; display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #dedbd4; border-radius: 50%; background: #fff; color: #56765c; font-size: 11px; font-weight: 700; }
.process-step.is-completed .process-step-mark { border-color: #d8e4d6; background: #edf4ea; }
.process-step.is-running .process-step-mark { border-color: #f1c4a8; background: #fff0e7; color: #ca581d; }
.process-step > div { min-width: 0; padding-top: 2px; }
.process-step strong { color: #3a3732; font-size: 11px; }
.process-step p { margin: 3px 0 0; color: #817d76; font-size: 10px; line-height: 1.4; }
.process-step > small { padding-top: 4px; color: #858078; font-size: 9px; white-space: nowrap; }
.task-result { margin-top: 11px; padding: 12px; border-radius: 10px; background: #f0f4ec; }
.task-result strong { color: #435d48; font-size: 11px; }
.task-result p { margin: 4px 0 0; color: #59685a; font-size: 10px; line-height: 1.5; }

.agent-coordination { display: grid; gap: 9px; margin-top: 17px; padding: 13px; border: 1px solid #e6e2dc; border-radius: 11px; background: #fbfaf8; }
.agent-coordination > div strong { color: #34312c; font-size: 11px; }
.agent-coordination p, .agent-coordination > small { margin: 3px 0 0; color: #77746e; font-size: 10px; line-height: 1.4; }
.agent-coordination select { width: 100%; min-height: 39px; padding: 7px 9px; border: 1px solid #e4e0da; border-radius: 8px; background: #fff; color: #34312c; font-size: 11px; }
.agent-coordination .small-action { justify-self: start; min-height: 31px; padding: 0 11px; }

.upload-document-button { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.upload-document-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.library-summary { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 15px 17px; border: 1px solid #e3e0dc; border-radius: 14px; background: #fff; }
.library-summary-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: #fff0e7; color: #b65321; }
.library-summary-mark svg { width: 17px; height: 17px; }
.library-summary > div { display: grid; gap: 2px; }
.library-summary > div strong { color: #282621; font-family: var(--font-display); font-size: 20px; line-height: 1; }
.library-summary > div span { color: #77746e; font-size: 10px; }
.library-summary p { margin: 0 0 0 auto; color: #77746e; font-size: 10px; }
.document-section-heading { margin: 20px 0 9px; }
.document-section-heading h2 { margin: 0 0 3px; color: #2c2a25; font-size: 15px; }
.document-section-heading p { margin: 0; color: #77746e; font-size: 10px; }
.document-list { display: grid; gap: 7px; }
.document-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 11px; min-width: 0; padding: 11px 13px; border: 1px solid #e3e0dc; border-radius: 12px; background: #fff; }
.document-file-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #f4f1ec; color: #70685e; }
.document-file-icon svg { width: 16px; height: 16px; }
.document-copy { min-width: 0; }
.document-copy strong { display: block; overflow-wrap: anywhere; color: #34312c; font-size: 11px; }
.document-copy small, .document-copy p { display: block; margin: 3px 0 0; color: #827e77; font-size: 9px; line-height: 1.35; }
.document-actions { display: flex; align-items: center; gap: 6px; }
.document-actions .small-action { min-height: 30px; padding: 0 10px; font-size: 10px; }
.library-note { margin-top: 24px; padding: 15px 17px; border-radius: 13px; background: #f5f2ee; }
.library-note strong { color: #3b3832; font-size: 12px; }
.library-note p { margin: 4px 0 0; color: #77746e; font-size: 10px; }
.document-agent-list { display: grid; gap: 7px; }
.document-agent-option { display: flex; align-items: center; min-height: 54px; gap: 10px; padding: 8px 10px; border: 1px solid #e6e2dc; border-radius: 9px; cursor: pointer; }
.document-agent-option > span { display: flex; align-items: center; gap: 9px; min-width: 0; }
.document-agent-option > span > span { display: grid; gap: 2px; }
.document-agent-option strong { color: #34312c; font-size: 11px; }
.document-agent-option small { color: #817d76; font-size: 10px; }
.document-agent-option input { width: 17px; height: 17px; margin: 0 1px 0 auto; accent-color: #58785e; }

@media (min-width: 641px) {
  .primary-nav { gap: 1px; }
  .nav-item { padding-right: 10px; padding-left: 10px; }
}
@media (max-width: 640px) {
  .primary-nav { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .nav-item { min-width: 0; padding-right: 0; padding-left: 0; }
  .nav-item > span:nth-child(2) { max-width: 100%; font-size: 7.5px; letter-spacing: -.02em; white-space: nowrap; }
  .modal-root { align-items: flex-end; padding: 0; }
  .modal-card { width: 100%; max-height: 94dvh; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 17px 17px 0 0; }
  .modal-body { padding: 14px 18px 18px; }
  .wizard-content h3 { font-size: 18px; }
  .wizard-content > p { margin-bottom: 13px; font-size: 11px; }
  .wizard-progress { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .wizard-step-label { grid-column: 1 / -1; justify-self: end; font-size: 9px; }
  .template-grid { grid-template-columns: 1fr; gap: 6px; }
  .template-option { min-height: 57px; padding: 8px 10px; }
  .template-emoji { width: 31px; height: 31px; }
  .tone-options { grid-template-columns: 1fr; gap: 5px; }
  .tone-option { min-height: 33px; text-align: left; }
  .avatar-builder { grid-template-columns: minmax(90px, 115px) minmax(0,1fr); gap: 10px; }
  .avatar-preview { min-height: 175px; }
  .avatar-preview .chibi-avatar { width: 100px; height: 100px; }
  .avatar-settings-grid { gap: 7px; }
  .avatar-setting { font-size: 9px; }
  .avatar-setting select { height: 34px; padding: 5px 6px; font-size: 10px; }
  .look-check { min-height: 29px; font-size: 10px; }
  .voice-choice { grid-template-columns: minmax(0,1fr) auto; gap: 5px; padding: 7px 8px; }
  .voice-copy strong { font-size: 10px; }
  .voice-copy small { font-size: 9px; }
  .voice-preview-button { min-height: 29px; padding: 0 8px; font-size: 9px; }
  .voice-demo-label { display: none; }
  .task-option, .rule-option { grid-template-columns: 18px minmax(0,1fr); padding: 10px; }
  .task-option strong, .rule-option strong { font-size: 10px; }
  .task-option small, .rule-option small { font-size: 9px; }
  .modal-footer { gap: 8px; }
  .modal-footer-right { gap: 6px; }
  .modal-footer .button { min-height: 38px; padding: 0 12px; font-size: 10px; }
  .work-item { grid-template-columns: 27px minmax(0,1fr); }
  .work-item-side { grid-column: 2; }
  .task-detail-summary { grid-template-columns: 42px minmax(0,1fr); }
  .task-detail-summary .state-chip { grid-column: 2; justify-self: start; }
  .process-step { grid-template-columns: 24px minmax(0,1fr); }
  .process-step > small { grid-column: 2; padding-top: 0; }
  .agent-coordination { padding: 11px; }
  .library-summary { flex-wrap: wrap; padding: 12px; }
  .library-summary p { flex: 0 0 100%; margin: 0; }
  .document-row { grid-template-columns: 32px minmax(0,1fr) auto; gap: 8px; padding: 9px; }
  .document-file-icon { width: 31px; height: 31px; }
  .document-actions .small-action { padding: 0 8px; font-size: 9px; }
}

/* Account and team controls inherit the approved warm workspace interface. */
[hidden] { display: none !important; }
.auth-page { min-height: 100dvh; display: grid; place-items: center; padding: 38px 20px; }
.auth-panel { width: min(100%, 430px); padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.auth-brand { width: fit-content; padding: 0; margin-bottom: 32px; color: var(--ink); }
.auth-brand .brand-mark { background: var(--accent, #f26322); }
.auth-brand .brand-mark span { background: #fff; }
.auth-panel h1 { margin: 0 0 12px; font-size: 27px; line-height: 1.25; letter-spacing: -.035em; }
.auth-intro { margin: 0 0 23px; color: var(--account-muted); font-size: 14px; line-height: 1.6; }
.auth-modes { display: flex; gap: 4px; margin: 22px 0; padding: 4px; border-radius: 10px; background: #f2f0ed; }
.auth-modes button { flex: 1; min-height: 42px; padding: 8px; border: 0; border-radius: 7px; background: transparent; color: #625e57; cursor: pointer; font-size: 13px; }
.auth-modes button[aria-pressed="true"] { background: #24211d; color: #fff; }
.auth-panel .field-group { margin-top: 18px; }
.auth-panel .field-group label { font-size: 13px; }
.auth-panel .field-group input { min-height: 46px; font-size: 14px; }
.auth-panel .field-group small, .auth-footnote { color: var(--account-muted); font-size: 12px; }
.auth-submit { width: 100%; margin-top: 24px; min-height: 46px; }
.auth-submit.button-primary { background: #b94310; }
.auth-submit.button-primary:hover { background: #98350b; }
.auth-footnote { margin: 24px 0 0; line-height: 1.6; }
.account-note { padding: 12px; border-radius: 10px; background: #fff1e6; color: #744326; font-size: 13px; }
.form-error[role="alert"]:not([hidden]) { display: block; margin: 15px 0 0; color: #923e36; font-size: 13px; line-height: 1.5; }
.account-access { max-width: 220px; min-width: 0; gap: 8px; padding-right: 12px; padding-left: 14px; }
.account-access #current-workspace-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-settings { margin-bottom: 25px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.account-settings .settings-title p { overflow-wrap: anywhere; color: var(--account-muted); font-size: 12px; }
.account-setting-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-setting-actions .button { min-height: 38px; padding: 0 12px; font-size: 11px; }
.account-usage { margin: 15px 0 0; color: var(--account-muted); font-size: 12px; line-height: 1.6; }
.account-form-action { margin-top: 14px; }
.account-create-form { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.account-create-form h3 { margin: 0 0 7px; font-size: 16px; }
.member-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.member-actions select { max-width: 150px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 11px; }
.team-member-copy { min-width: 0; }
.team-member-copy small { overflow-wrap: anywhere; color: var(--account-muted); font-size: 11px; }
.team-member-copy strong { font-size: 12px; }
.team-member-avatar { flex-shrink: 0; }
.member-remove { min-height: 36px; color: #923e36; }
#copy-status { margin-bottom: 0; color: #42533e; font-size: 12px; }
#invitation-link { font-size: 12px; }
.connection-feedback { margin-bottom: 16px; padding: 13px 15px; border-radius: 10px; background: #eef3e9; color: #394d35; font-size: 13px; }
.connection-copy .connection-account, .connection-account { margin: 5px 0; color: #48443e; overflow-wrap: anywhere; font-size: 12px; }
.connection-card .connection-copy p { color: #625e57; font-size: 12px; }
.connection-card .connection-state { font-size: 11px; }
.connection-card .connection-state.needs-reconnect { color: #963d23; }
.connection-capabilities { display: flex; flex-wrap: wrap; gap: 5px 11px; margin: 9px 0 0; padding: 0; list-style: none; color: #5b574f; font-size: 11px; }
.connection-capabilities li { padding: 3px 7px; border-radius: 6px; background: #f3f1ed; }
.integration-modal, .agent-policy-modal, .approval-detail-modal { display: flex; flex-direction: column; }
.integration-modal .modal-body, .agent-policy-modal .modal-body, .approval-detail-modal .modal-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
.integration-modal .modal-header, .integration-modal .modal-footer, .agent-policy-modal .modal-header, .agent-policy-modal .modal-footer, .approval-detail-modal .modal-header, .approval-detail-modal .modal-footer { flex-shrink: 0; }
.connection-setup-note, .approval-explanation { margin: 14px 0; padding: 12px; border-radius: 10px; background: #f6f2e9; color: #62503a; font-size: 12px; line-height: 1.65; }
.capability-fields { min-width: 0; margin: 20px 0; padding: 0; border: 0; }
.capability-fields legend { margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.capability-option { display: flex; align-items: flex-start; gap: 10px; margin: 9px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.capability-option input { flex: 0 0 auto; width: 17px; height: 17px; margin: 3px 0 0; accent-color: #b94310; }
.capability-option > span { display: grid; gap: 4px; min-width: 0; }
.capability-option strong { font-size: 13px; }
.capability-option small { color: #625e57; font-size: 12px; line-height: 1.6; }
.policy-call-window { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.policy-call-window summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.policy-days { min-width: 0; margin: 18px 0; padding: 0; border: 0; }
.policy-days legend { margin-bottom: 8px; color: #4e4941; font-size: 12px; font-weight: 700; }
.policy-days label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 10px 4px 0; color: #4e4941; font-size: 12px; }
.policy-days input { accent-color: #b94310; }
.policy-time-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.agent-policy-modal .field-group small { color: #625e57; font-size: 12px; line-height: 1.6; }
.approval-detail-heading { display: grid; gap: 10px; }
.approval-detail-heading strong { font-size: 14px; }
.approval-detail-heading p { margin: 5px 0 0; color: #625e57; font-size: 12px; }
.approval-detail-heading .state-chip { justify-self: start; white-space: normal; }
.approval-expiry { color: #625e57; font-size: 12px; }
.action-parameters-title { margin: 24px 0 10px; font-size: 15px; }
.action-parameters { min-width: 0; margin: 0; }
.action-parameters > div { min-width: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.action-parameters dt { margin-bottom: 5px; color: #575148; font-size: 12px; font-weight: 700; }
.action-parameters dd { min-width: 0; margin: 0; color: var(--ink); overflow-wrap: anywhere; font-size: 13px; }
.action-parameter-value { white-space: pre-wrap; }
.action-parameter-list { margin: 4px 0; padding-left: 19px; }
.action-parameter-list > li + li { margin-top: 7px; }
.work-item-side .state-chip { max-width: 200px; white-space: normal; }
.flow-context { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.flow-context .field-group { flex: 1 1 220px; margin: 0; }
.flow-context .button { min-height: 42px; font-size: 12px; }
.flow-tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid #d9d5cf; }
.flow-tabs [role="tab"] { min-height: 43px; margin-bottom: -1px; padding: 8px 22px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #625e57; cursor: pointer; font-size: 14px; font-weight: 700; }
.flow-tabs [aria-selected="true"] { border-color: #b94310; color: #92370e; }
.flow-email-grid, .flow-calendar-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 20px; align-items: start; }
.flow-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.flow-panel h2 { margin: 0 0 10px; font-size: 17px; letter-spacing: -.025em; }
.flow-panel-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.flow-panel-heading h2 { margin: 0; }
.flow-panel .small-action { min-height: 36px; font-size: 12px; }
.flow-panel .field-group label, .flow-context .field-group label { font-size: 12px; }
.flow-panel .field-group small { color: #625e57; font-size: 12px; }
.flow-panel .field-group textarea { min-height: 100px; }
.flow-panel .field-group input, .flow-panel .field-group select, .flow-context select { min-width: 0; width: 100%; font-size: 13px; }
.flow-muted, .flow-empty { margin: 12px 0; color: #625e57; font-size: 13px; line-height: 1.65; }
.flow-notice, .flow-outcome { margin: 14px 0 20px; padding: 14px 16px; border-radius: 10px; background: #f5f1e7; color: #5c4b35; font-size: 13px; line-height: 1.65; }
.flow-outcome { background: #eef3e9; color: #394d35; }
.flow-outcome p { margin: 7px 0; }
.flow-outcome .text-link { margin-top: 6px; color: inherit; }
.flow-outcome .text-link, .flow-history-list .text-link { font-size: 13px; }
.flow-error:not([hidden]) { display: block; margin: 14px 0; padding: 12px 14px; border-radius: 9px; background: #fff0ec; color: #8d352d; font-size: 13px; }
.flow-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.flow-form-actions .button { min-height: 42px; font-size: 12px; }
.flow-form-submit { margin-top: 18px; min-height: 42px; font-size: 12px; }
.flow-optional, .flow-busy { margin-top: 18px; color: #625e57; font-size: 12px; }
.flow-optional summary, .flow-busy summary { cursor: pointer; font-size: 13px; }
.flow-message { border-top: 1px solid var(--line); }
.flow-message:first-child { border-top: 0; }
.flow-message > button { display: block; width: 100%; padding: 14px 0; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.flow-message > button:hover { background: #f8f7f4; }
.flow-message-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.flow-message-top strong { font-size: 14px; overflow-wrap: anywhere; }
.flow-message-from, .flow-message-snippet { display: block; margin-top: 6px; color: #625e57; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.flow-category { padding: 2px 6px; border-radius: 6px; background: #f0ede6; color: #62503a; font-size: 11px; }
.flow-more { margin-top: 14px; }
.flow-drafts, .flow-history { margin-top: 20px; }
.flow-draft-row { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.flow-draft-open { display: grid; min-width: 0; flex: 1; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.flow-draft-open strong { overflow-wrap: anywhere; font-size: 13px; }
.flow-draft-open small { color: #625e57; overflow-wrap: anywhere; font-size: 12px; }
.flow-message-details { margin: 0 0 20px; }
.flow-message-details > div { display: grid; grid-template-columns: minmax(80px,1fr) minmax(0,4fr); gap: 10px; margin: 9px 0; }
.flow-message-details dt { color: #625e57; font-size: 12px; font-weight: 700; }
.flow-message-details dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.flow-plain-message { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f7; color: #2e2a24; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 13px; line-height: 1.7; }
.flow-preserve-lines { white-space: pre-wrap; }
.workflow-modal { display: flex; flex-direction: column; }
.workflow-modal .modal-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
.workflow-modal .modal-header, .workflow-modal .modal-footer { flex-shrink: 0; }
.workflow-modal .modal-footer button { min-height: 40px; font-size: 12px; }
.flow-two-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.flow-slots { min-width: 0; max-height: 340px; overflow-y: auto; margin: 18px 0; padding: 0; border: 0; }
.flow-slots legend { margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.flow-slots label { display: flex; align-items: flex-start; gap: 10px; padding: 12px 8px; border-top: 1px solid var(--line); cursor: pointer; }
.flow-slots input { margin-top: 4px; accent-color: #b94310; }
.flow-slots span { font-size: 13px; }
.flow-slots small { display: block; margin-top: 4px; color: #625e57; font-size: 12px; }
.flow-selected-time { display: grid; gap: 5px; padding: 13px; border-radius: 10px; background: #eef3e9; color: #394d35; font-size: 13px; }
.flow-selected-time small { font-size: 12px; }
.flow-history-list article { display: grid; gap: 5px; padding: 15px 0; border-top: 1px solid var(--line); }
.flow-history-list strong { overflow-wrap: anywhere; font-size: 13px; }
.flow-history-list span, .flow-history-list p { margin: 0; color: #625e57; font-size: 12px; }
@media (min-width: 641px) and (max-width: 1100px) {
  .sidebar { flex-wrap: wrap; }
  .primary-nav { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .primary-nav { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .primary-nav .nav-item > span:nth-child(2) { max-width: 100%; white-space: normal; line-height: 1.2; text-align: center; }
  .auth-page { padding: 20px 14px; }
  .auth-panel { padding: 26px 22px; }
  .auth-panel h1 { font-size: 25px; }
  .account-access { max-width: 110px; min-height: 33px; padding: 0 9px; font-size: 11px; }
  .topbar-actions .help-button { display: none; }
  .team-member { flex-wrap: wrap; }
  .member-actions { flex: 0 0 100%; padding-left: 39px; }
  .connection-card { flex-wrap: wrap; }
  .connection-card .connection-copy { flex-basis: calc(100% - 60px); }
  .connection-card .connection-state { margin-left: 55px; }
  .connection-card .button { min-height: 38px; font-size: 11px; }
  .integration-modal .modal-footer-right { flex: 1 1 100%; }
  .integration-modal .modal-footer-right .button { flex: 1; }
  .policy-time-fields { grid-template-columns: 1fr; gap: 0; }
  .flow-context { padding: 14px; gap: 12px; }
  .flow-context .field-group { flex-basis: 100%; }
  .flow-context .button { width: 100%; }
  .flow-email-grid, .flow-calendar-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .flow-panel { padding: 16px; }
  .flow-two-fields { grid-template-columns: minmax(0,1fr); gap: 0; }
  .flow-form-actions .button { flex: 1 1 100%; }
  .flow-message-details > div { grid-template-columns: minmax(0,1fr); gap: 3px; }
}
.agent-identity-actions { display:flex; gap:8px; flex-wrap:wrap; margin:16px 0; }
