:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-elevated: rgba(255, 255, 255, 0.78);
  --bg-solid: #ffffff;
  --ink: #1d1d1f;
  --muted: rgba(29, 29, 31, 0.62);
  --faint: rgba(29, 29, 31, 0.42);
  --line: rgba(29, 29, 31, 0.09);
  --line-strong: rgba(29, 29, 31, 0.16);
  --blue: #0071e3;
  --blue-2: #2997ff;
  --green: #2fd158;
  --amber: #ff9f0a;
  --red: #ff3b30;
  --sidebar: rgba(250, 250, 252, 0.82);
  --glass: saturate(180%) blur(26px);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.08);
  --soft-shadow: 0 8px 30px rgba(0, 0, 0, 0.055);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 6%, rgba(0, 113, 227, 0.16), transparent 24rem),
    radial-gradient(circle at 10% 20%, rgba(47, 209, 88, 0.10), transparent 22rem),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 42%, #eeeeef 100%);
  letter-spacing: -0.374px;
}

a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

button, .button {
  border: 0;
  border-radius: 980px;
  padding: 0.72rem 1rem;
  background: var(--blue);
  color: white;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.22);
}
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0, 113, 227, 0.28); }
button.secondary, .button.secondary { background: rgba(255,255,255,.76); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
button.small { min-height: 36px; padding: .5rem .75rem; font-size: .84rem; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.eyebrow {
  margin: 0 0 .46rem;
  color: var(--faint);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.muted, .section-heading p, .panel p { color: var(--muted); line-height: 1.55; }

/* Auth gate */
.login-gate {
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 3rem);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 8% 12%, rgba(125, 211, 252, .24), transparent 22rem),
    radial-gradient(circle at 90% 85%, rgba(196, 181, 253, .22), transparent 24rem),
    #f5f7fb;
}
.auth-shell {
  width: min(1120px, 100%);
  height: min(720px, calc(100vh - 4rem));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, .95fr) minmax(400px, 1.05fr);
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, .10);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(15, 23, 42, .14);
}
.auth-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 4.5rem);
  color: #f8fafc;
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #172554 48%, #1d4ed8 100%);
}
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(1px); }
.auth-hero::before { width: 28rem; height: 28rem; right: -14rem; bottom: -13rem; background: rgba(56, 189, 248, .34); }
.auth-hero::after { width: 13rem; height: 13rem; left: -5rem; top: 25%; background: rgba(167, 139, 250, .22); }
.auth-brand { display: inline-flex; align-items: center; gap: .7rem; color: inherit; font-size: 1.08rem; letter-spacing: -.02em; }
.auth-brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: #172554; font-weight: 800; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
.auth-hero-copy { max-width: 31rem; margin: auto 0 2rem; }
.auth-kicker { margin: 0 0 1rem; color: #93c5fd; font-size: .74rem; font-weight: 800; letter-spacing: .14em; }
.auth-hero h1 { margin: 0; max-width: 9ch; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.065em; }
.auth-hero-copy > p:last-child { margin: 1.25rem 0 0; max-width: 26rem; color: rgba(248, 250, 252, .78); font-size: 1.03rem; line-height: 1.65; }
.auth-benefits { display: grid; gap: .9rem; padding: 0; margin: 0; list-style: none; color: rgba(248, 250, 252, .91); font-size: .93rem; }
.auth-benefits li { display: flex; align-items: center; gap: .7rem; }
.auth-benefits span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); color: #bfdbfe; font-size: .78rem; font-weight: 800; }
.auth-hero-foot { margin: 2rem 0 0; color: rgba(248, 250, 252, .55); font-size: .78rem; }
.login-card { display: flex; flex-direction: column; justify-content: center; min-height: 0; width: 100%; padding: clamp(2rem, 6vw, 5.5rem); overflow: hidden; background: #fff; }
.login-card:has(.signup-form:not([hidden])) { justify-content: flex-start; padding-top: 2rem; padding-bottom: 1.5rem; }
.login-card:has(.signup-form:not([hidden])) .auth-back-link { display: none; }
.auth-card-heading { max-width: 32rem; }
.auth-card-heading .eyebrow { color: #2563eb; font-size: .68rem; letter-spacing: .13em; }
.auth-card-heading h2 { margin: 0; color: #0f172a; font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.05; letter-spacing: -.055em; }
.auth-card-heading p:last-child { margin: .85rem 0 0; max-width: 28rem; color: #64748b; line-height: 1.55; }
.login-form { max-width: 32rem; display: grid; gap: 1rem; margin: 1.5rem 0 1.1rem; }
.login-form label { display: grid; gap: .45rem; color: #334155; font-size: .86rem; font-weight: 650; }
.login-form input { width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid #cbd5e1; border-radius: 12px; outline: 0; background: #fff; color: #0f172a; font: inherit; box-shadow: 0 1px 2px rgba(15,23,42,.03); transition: border-color .16s ease, box-shadow .16s ease; }
.login-form input::placeholder { color: #94a3b8; }
.login-form input:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.login-form > button { min-height: 48px; margin-top: .15rem; border-radius: 12px; background: #2563eb; box-shadow: 0 10px 24px rgba(37, 99, 235, .20); }
.auth-mode-switch { max-width: 32rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; margin-top: 1.75rem; padding: .25rem; border-radius: 12px; background: #f1f5f9; }
.auth-mode-switch button { width: 100%; min-height: 40px; border: 0; border-radius: 9px; color: #64748b; background: transparent; box-shadow: none; font-size: .88rem; }
.auth-mode-switch button:hover { transform: none; box-shadow: none; background: rgba(255,255,255,.5); }
.auth-mode-switch button.active { color: #0f172a; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.auth-form-note { margin: 0; color: #64748b; font-size: .88rem; line-height: 1.5; }
.auth-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.auth-span-2 { grid-column: span 2; }
.signup-form { flex: 1 1 auto; min-height: 0; max-height: none; margin: 1rem 0 0; padding-right: .75rem; overflow-y: auto; }
.auth-back-link { align-self: flex-start; color: #475569; font-size: .86rem; font-weight: 650; }
.auth-back-link:hover { color: #2563eb; }
@media (max-width: 820px) {
  .login-gate { padding: 0; place-items: stretch; }
  .auth-shell { height: auto; min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .auth-hero { min-height: 285px; padding: 1.75rem; }
  .auth-hero-copy { margin: auto 0 0; }
  .auth-hero h1 { font-size: clamp(2.3rem, 10vw, 3.4rem); }
  .auth-benefits, .auth-hero-foot { display: none; }
  .login-card { justify-content: flex-start; padding: 2rem 1.5rem 2.5rem; }
  .signup-form { max-height: none; overflow: visible; padding-right: 0; }
}
@media (max-width: 500px) {
  .auth-shell, .auth-hero, .login-card, .auth-card-heading, .login-form, .auth-mode-switch { min-width: 0; max-width: 100%; }
  .auth-hero-copy > p:last-child, .auth-card-heading p:last-child { overflow-wrap: anywhere; }
  .auth-mode-switch { overflow: hidden; }
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-span-2 { grid-column: auto; }
}

/* App frame: fixed left sidebar + large canvas */
.app-topbar {
  position: fixed;
  inset: 16px auto 16px 16px;
  width: 280px;
  z-index: 20;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: 1rem;
  border-radius: 28px;
  background: var(--sidebar);
  border: 1px solid rgba(255,255,255,.78);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
}
.brand-stack { display: grid; gap: .75rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.brand-lockup {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .35rem;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  background: linear-gradient(180deg, #1d1d1f, #3a3a3c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 16px 40px rgba(0,0,0,.14);
}
.brand-lockup strong { display: block; font-weight: 650; letter-spacing: -.02em; }
.brand-lockup small { display: block; margin-top: .1rem; color: var(--muted); font-size: .76rem; }
.business-switcher { display: grid; gap: .36rem; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.business-switcher select { width: 100%; min-height: 40px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.86); color: var(--ink); padding: .58rem .68rem; font: inherit; font-weight: 650; text-transform: none; letter-spacing: -.02em; }
.app-nav { display: grid; gap: .38rem; align-content: start; overflow: auto; padding-right: .12rem; padding-bottom: .75rem; min-height: 0; }
.mobile-nav-toggle { display: none; }
.nav-tab {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: rgba(29,29,31,.74);
  border: 1px solid transparent;
  box-shadow: none;
  min-height: 42px;
  padding: .7rem .82rem;
  font-size: .95rem;
}
.nav-tab:hover { background: rgba(0,0,0,.035); box-shadow: none; transform: none; color: var(--ink); }
.nav-tab.active {
  background: rgba(255,255,255,.94);
  color: var(--ink);
  border-color: rgba(0,0,0,.05);
  box-shadow: 0 8px 26px rgba(0,0,0,.065);
}
#logoutButton { align-self: end; width: 100%; justify-content: center; }
.app-main {
  margin-left: 312px;
  min-height: 100vh;
  padding: 24px 24px 56px 0;
}
.app-view { display: none; }
.calendar-view-active .app-main, .app-main:has(#view-calendar.active) { height: 100vh; overflow: hidden; padding-top: 12px; padding-bottom: 12px; }
.chat-view-active .app-main, .app-main:has(#view-employee.active) { height: 100vh; overflow: hidden; padding-top: 16px; padding-bottom: 16px; }
.files-view-active .app-main, .app-main:has(#view-knowledge.active) { padding-top: 16px; }
#view-knowledge.app-view.active { min-height: calc(100vh - 32px); display: flex; }
#view-knowledge.app-view.active .finder-shell { flex: 1 1 auto; min-height: 0; }
.app-view.active { display: block; }
.app-view.active > * + * { margin-top: 1.25rem; }
.panel + .panel { margin-top: 1.25rem; }
/* Dashboard surfaces */
.panel, .dashboard-header, .kpi-strip article, .task-card, .result-grid article, .plan-card, .file-row {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,.78);
  backdrop-filter: var(--glass);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
}
.dashboard-header {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .6fr);
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  min-height: 340px;
  align-items: stretch;
}
.dashboard-header h1, .section-heading h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(2.25rem, 4.45vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -.075em;
  font-weight: 650;
}
.dashboard-header .muted { max-width: 780px; font-size: 1.08rem; }
.account-card {
  display: grid;
  align-content: start;
  gap: .72rem;
  padding: 1.1rem;
  color: white;
  background: linear-gradient(180deg, #2b2b2f, #111113);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 24px 70px rgba(0,0,0,.18);
}
.account-card strong { font-size: 4.6rem; line-height: .92; letter-spacing: -.08em; }
.account-card small { color: rgba(255,255,255,.68); }
.account-card .status-badge { background: rgba(255,255,255,.13); color: white; border-color: rgba(255,255,255,.16); width: max-content; }
.compact-actions { display: grid; gap: .55rem; margin-top: .5rem; }

.kpi-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .85rem; margin-top: .85rem; }
.kpi-strip article { padding: 1rem; min-height: 136px; }
.kpi-strip span, .task-card span, .activity-feed span, .plan-card span, .plan-card small, .file-row small { display: block; color: var(--muted); line-height: 1.45; }
.kpi-strip strong { display: block; margin: .35rem 0; font-size: 1.28rem; line-height: 1.08; letter-spacing: -.045em; }
.story-panel { margin-top: .85rem; }
.insight-story-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .85rem; margin-top: 1rem; }
.mini-chart-card { padding: 1rem; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.7); display: grid; gap: .65rem; min-height: 190px; }
.mini-chart-card h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.035em; }
.mini-chart-card small { color: var(--muted); line-height: 1.45; }
.bar-chart { min-height: 106px; display: flex; align-items: end; gap: .5rem; padding: .6rem; border-radius: 18px; background: linear-gradient(180deg, rgba(0,113,227,.08), rgba(0,113,227,.02)); }
.bar-chart span { flex: 1; min-height: 18px; border-radius: 999px 999px 8px 8px; background: linear-gradient(180deg, var(--blue-2), var(--blue)); box-shadow: 0 10px 22px rgba(0,113,227,.18); }
.donut-chart { width: 118px; height: 118px; border-radius: 999px; margin: .2rem auto; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--p) * 1%), rgba(0,113,227,.10) 0); position: relative; }
.donut-chart::after { content: ""; position: absolute; inset: 16px; border-radius: inherit; background: rgba(255,255,255,.92); }
.donut-chart strong { position: relative; z-index: 1; color: var(--ink); font-size: 1.35rem; }
.stacked-bars { display: grid; gap: .5rem; align-content: center; min-height: 118px; }
.stacked-bars span { display: block; min-width: 78px; padding: .48rem .62rem; border-radius: 999px; color: white; background: linear-gradient(90deg, var(--blue), var(--blue-2)); font-size: .78rem; font-weight: 700; }
.dashboard-grid, .employee-grid, .settings-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px,.85fr); gap: 1rem; margin-top: 1rem; align-items: start; }
.dashboard-activity-only { grid-template-columns: minmax(0, 1fr); }
.dashboard-activity-panel { min-height: 0; }
.dashboard-activity-panel .activity-feed { grid-template-columns: repeat(3, minmax(0,1fr)); }
.dashboard-activity-panel .activity-feed div { min-height: 118px; display: grid; align-content: center; }
.panel { padding: 1.15rem; }
.panel-heading { margin-bottom: 1rem; }
.panel-heading h2, .panel h2 { margin: .12rem 0; font-size: 1.28rem; line-height: 1.12; letter-spacing: -.04em; font-weight: 650; }
.panel-heading.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.status-badge { display: inline-flex; align-items: center; border-radius: 980px; padding: .42rem .72rem; background: rgba(0,113,227,.10); border: 1px solid rgba(0,113,227,.12); color: #0057b8; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.task-list { margin: 0; padding-left: 1.25rem; display: grid; gap: .75rem; }
.task-list li { color: var(--muted); line-height: 1.55; }
.task-list strong { display: block; color: var(--ink); }
.activity-feed { display: grid; gap: .6rem; }
.activity-feed div { background: rgba(255,255,255,.72); border-radius: 18px; padding: .78rem; border: 1px solid var(--line); }

.section-heading { padding: .8rem 0 1rem; }
.tasks-heading { display: block; }
.task-board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .72rem; margin: .2rem 0 1rem; border-radius: 24px; box-shadow: var(--soft-shadow); }
.task-board-toolbar #newTaskButton { min-width: 132px; }
.task-view-toggle { display: inline-flex; gap: .35rem; padding: .28rem; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0,0,0,.045); }
.task-display { display: none; }
.task-display.active { display: block; }
.section-heading h1 { font-size: clamp(2.2rem, 4vw, 4.2rem); }
.business-context-pill { display: inline-flex; align-items: center; gap: .3rem; margin-top: .65rem; padding: .42rem .65rem; border-radius: 999px; background: rgba(0,113,227,.08); border: 1px solid rgba(0,113,227,.11); color: #0057b8; font-size: .82rem; font-weight: 650; }
.kanban-grid, .pipeline-grid, .insight-grid, .integration-grid, .super-admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.insight-grid, .integration-grid, .super-admin-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.super-admin-grid { margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
.form-grid label:nth-child(3):has(textarea), .form-grid label:nth-child(4):has(textarea) { grid-column: 1 / -1; }
.integration-checklist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.integration-checklist label { padding: .72rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.7); font-weight: 650; color: var(--ink); }
.settings-policy-grid { margin-top: 1rem; }
.settings-route-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
.settings-subnav-panel { position: sticky; top: 24px; min-height: calc(100vh - 48px); padding: 1rem; border-radius: 28px; background: rgba(250,250,252,.82); border: 1px solid rgba(255,255,255,.78); backdrop-filter: var(--glass); box-shadow: var(--soft-shadow); }
.settings-subnav { display: grid; gap: .38rem; margin-top: .8rem; }
.settings-tab, .growth-tool-tab { width: 100%; justify-content: flex-start; background: transparent; color: rgba(29,29,31,.72); border: 1px solid transparent; box-shadow: none; min-height: 42px; padding: .7rem .82rem; }
.settings-tab:hover, .growth-tool-tab:hover { background: rgba(0,0,0,.035); color: var(--ink); box-shadow: none; transform: none; }
.settings-tab.active, .growth-tool-tab.active { background: rgba(255,255,255,.94); color: var(--ink); border-color: rgba(0,0,0,.05); box-shadow: 0 8px 26px rgba(0,0,0,.065); }
.settings-content { min-width: 0; }
.settings-pane { display: none; }
.settings-pane.active { display: block; }
.agent-roster-rows { display: grid; gap: .75rem; margin: 1rem 0; }
.agent-roster-row { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(14rem, 2fr) auto auto; gap: .75rem; align-items: end; padding: .8rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--panel-soft, rgba(255,255,255,.03)); }
.agent-roster-row label { display: grid; gap: .35rem; }
.agent-roster-row .checkbox-label { display: flex; align-items: center; gap: .45rem; min-height: 2.6rem; }
.approval-preferences-form { display: grid; gap: .8rem; }
.approval-preferences-form > label { display: flex; align-items: flex-start; gap: .65rem; }
.section-heading.compact h1 { font-size: clamp(1.85rem, 3vw, 3.15rem); }
.business-info-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.business-profile-card { padding: clamp(1.15rem, 2.4vw, 1.65rem); }
.business-profile-card .panel-heading { margin-bottom: 1rem; }
.business-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.business-form-grid .wide-field { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-start; align-items: center; }
.business-side-card { min-height: 100%; }
.business-side-card .profile-list { margin-top: .9rem; }
.compact-policy-grid { margin-top: 1rem; }
.dashboard-growth-tools { margin-bottom: 1rem; }
.dashboard-growth-tools .workflow-actions { margin-top: 1rem; }
.growth-tool-pane { display: none; }
.growth-tool-pane.active { display: block; }
.growth-tools-shell .workspace-panel { min-height: 0; }
.growth-result-card { padding: 1rem; min-height: 260px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 18px; box-shadow: none; }
.growth-result-card h3 { margin: 0 0 .65rem; letter-spacing: -.03em; }
.growth-tools-content .workflow-actions { margin-top: 1rem; margin-bottom: 1rem; }
.audit-disclosure { margin: 0 0 1rem; max-width: 72ch; line-height: 1.45; }

.resource-library-panel .workflow-actions { margin-top: 1rem; margin-bottom: 1rem; }
.resource-card-list { display: grid; gap: .9rem; margin-bottom: 1rem; }
.resource-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; align-items: end; padding: 1rem; border-radius: 18px; background: rgba(255,255,255,.78); border: 1px solid var(--line); box-shadow: none; }
.resource-card.active { border-color: rgba(0,113,227,.35); box-shadow: 0 0 0 4px rgba(0,113,227,.09); }
.resource-card.unavailable { border-color: rgba(176, 92, 0, .48); background: rgba(255, 248, 235, .92); }
.resource-card h3 { margin: 0 0 .3rem; letter-spacing: -.035em; }
.resource-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.resource-card .audit-evidence-unavailable { margin: .45rem 0; color: #8a4600; }
.resource-card .audit-evidence-source { margin: .45rem 0; color: var(--ink); }
.resource-card small { display: block; margin-top: .36rem; color: var(--faint); line-height: 1.35; }
.resource-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.strategy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; align-items: start; }
.strategy-section { display: grid; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.52); }
.strategy-section .panel-heading h3 { margin: 0; }
.strategy-section .panel-heading p { margin: .25rem 0 0; font-size: .84rem; }
.strategy-form { display: grid; gap: .65rem; }
.strategy-form label, .strategy-form fieldset { display: grid; gap: .32rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.strategy-form input, .strategy-form textarea { width: 100%; min-height: 40px; padding: .62rem .72rem; color: var(--ink); font: inherit; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.86); }
.strategy-form textarea { resize: vertical; }
.strategy-form fieldset { margin: 0; padding: .65rem; border: 1px solid var(--line); border-radius: 12px; }
.strategy-form legend { padding: 0 .24rem; }
.strategy-checkboxes { display: grid; gap: .38rem; max-height: 8rem; overflow: auto; }
.strategy-checkboxes label, .strategy-toggle { display: flex; align-items: center; gap: .42rem; font-weight: 600; }
.strategy-checkboxes input, .strategy-toggle input { width: auto; min-height: auto; }
.strategy-list { display: grid; gap: .55rem; }
.strategy-item { display: flex; justify-content: space-between; align-items: start; gap: .5rem; padding: .7rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.76); }
.strategy-item > div { display: grid; gap: .28rem; min-width: 0; }
.strategy-item small { color: var(--muted); overflow-wrap: anywhere; }
.strategy-item > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.strategy-source, .ai-recommendation-badge { width: max-content; border-radius: 999px; padding: .22rem .45rem; color: #0057b8; background: rgba(0,113,227,.09); font-size: .7rem; font-weight: 750; text-transform: capitalize; }
.strategy-source.ai, .ai-recommendation-badge { color: #6d28d9; background: rgba(124,58,237,.11); }
.ai-recommendation-card { display: grid; gap: .5rem; padding: .8rem; border: 1px solid rgba(124,58,237,.22); border-radius: 16px; background: rgba(124,58,237,.05); }
.ai-recommendation-card p { margin: 0; color: var(--muted); font-size: .84rem; }
.strategy-error { color: #9f1239; background: rgba(255,59,48,.10); border-color: rgba(255,59,48,.22); }
button.danger { color: #ff3b30; border-color: rgba(255,59,48,.22); background: rgba(255,255,255,.82); }
button.danger:hover { border-color: rgba(255,59,48,.38); background: rgba(255,59,48,.06); }
.step-num { width: 36px; height: 36px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--blue); color: white; font-weight: 700; box-shadow: 0 10px 24px rgba(0,113,227,.22); }
.seat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.seat-grid div { padding: .85rem; border-radius: 18px; background: rgba(255,255,255,.72); border: 1px solid var(--line); }
.seat-grid span { display: block; color: var(--muted); margin-top: .18rem; }
.integration-card { display: grid; grid-template-rows: auto auto minmax(4.8rem, 1fr) auto auto; gap: .75rem; min-height: 330px; align-content: start; }
.integration-card button { width: max-content; }
.integration-provider-heading { display: flex; align-items: center; gap: .65rem; }
.integration-provider-logo { width: 2rem; height: 2rem; object-fit: contain; flex: 0 0 auto; }
.connection-map { margin-top: 1rem; }
.connection-rows { display: grid; gap: .65rem; }
.connection-rows div { padding: .85rem; border-radius: 18px; background: rgba(255,255,255,.72); border: 1px solid var(--line); }
.connection-rows span { display: block; color: var(--muted); line-height: 1.45; margin-top: .18rem; }
.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chip-list li { border-radius: 999px; padding: .38rem .58rem; background: rgba(0,113,227,.08); color: #0057b8; border: 1px solid rgba(0,113,227,.10); font-size: .78rem; font-weight: 650; }
.chip-input { display: flex; flex-wrap: wrap; align-items: center; gap: .38rem; min-height: 44px; padding: .38rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.8); }
.chip-input:focus-within { border-color: rgba(0,113,227,.55); box-shadow: 0 0 0 3px rgba(0,113,227,.10); }
.chip-values { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip-token { display: inline-flex; align-items: center; gap: .28rem; border-radius: 999px; padding: .27rem .35rem .27rem .58rem; background: rgba(0,113,227,.10); color: #0057b8; font-size: .78rem; font-weight: 650; }
.chip-token button { min-width: 18px; min-height: 18px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: inherit; box-shadow: none; font-size: 1rem; line-height: 1; }
.chip-token button:hover { background: rgba(0,113,227,.15); transform: none; }
.chip-input > input[type="text"] { flex: 1 1 150px; width: auto; min-width: 150px; min-height: 30px; padding: .25rem; border: 0; outline: 0; background: transparent; box-shadow: none; }
.lane { display: grid; gap: .7rem; min-height: 360px; align-content: start; }
.tasks-kanban-grid .lane { min-height: 320px; }
.approvals-lane { border-color: rgba(255,159,10,.22); }
.task-card { padding: .9rem; display: grid; gap: .24rem; box-shadow: none; }
.approval-card { border-color: rgba(255,159,10,.35); background: rgba(255,248,235,.86); }
.task-approval-state { color: #9a5a00 !important; font-weight: 700; }
.task-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.task-actions button { min-height: 32px; padding: .38rem .6rem; font-size: .78rem; }
.chat-proposal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.chat-proposal-actions .task-actions { margin-top: 0; }
.task-approval-error { color: #9f1239; border-color: rgba(255,59,48,.3); background: rgba(255,59,48,.08); }
.muted-card { opacity: .78; }
.task-list-view { display: grid; gap: .7rem; }
.task-list-row { display: grid; grid-template-columns: 126px minmax(180px, .75fr) minmax(0,1fr); gap: .85rem; align-items: center; padding: .9rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); }
.task-list-row p { margin: 0; color: var(--muted); line-height: 1.45; }
.task-status-pill { width: max-content; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: .36rem .58rem; font-size: .78rem; font-weight: 750; background: rgba(0,113,227,.08); color: #0057b8; border: 1px solid rgba(0,113,227,.12); }
.task-status-pill.active { background: rgba(0,113,227,.12); }
.task-status-pill.done { background: rgba(52,199,89,.13); color: #19743a; border-color: rgba(52,199,89,.18); }
.task-status-pill.approval { background: rgba(255,159,10,.15); color: #9a5a00; border-color: rgba(255,159,10,.24); }
.task-status-pill.todo { background: rgba(142,142,147,.12); color: #555; border-color: rgba(142,142,147,.18); }

/* Forms, workspaces, results */

.content-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 1rem; align-items: start; }
.content-layout-single { grid-template-columns: minmax(0,1fr); }
.content-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .85rem; }
.content-card-list { display: grid; gap: .85rem; }
.content-card { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 1rem; padding: .85rem; background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--soft-shadow); }
.content-image { width: 100%; height: 168px; object-fit: cover; border-radius: 18px; background: rgba(0,0,0,.06); }
.content-card-main { display: grid; gap: .62rem; min-width: 0; }
.content-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.content-card-header h2 { margin: 0; font-size: 1.25rem; line-height: 1.12; letter-spacing: -.04em; }
.content-card-main p { margin: 0; }
.content-body { border: 1px solid var(--line); border-radius: 16px; padding: .72rem .85rem; background: rgba(255,255,255,.62); }
.content-body summary { cursor: pointer; font-weight: 650; color: var(--ink); }
.content-body p { margin-top: .58rem; }
.content-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.content-meta span { border-radius: 999px; padding: .38rem .58rem; background: rgba(0,113,227,.08); color: #0057b8; font-size: .78rem; font-weight: 650; }
.content-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; padding: .85rem; border-radius: 18px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.content-edit-form label:nth-child(1), .content-edit-form label:nth-child(2), .content-edit-form label:nth-child(3), .content-edit-form label:nth-child(4), .content-edit-form fieldset, .content-edit-form .compact-actions { grid-column: 1 / -1; }
.content-edit-form textarea { resize: vertical; min-height: 90px; }
.content-edit-form fieldset { border: 1px solid var(--line); border-radius: 16px; padding: .75rem; }
.content-edit-form legend { color: var(--muted); font-weight: 700; font-size: .84rem; }
.channel-checks { display: flex; flex-wrap: wrap; gap: .5rem .8rem; }
.channel-checks label { display: inline-flex; grid-auto-flow: column; align-items: center; gap: .35rem; }
.channel-checks input { width: auto; min-height: auto; }
#view-calendar.app-view.active { height: calc(100vh - 24px); min-height: 0; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr); }
#view-calendar .section-heading { display: none; }
#view-calendar .section-heading h1 { font-size: clamp(1.55rem, 2vw, 2.2rem); }
#view-calendar .section-heading p:last-child { display: none; }
.calendar-board { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: .58rem; min-height: 0; overflow: hidden; }
.calendar-heading { align-items: center; margin-bottom: .28rem; }
.calendar-heading .eyebrow { margin-bottom: .16rem; }
.calendar-heading h2 { font-size: 1.05rem; }
.calendar-controls { display: flex; align-items: center; gap: .32rem; flex-wrap: wrap; justify-content: flex-end; }
.calendar-controls button.small { min-height: 31px; padding: .35rem .55rem; font-size: .78rem; }
.calendar-view-toggle { display: inline-flex; gap: .22rem; padding: .16rem; border-radius: 999px; background: rgba(255,255,255,.68); border: 1px solid var(--line); }
.calendar-view-toggle button.active { background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgba(0,113,227,.22); }
.content-calendar { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .24rem; min-height: 0; }
.calendar-weekdays, .calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: .24rem; }
.calendar-month-grid { min-height: 0; grid-template-rows: repeat(var(--calendar-row-count, 5), minmax(54px, 1fr)); grid-auto-rows: minmax(54px, 1fr); }
.calendar-weekdays span { color: var(--faint); font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; padding: 0 .2rem; }
.calendar-day { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); align-content: start; gap: .14rem; padding: .32rem; border-radius: 14px; background: rgba(255,255,255,.68); border: 1px solid var(--line); overflow: hidden; }
.week-view .calendar-day { min-height: calc(100vh - 315px); max-height: none; }
.calendar-day.outside { opacity: .38; }
.calendar-day-number { color: var(--muted); font-size: .95rem; font-weight: 700; }
.calendar-event { display: grid; gap: .1rem; padding: .36rem .42rem; border-radius: 12px; background: rgba(0,113,227,.08); border: 1px solid rgba(0,113,227,.12); color: var(--ink); min-width: 0; }
.calendar-event strong { font-size: .76rem; line-height: 1.12; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event time { color: var(--blue); font-weight: 700; font-size: .74rem; }
.calendar-event span { color: var(--muted); font-size: .68rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-empty { color: var(--faint); font-size: .8rem; font-style: italic; }
button.danger { color: var(--red); border-color: rgba(255,59,48,.22); }

.login-form label, .profile-form label, .file-toolbar label, .content-edit-form label { display: grid; gap: .32rem; color: rgba(29,29,31,.68); font-weight: 600; font-size: .88rem; }
.login-form input, .login-form select, .profile-form input, .profile-form select, .assistant-form input, .file-toolbar input, .file-toolbar select, .upload-row input, .content-edit-form input, .content-edit-form textarea, .content-edit-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
  padding: .72rem .82rem;
  font: inherit;
  outline: none;
}
.login-form select, .profile-form select { appearance: auto; cursor: pointer; }
.login-form input:focus, .login-form select:focus, .profile-form input:focus, .profile-form select:focus, .assistant-form input:focus, .file-toolbar input:focus, .file-toolbar select:focus, .upload-row input:focus, .content-edit-form input:focus, .content-edit-form textarea:focus, .content-edit-form select:focus { border-color: rgba(0,113,227,.45); box-shadow: 0 0 0 4px rgba(0,113,227,.10); }
.notice { margin-top: .9rem; padding: .75rem .9rem; border-radius: 16px; background: rgba(255,159,10,.12); border: 1px solid rgba(255,159,10,.18); color: #9a5a00; }
.workspace-grid { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 1rem; align-items: start; }
.profile-form, .profile-list, .agent-list, .result-list, .plan-list, .file-manager { display: grid; gap: .9rem; }
.profile-item { text-align: left; justify-content: start; display: block; width: 100%; padding: .78rem; color: var(--ink); background: rgba(255,255,255,.78); border: 1px solid var(--line); box-shadow: none; border-radius: 16px; }
.connected-businesses-panel { padding: clamp(1.2rem, 2.5vw, 1.8rem); }
.connected-business-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.profile-bulk-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; padding: .7rem .8rem; margin: .9rem 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,113,227,.045); }
.profile-select-all { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--ink); }
.profile-select-all input, .profile-checkbox { accent-color: #0071e3; }
.profile-checkbox { width: 1.05rem; height: 1.05rem; margin: .15rem .2rem 0 0; }
.profile-item-selectable { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .7rem; align-items: start; }
.profile-item-selectable.is-selected { border-color: rgba(0,113,227,.58); background: rgba(0,113,227,.065); }
.bulk-delete-list { max-height: 12rem; overflow: auto; margin: .8rem 0 1rem; padding-left: 1.25rem; color: var(--muted); }
.profile-item small { display: block; color: var(--faint); font-size: .78rem; margin-top: .2rem; line-height: 1.35; }
.profile-item span { display: block; color: var(--muted); font-size: .84rem; margin-top: .2rem; }
.profile-item.active { border-color: rgba(0,113,227,.35); box-shadow: 0 0 0 4px rgba(0,113,227,.09); }
.workflow-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: 1rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .85rem; }
.result-grid article { padding: 1rem; min-height: 190px; }
.result-grid h3 { margin: 0 0 .65rem; letter-spacing: -.03em; }
.result-list.empty { color: var(--muted); font-style: italic; }
.result-card { background: rgba(255,255,255,.82); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 16px; padding: .75rem; }
.result-card.high, .result-card.requires { border-left-color: var(--red); }
.result-card.medium { border-left-color: var(--amber); }
.result-card.local { border-left-color: var(--green); }
.result-card small { color: var(--muted); }

#view-employee.app-view.active { height: calc(100vh - 32px); min-height: 0; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr); }
#view-employee.app-view.active > * + * { margin-top: 0; }
.chat-workspace { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: .8rem; align-items: stretch; min-height: 0; height: 100%; min-width: 0; }
.conversation-sidebar { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .75rem; min-height: 0; overflow: hidden; min-width: 0; }
.conversation-sidebar-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.conversation-sidebar-header h2 { margin: .1rem 0 0; font-size: 1.45rem; }
.ghost-button { background: rgba(255,255,255,.72); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.conversation-list { display: grid; gap: .5rem; align-content: start; overflow: auto; padding-right: .2rem; min-height: 0; }
.conversation-item { width: 100%; justify-content: start; text-align: left; padding: .72rem; color: var(--ink); background: rgba(255,255,255,.68); border: 1px solid var(--line); border-radius: 18px; box-shadow: none; }
.conversation-item.active { background: rgba(0,113,227,.1); border-color: rgba(0,113,227,.28); }
.conversation-item span { display: grid; gap: .28rem; min-width: 0; }
.conversation-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item small { color: var(--muted); }
.chat-panel { min-height: 0; min-width: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.chatgpt-panel { padding: 0; overflow: hidden; background: rgba(255,255,255,.78); }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.72); }
.agent-picker { display: grid; gap: .28rem; min-width: min(260px, 100%); flex: 1 1 260px; }
.chat-toolbar label { color: var(--muted); font-weight: 700; font-size: .82rem; }
.chat-toolbar select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.9); color: var(--ink); padding: .64rem .78rem; font: inherit; outline: none; }
.agent-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; flex: 0 1 auto; }
.agent-toolbar-actions button { min-height: 40px; padding: .62rem .82rem; white-space: nowrap; }
.agent-config-summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .58rem 1.1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.48); color: var(--muted); font-size: .86rem; }
.agent-config-summary strong { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-config-summary span { white-space: nowrap; }
.chat-context { padding: .72rem 1.1rem; border-bottom: 1px solid var(--line); background: rgba(245,245,247,.54); overflow: auto; }
.chat-context-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; color: var(--muted); font-size: .8rem; }
.chat-context-heading strong { color: var(--ink); font-size: .88rem; }
.chat-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: .55rem; }
.chat-context-section, .chat-context-unavailable, .chat-context-loading { display: grid; gap: .28rem; padding: .62rem .7rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); color: var(--muted); font-size: .8rem; line-height: 1.4; }
.chat-context-section > strong, .chat-context-unavailable strong { color: var(--ink); }
.chat-context-unavailable { border-color: rgba(255,59,48,.24); background: rgba(255,59,48,.055); }
.chat-context-list { display: grid; gap: .35rem; margin: .15rem 0 0; padding: 0; list-style: none; }
.chat-context-list li { display: grid; gap: .08rem; padding-top: .35rem; border-top: 1px solid rgba(29,29,31,.08); }
.chat-context-list li strong { color: var(--ink); }
.chat-context-section p { margin: .15rem 0 0; }
.chat-history { display: flex; flex-direction: column; gap: .75rem; overflow: auto; max-height: none; padding: 1.1rem; background: linear-gradient(180deg, rgba(245,245,247,.54), rgba(255,255,255,.72)); }
.bubble { max-width: min(760px, 82%); padding: .84rem .96rem; border-radius: 20px; line-height: 1.5; border: 1px solid var(--line); background: rgba(255,255,255,.9); display: grid; gap: .35rem; overflow-wrap: anywhere; }
.bubble small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.bubble span { white-space: pre-wrap; }
.bubble.assistant { align-self: flex-start; }
.bubble.user { align-self: flex-end; background: var(--blue); color: white; border-color: var(--blue); }
.bubble.user small { color: rgba(255,255,255,.72); }
.assistant-form, .upload-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .6rem; margin-top: .8rem; }
.chatgpt-form { margin: 0; padding: 1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.86); grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.chatgpt-form input[name="prompt"] { min-height: 52px; border-radius: 18px; }
.chatgpt-form button { border-radius: 18px; min-height: 52px; }
.chat-upload-button { white-space: nowrap; }
.chat-upload-status { grid-column: 1 / -1; min-height: 1.1rem; color: var(--muted); font-size: .82rem; padding-left: .2rem; }
.chat-attachment { display: inline-flex; align-items: center; width: max-content; max-width: 100%; margin-top: .15rem; padding: .42rem .62rem; border-radius: 999px; background: rgba(0,113,227,.10); color: #0057b8; font-size: .84rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-list article { padding: .9rem; box-shadow: none; }
.agent-list span { color: var(--muted); margin-top: .2rem; }

.plan-list { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 1rem; }
.plan-card { padding: .9rem; }
.user-management-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; }
.user-account-form { align-content: start; padding: 1rem; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.58); }
.user-account-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem; }
.compact-heading { margin-bottom: .8rem; }
.billing-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: clamp(1.2rem, 2.5vw, 1.8rem); }
.billing-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -.065em; }
.billing-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 1rem; align-items: start; }
.billing-summary-stack { display: grid; gap: 1rem; }
.plan-list-polished { grid-template-columns: 1fr; }
.plan-list-polished .plan-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: 1rem; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.62)); border: 1px solid var(--line); box-shadow: var(--soft-shadow); }
.plan-list-polished .plan-card strong { font-size: 1.05rem; }
.plan-list-polished .plan-card p { margin: .3rem 0; }
.billing-metric-grid { grid-template-columns: 1fr; }
.file-toolbar { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(0,1fr) auto; gap: .7rem; align-items: end; }
.workspace-file-list { display: grid; gap: .55rem; max-height: 520px; overflow: auto; }
.file-row { width: 100%; padding: .76rem; display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: .65rem; align-items: center; color: var(--ink); text-align: left; box-shadow: none; }
button.file-row { grid-template-columns: minmax(0,1fr); }
.file-row span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row a { color: var(--blue); font-weight: 600; }
.image-file-row { background: rgba(238,246,255,.76); border-color: rgba(0,113,227,.14); }
.file-row.up { border-style: dashed; }
.finder-shell { padding: 0; overflow: hidden; border-radius: 26px; }
.finder-titlebar { min-height: 52px; display: grid; place-items: center; padding: 0 1rem; border-bottom: 1px solid var(--line); background: rgba(250,250,252,.92); }
.finder-titlebar strong { font-size: .95rem; letter-spacing: -.02em; }
.finder-layout { display: grid; grid-template-columns: 184px minmax(0,1fr); min-height: 0; height: calc(100vh - 84px); }
.finder-sidebar { padding: 1rem .72rem; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(247,248,251,.92), rgba(238,241,246,.86)); }
.finder-sidebar p { margin: .15rem .5rem .6rem; color: var(--faint); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.finder-location-button { display: block; width: 100%; margin: .15rem 0; padding: .56rem .64rem; border: 0; border-radius: 9px; background: transparent; box-shadow: none; color: var(--muted); font-size: .9rem; font-weight: 620; text-align: left; }
.finder-location-button::before { content: "⌁"; display: inline-block; width: 1.3rem; color: var(--blue); font-weight: 800; }.finder-location-button:hover { transform: none; background: rgba(0,113,227,.07); }.finder-location-button.active { color: var(--ink); background: rgba(0,113,227,.12); }
.finder-content { min-width: 0; padding: 1rem; background: rgba(255,255,255,.58); }
.finder-toolbar { display: flex; align-items: end; gap: .65rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }.finder-location { display: grid; flex: 1; gap: .3rem; color: var(--faint); font-size: .72rem; font-weight: 720; letter-spacing: .06em; text-transform: uppercase; }.finder-location input,.finder-upload-row input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: .62rem .72rem; background: rgba(255,255,255,.92); color: var(--ink); font: inherit; letter-spacing: -.02em; text-transform: none; }.finder-toolbar button,.finder-upload-row button { min-height: 42px; border-radius: 11px; }
.finder-upload-row { display: grid; grid-template-columns: auto minmax(180px,1fr) auto; gap: .6rem; align-items: center; margin: .8rem 0; }.finder-file-picker { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .6rem .78rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-size: .88rem; font-weight: 650; cursor: pointer; }.finder-file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.finder-file-list { max-height: none; gap: .35rem; }.finder-file-list .file-row { min-height: 58px; grid-template-columns: minmax(0,1fr) minmax(90px,.22fr) auto auto; border-radius: 11px; border: 1px solid transparent; background: transparent; }.finder-file-list .file-row:hover { border-color: rgba(0,113,227,.16); background: rgba(0,113,227,.06); }.finder-file-list .file-row span { font-weight: 650; }.finder-file-list .file-row small { color: var(--muted); }.finder-file-list .file-row button { min-height: 34px; padding: .4rem .62rem; border-radius: 9px; font-size: .8rem; }
.check-list { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--muted); line-height: 1.7; }
.modal, .modal-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(245,245,247,.62); backdrop-filter: blur(18px); overflow: auto; }
.modal-card { width: min(760px, 100%); max-height: min(86vh, 860px); overflow: auto; padding: clamp(1.15rem, 3vw, 1.7rem); border-radius: 32px; box-shadow: 0 32px 100px rgba(0,0,0,.18); }
.modal-card .form-actions { gap: .65rem; flex-wrap: wrap; }
.task-modal-card { width: min(980px, calc(100vw - 2rem)); }
.task-modal-form { margin-top: 1rem; }


.integration-card.connected { border-color: rgba(0,113,227,.32); background: rgba(238,246,255,.72); }
#integrationCards { display: block; }
.integration-category-group { display: grid; gap: .85rem; margin-bottom: 1rem; }
.integration-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.integration-card { padding: .85rem; gap: .55rem; }
.integration-card .panel-heading { gap: .45rem; }
.integration-card .eyebrow { font-size: .68rem; }
.integration-card p { font-size: .9rem; }
.integration-card .chip-list { gap: .3rem; }
.integration-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.integration-actions button { width: max-content; }
.integration-meta { display: grid; gap: .45rem; margin: 0; }
.integration-meta div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: .65rem; padding: .45rem .55rem; border: 1px solid rgba(0,113,227,.08); border-radius: 14px; background: rgba(255,255,255,.54); }
.integration-meta dt { color: var(--muted); font-weight: 700; }
.integration-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.calendar-day-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.calendar-add-post { width: 27px; height: 27px; min-height: 27px; border-radius: 999px; padding: 0; justify-content: center; background: rgba(0,113,227,.08); color: var(--blue); border-color: rgba(0,113,227,.16); box-shadow: none; }
.calendar-event { width: 100%; min-height: 0; text-align: left; display: grid; gap: .1rem; margin-top: .02rem; padding: .32rem .44rem; border-radius: 13px; border: 1px solid rgba(0,113,227,.18); background: rgba(0,113,227,.08); color: var(--ink); box-shadow: none; align-self: start; }
.calendar-event span { display: none; }
.calendar-event:hover { transform: none; background: rgba(0,113,227,.13); }
.content-calendar.list-view { display: block; }
.user-roster-controls { display: flex; align-items: end; justify-content: flex-end; gap: .7rem; flex-wrap: wrap; }
.user-roster-controls label { display: grid; gap: .32rem; color: rgba(29,29,31,.68); font-weight: 600; font-size: .88rem; min-width: 220px; }
.user-roster-controls select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); color: var(--ink); padding: .72rem .82rem; font: inherit; outline: none; }
.user-roster-controls button { min-width: 128px; }
.schedule-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.schedule-list { display: grid; gap: .75rem; }
.schedule-list-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.74); }
.schedule-list-item h3 { margin: .15rem 0; font-size: 1.05rem; }
.schedule-list-item p { margin: .25rem 0; color: var(--muted); }
.schedule-list-item > div:last-child { display: grid; gap: .5rem; justify-items: end; }
.wide-modal { width: min(880px, calc(100vw - 2rem)); max-width: min(880px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); overflow-y: auto; margin: auto; box-sizing: border-box; }
.content-modal-form { margin-top: 1rem; }
.integration-setup-form { margin-top: 1rem; }
.integration-setup-form #integrationSetupFields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem; margin: 0 0 .2rem; }
.integration-result-panel { margin-top: 1rem; display: grid; gap: 1rem; padding: 1rem; border: 1px solid rgba(0,113,227,.14); border-radius: 22px; background: rgba(238,246,255,.58); }
.clean-billing-layout { grid-template-columns: minmax(0, 1fr); }
.billing-note { margin-top: 1rem; }

/* Retained marketing classes only so deleted/legacy fragments cannot break styles if cached. */
.marketing-shell, .marketing-nav, .marketing-section, .marketing-hero, .feature-slab, .proof-grid, .cards-3, .safety-band, .pricing-grid, .package-grid, .product-cards { display: grid; gap: 1rem; }

@media (max-width: 1280px) {
  .app-topbar { position: sticky; inset: 0; top: 0; width: auto; margin: 0; border-radius: 0 0 20px 20px; grid-template-columns: 42px minmax(0,1fr) auto; grid-template-rows: 1fr; align-items: center; gap: .65rem; padding: .65rem .85rem; }
  .brand-stack { display: contents; }
  .mobile-nav-toggle { display: grid; place-content: center; gap: 4px; width: 42px; height: 42px; padding: 0; border-radius: 12px; }
  .mobile-nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
  .brand-lockup { padding: 0; white-space: nowrap; }
  .brand-lockup small { display: none; }
  .business-switcher { display: none; }
  .business-switcher label { display: none; }
  .business-switcher select { min-height: 36px; padding: .4rem .55rem; }
  .app-nav { display: none; position: fixed; inset: 68px 12px auto 12px; max-height: calc(100vh - 88px); overflow: auto; padding: .75rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(250,250,252,.98); box-shadow: var(--shadow); }
  .app-topbar.nav-open .app-nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); z-index: 50; }
  .nav-tab { width: auto; flex: 0 0 auto; min-height: 36px; padding: .5rem .65rem; font-size: .87rem; }
  #logoutButton { width: auto; justify-self: start; }
  .app-main { margin-left: 0; padding: 1rem; }
  .dashboard-header, .dashboard-grid, .workspace-grid, .employee-grid, .chat-workspace, .settings-grid, .content-layout, .settings-route-shell, .business-info-page, .business-form-grid, .integration-setup-form #integrationSetupFields, .connected-business-card, .content-card, .content-edit-form, .form-grid, .integration-checklist, .kpi-strip, .kanban-grid, .pipeline-grid, .insight-grid, .insight-story-grid, .integration-grid, .super-admin-grid, .seat-grid, .result-grid, .plan-list, .file-toolbar, .upload-row, .user-management-grid, .user-account-card, .billing-layout, .plan-list-polished .plan-card, .schedule-list-item, .task-list-row, .strategy-grid { grid-template-columns: 1fr; }
  .finder-layout { grid-template-columns: 150px minmax(0,1fr); }
  .conversation-sidebar, .chat-panel, .chat-workspace { min-height: auto; }
  .chat-toolbar, .agent-config-summary, .chat-context-heading { align-items: stretch; flex-direction: column; }
  .chat-context-grid { grid-template-columns: 1fr; }
  .agent-picker { min-width: 100%; }
  .agent-toolbar-actions { justify-content: flex-start; }
  .tasks-heading { display: grid; }
  .dashboard-activity-panel .activity-feed { grid-template-columns: 1fr; }
  .profile-actions { justify-content: flex-start; }
  .profile-item-selectable { grid-template-columns: auto minmax(0,1fr); }
  .profile-item-selectable .profile-actions { grid-column: 2; }
  .billing-hero { display: grid; }
  .settings-subnav-panel { position: static; min-height: auto; }
  .settings-subnav { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .calendar-weekdays, .calendar-month-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-header { min-height: auto; }
}

@media (max-width: 680px) {
  body { letter-spacing: -0.22px; }
  .app-topbar { grid-template-columns: auto minmax(0,1fr) auto; padding: .55rem; }
  .brand-lockup strong { font-size: .95rem; }
  .business-switcher { display: none; }
  .app-topbar.nav-open .app-nav { grid-template-columns: 1fr; }
  .nav-tab { font-size: .88rem; }
  .settings-subnav { grid-template-columns: 1fr; }
  .calendar-weekdays { display: none; }
  .calendar-month-grid { grid-template-columns: 1fr; }
  .calendar-day.outside { display: none; }
  .dashboard-header h1, .section-heading h1 { font-size: clamp(2rem, 13vw, 3.35rem); }
  .account-card strong { font-size: 3.2rem; }
  .assistant-form, .upload-row, .chatgpt-form { grid-template-columns: 1fr; }
  .finder-layout { grid-template-columns: 1fr; min-height: 0; height: auto; }.finder-sidebar { display: none; }.finder-content { padding: .75rem; }.finder-upload-row { grid-template-columns: 1fr; }.finder-file-list .file-row { grid-template-columns: minmax(0,1fr) auto; }.finder-file-list .file-row small { grid-column: 1; }.finder-file-list .file-row button { grid-column: auto; }
}

.task-create-panel { margin-bottom: 1rem; }
.task-create-form { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(150px, .7fr) minmax(150px, .7fr) minmax(190px, .8fr) minmax(150px, .7fr) auto; gap: .75rem; align-items: end; }
.task-create-form label { display: grid; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.task-create-form input, .task-create-form select, .task-create-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .72rem .78rem; background: rgba(255,255,255,.82); color: var(--ink); font: inherit; }
.task-create-form textarea { resize: vertical; min-height: 44px; }
.task-create-form .task-details-field { grid-column: 1 / -2; }
.task-modal-form.task-create-form { grid-template-columns: repeat(2, minmax(0,1fr)); }
.task-modal-form.task-create-form .task-details-field, .task-modal-form.task-create-form .form-actions { grid-column: 1 / -1; }
.task-create-form label.is-disabled { opacity: .56; }
.task-create-form label.is-disabled input { background: rgba(245,247,251,.72); }
.task-create-form button[type="submit"] { min-height: 46px; border-radius: 14px; padding: .72rem .95rem; white-space: nowrap; }
.task-lane-items { display: grid; gap: .7rem; }
.task-card small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.task-status-active { border-color: rgba(0,113,227,.20); }
.task-status-done { border-color: rgba(52,199,89,.24); }
.task-list-row small { color: var(--muted); line-height: 1.35; }
.task-list-row { grid-template-columns: 126px minmax(170px, .65fr) minmax(0,1fr) minmax(180px,.7fr); }
@media (max-width: 1180px) { .task-create-form { grid-template-columns: repeat(2, minmax(0,1fr)); } .task-create-form .task-details-field { grid-column: 1 / -1; } }

.owner-admin-only[hidden] { display: none !important; }
.app-admin-panel { display: grid; gap: 1rem; }
.admin-header-actions { display: flex; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
.admin-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .75rem; }
.admin-summary-grid article { padding: 1rem; border-radius: 18px; background: rgba(255,255,255,.76); border: 1px solid var(--line); }
.admin-summary-grid span, .admin-summary-grid small { display: block; color: var(--muted); line-height: 1.35; }
.admin-summary-grid strong { display: block; margin: .3rem 0; font-size: 1.4rem; letter-spacing: -.04em; }
.subscription-admin-groups { display: grid; gap: .9rem; }
.subscription-group-card { padding: 1rem; border-radius: 20px; background: rgba(255,255,255,.74); border: 1px solid var(--line); }
.subscription-group-card h3 { margin: 0; letter-spacing: -.035em; }
.admin-table-list { display: grid; gap: .65rem; margin-top: .85rem; }
.admin-table-list > div { display: grid; grid-template-columns: minmax(170px,.7fr) minmax(0,1fr) auto; gap: .75rem; align-items: center; padding: .8rem; border-radius: 16px; background: rgba(250,250,252,.78); border: 1px solid rgba(0,0,0,.055); }
.admin-table-list span { color: var(--muted); line-height: 1.35; }
.admin-table-list > div > div { display: flex; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
@media (max-width: 1180px) { .admin-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .admin-table-list > div { grid-template-columns: 1fr; align-items: start; } .admin-table-list > div > div { justify-content: flex-start; } }

.admin-search-row { display: grid; grid-template-columns: minmax(260px,1fr) minmax(170px,.35fr); gap: .75rem; }
.admin-search-row label { display: grid; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.admin-search-row input, .admin-search-row select { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .72rem .78rem; background: rgba(255,255,255,.82); color: var(--ink); font: inherit; }
@media (max-width: 900px) { .admin-search-row { grid-template-columns: 1fr; } }

#workspacePreviewBody img,
#workspacePreviewBody iframe { display: block; width: 100%; max-width: 100%; border: 0; border-radius: 14px; }
#workspacePreviewBody img { height: auto; max-height: 70vh; object-fit: contain; }
#workspacePreviewBody iframe { min-height: 60vh; background: #fff; }
#workspacePreviewBody pre { max-height: 70vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
