/* ActtaFlow workspace. Existing application components keep their own actions. */
.af-workspace {
  --af-rail-width: 88px;
  --af-secondary-width: 232px;
  --af-header-height: 64px;
  --af-workspace-surface: hsl(var(--card));
  --af-workspace-line: hsl(var(--border) / 0.85);
  width: 100%;
  min-width: 0;
  height: 100dvh;
  overflow: hidden;
  background: hsl(var(--background));
}
.af-workspace:has(.af-navigation[data-nav-display="icons"]),
.af-workspace[data-nav-display="icons"],
.af-workspace [data-nav-display="icons"] { --af-rail-width: 64px; }
.af-workspace > div, .af-workspace main { min-width: 0; }
.af-workspace main { overscroll-behavior: contain; }
.af-navigation {
  display: flex;
  flex: none;
  height: 100%;
  min-height: 0;
  isolation: isolate;
  z-index: 35;
}
.af-primary-rail {
  width: var(--af-rail-width, 88px);
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 0 8px 14px;
  color: #c3cce1;
  background: linear-gradient(180deg, #111a34 0%, #0b1227 100%);
  border-right: 1px solid #ffffff09;
  transition: width 180ms ease;
}
.af-brand-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--af-header-height, 80px);
  min-height: var(--af-header-height, 80px);
  border: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}
.af-brand-symbol img { display: block; width: 38px; height: 38px; object-fit: contain; }
.af-brand-symbol:focus-visible { outline: 2px solid #06d6ff; outline-offset: -5px; }
.af-rail-items {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  overflow: auto;
  min-height: 0;
  padding: 12px 0;
  scrollbar-width: none;
}
.af-rail-items::-webkit-scrollbar { display: none; }
.af-rail-link, .af-more-button {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 65px;
  width: 100%;
  padding: 10px 3px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #9baac9;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}
.af-rail-link > svg, .af-rail-link > span > svg,
.af-more-button > svg { width: 20px; height: 20px; flex: none; }
.af-rail-link > span:last-child, .af-more-button > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.af-rail-link:hover, .af-more-button:hover { background: #ffffff08; color: #f2f5ff; }
.af-rail-link[data-active="true"], .af-more-button[data-active="true"] {
  color: #f3efff;
  background: linear-gradient(140deg, #7b5cff3b, #2d8bff12);
  border-color: #9782ff30;
}
.af-rail-link[data-active="true"]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: linear-gradient(#aa98ff, #54c7ff);
  border-radius: 0 4px 4px 0;
}
.af-rail-link:disabled, .af-rail-link[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.af-more-button { margin-top: 4px; }
.af-more-glyph {
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
  grid-template-columns: repeat(3, 4px);
  grid-template-rows: repeat(3, 4px);
  align-content: center;
  justify-content: center;
  gap: 3px;
}
.af-more-glyph > * {
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, width 180ms ease, height 180ms ease, opacity 180ms ease;
}
.af-more-button:hover .af-more-glyph { grid-template-columns: repeat(2, 7px); grid-template-rows: repeat(2, 7px); gap: 3px; }
.af-more-button:hover .af-more-glyph > * { width: 7px; height: 7px; border-radius: 2px; }
.af-more-button:hover .af-more-glyph > :nth-child(n+5) { display: none; }
[data-nav-display="icons"] .af-rail-link,
[data-nav-display="icons"] .af-more-button { min-height: 46px; gap: 0; }
[data-nav-display="icons"] .af-rail-link > span:last-child:not(.af-more-glyph),
[data-nav-display="icons"] .af-more-button > span:last-child:not(.af-more-glyph) { display: none; }
[data-nav-display="icons"] .af-brand-symbol img { width: 34px; height: 34px; }
.af-secondary {
  width: var(--af-secondary-width, 232px);
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--af-workspace-surface, hsl(var(--card)));
  border-right: 1px solid var(--af-workspace-line, hsl(var(--border)));
  transition: width 180ms ease, opacity 150ms ease;
}
.af-secondary[data-collapsed="true"] { width: 0; opacity: 0; border-right-width: 0; pointer-events: none; }
.af-secondary > header, .af-secondary-header, .af-secondary-title {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: var(--af-secondary-width, 232px);
  height: var(--af-header-height, 64px);
  padding: 0 14px 0 22px;
  border-bottom: 1px solid var(--af-workspace-line, hsl(var(--border)));
}
.af-secondary-title { font-size: 15px; font-weight: 650; letter-spacing: -0.035em; color: hsl(var(--foreground)); }
.af-secondary-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-secondary-title .af-secondary-toggle { width: 36px; min-width: 36px; height: 36px; padding: 8px; }
.af-secondary-agency { flex: none; min-width: var(--af-secondary-width); padding: 20px 24px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: hsl(var(--muted-foreground)); font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.af-secondary-bottom { display: grid; flex: none; min-width: var(--af-secondary-width); gap: 4px; padding: 12px; border-top: 1px solid var(--af-workspace-line); }
.af-secondary-bottom > button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 9px; background: transparent; color: hsl(var(--muted-foreground)); text-align: left; font-size: 11px; line-height: 1.4; cursor: pointer; }
.af-secondary-bottom > button svg { width: 17px; height: 17px; flex: none; }
.af-secondary-bottom > button:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.af-secondary-restore { position: fixed; left: calc(var(--af-rail-width) + 8px); top: 15px; z-index: 36; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid hsl(var(--border)); border-radius: 9px; background: hsl(var(--card)); color: hsl(var(--muted-foreground)); box-shadow: 0 2px 8px #07102108; cursor: pointer; }
.af-secondary-restore svg { width: 17px; height: 17px; transform: rotate(180deg); }
.af-workspace:has(.af-secondary[data-collapsed="true"]) .af-header > div { padding-left: 58px; }
.af-mobile-nav-close { display: none; }
.af-secondary-toggle, .af-tool-icon, .af-theme-toggle, .af-pin-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: hsl(var(--muted-foreground));
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.af-secondary-toggle svg, .af-tool-icon svg, .af-theme-toggle svg, .af-pin-button svg { width: 18px; height: 18px; }
.af-secondary-toggle:hover, .af-tool-icon:hover, .af-theme-toggle:hover, .af-pin-button:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}
.af-secondary > nav, .af-secondary-nav { overflow-y: auto; flex: 1; min-height: 0; padding: 18px 12px; }
.af-secondary-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  background: transparent;
  min-height: 44px;
  margin-bottom: 4px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.af-secondary-link svg { width: 17px; height: 17px; flex: none; opacity: 0.8; }
.af-secondary-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-secondary-link:hover { background: hsl(var(--muted) / 0.7); color: hsl(var(--foreground)); }
.af-secondary-link[data-active="true"] { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.085); font-weight: 600; }
.af-secondary-link[data-active="true"] svg { opacity: 1; }
.af-secondary-link:disabled, .af-secondary-link[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.af-modal-layer { position: fixed; inset: 0; z-index: 90; isolation: isolate; }
.af-backdrop { position: fixed; inset: 0; z-index: 40; background: #07102135; backdrop-filter: blur(2px); }
.af-modal-layer > .af-backdrop { z-index: 0; width: 100%; height: 100%; border: 0; border-radius: 0; cursor: default; }
.af-modal-layer > .af-customize { z-index: 1; }
.af-nav-popover {
  position: fixed;
  left: calc(var(--af-rail-width, 88px) + 10px);
  top: var(--af-header-height, 64px);
  z-index: 75;
  width: 430px;
  max-width: calc(100vw - 112px);
  max-height: calc(100dvh - 104px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  box-shadow: 0 20px 70px -18px #0b10263b;
}
.af-nav-popover h2, .af-nav-popover h3 { margin: 0 0 16px; font-size: 15px; font-weight: 650; letter-spacing: -0.025em; }
.af-nav-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.af-nav-popover > header strong { font-size: 14px; font-weight: 650; letter-spacing: -0.025em; }
.af-nav-popover > header button, .af-customize > header > button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; background: transparent; color: hsl(var(--muted-foreground)); cursor: pointer; }
.af-nav-popover > header button:hover, .af-customize > header > button:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.af-nav-popover > header button svg, .af-customize > header > button svg { width: 18px; height: 18px; }
.af-nav-popover > p { color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 1.65; }
.af-customize-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 44px; margin-top: 16px; padding: 10px 12px; border: 1px solid hsl(var(--border)); border-radius: 10px; background: hsl(var(--card)); color: hsl(var(--foreground)); font-size: 12px; cursor: pointer; }
.af-customize-button:hover { background: hsl(var(--muted)); }
.af-customize-button svg { width: 17px; height: 17px; }
.af-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.af-app-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  overflow: hidden;
}
.af-app-tile > button:first-child, button.af-app-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-height: 105px;
  padding: 18px 10px 13px;
  color: hsl(var(--foreground));
  font-size: 11px;
  text-align: center;
  line-height: 1.5;
  background: transparent;
  cursor: pointer;
}
.af-app-tile > button:first-child:hover, button.af-app-tile:hover { background: hsl(var(--primary) / 0.055); }
.af-app-tile > button:disabled { opacity: 0.4; cursor: not-allowed; }
.af-app-tile svg { width: 23px; height: 23px; color: hsl(var(--primary)); }
.af-app-tile .af-pin-button { align-self: flex-end; width: 44px; height: 30px; min-height: 30px; padding: 6px 12px; border-radius: 8px 0 0 0; }
.af-app-tile .af-pin-button svg { width: 14px; height: 14px; }
.af-pin-button[data-pinned="true"], .af-pin-button[aria-pressed="true"] { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.075); }
.af-customize {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid hsl(var(--border));
  border-radius: 20px;
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  box-shadow: 0 30px 120px -20px #0b102670;
}
.af-customize h2 { margin: 0 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -0.035em; }
.af-customize h3 { margin: 26px 0 12px; font-size: 12px; font-weight: 600; }
.af-customize p { color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 1.7; }
.af-customize > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.af-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.af-choice, .af-choices > button {
  min-height: 94px;
  padding: 18px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}
.af-choice[data-selected="true"], .af-choices > button[data-selected="true"] { border-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.055); box-shadow: 0 0 0 2px hsl(var(--primary) / 0.08); }
.af-choice svg, .af-choices > button svg { display: block; margin-bottom: 10px; width: 21px; height: 21px; color: hsl(var(--primary)); }
.af-module-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.af-module-checks label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 11px; border: 1px solid hsl(var(--border)); border-radius: 10px; font-size: 12px; cursor: pointer; }
.af-module-checks input { accent-color: #7b5cff; width: 16px; height: 16px; flex: none; }
.af-module-checks label > svg { width: 18px; height: 18px; flex: none; color: hsl(var(--muted-foreground)); }
.af-module-checks label:has(input:disabled) { cursor: default; }
.af-workspace .af-header { flex: none; height: var(--af-header-height); }
.af-workspace .af-header .relative.h-\[26px\] { display: none; }
.af-workspace .af-header > div { padding-inline: 22px; gap: 16px; }
.af-workspace .af-header > div > div { min-width: 0; }
.af-header-actions { flex: none; }
.af-workspace .af-header .relative.hidden.md\:block input[type="search"] { width: clamp(145px, 16vw, 250px); }
.af-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.af-ai-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: clamp(175px, 18vw, 270px);
  min-width: 0;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  isolation: isolate;
}
.af-ai-search::before {
  position: absolute;
  content: "";
  inset: -1px;
  z-index: -1;
  border: 1.5px solid transparent;
  border-radius: inherit;
  background: linear-gradient(110deg, #7b5cff, #2d8bff, #06d6ff, #00e0b8, #7b5cff) border-box;
  background-size: 250% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 180ms ease;
}
.af-ai-search:hover::before, .af-ai-search:focus-visible::before { opacity: 1; animation: af-workspace-spectrum 4s linear infinite; }
.af-search-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; }
.af-ai-search > svg, .af-search-icon > svg { width: 18px; height: 18px; flex: none; color: #7b5cff; transition: transform 500ms ease; }
.af-ai-search:hover > svg, .af-ai-search:hover .af-search-icon > svg { transform: rotate(90deg); }
.af-ai-search > span:not(:first-child) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.af-ai-search kbd { margin-left: auto; border: 1px solid hsl(var(--border)); border-radius: 5px; padding: 2px 4px; color: hsl(var(--muted-foreground) / 0.75); font-size: 9px; line-height: 1.2; }
.af-personal-pins { display: flex; align-items: center; gap: 2px; max-width: 264px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.af-personal-pins::-webkit-scrollbar { display: none; }
.af-theme-toggle { border: 1px solid hsl(var(--border) / 0.7); width: 40px; min-width: 40px; height: 40px; }
.af-tool-icon[data-active="true"] { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.08); }
.af-profile-menu, .af-profile-menu[role="menu"] { width: 340px; max-width: calc(100vw - 24px); max-height: min(80dvh, var(--radix-dropdown-menu-content-available-height, 80dvh)); overflow-y: auto; padding: 10px; border-radius: 16px; background: hsl(var(--popover)); color: hsl(var(--popover-foreground)); box-shadow: 0 18px 65px -20px #0b102650; }
.af-legacy-profile-card { display: none !important; }
.af-profile-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 10px 18px; margin-bottom: 8px; border-bottom: 1px solid hsl(var(--border)); }
.af-profile-card > div { min-width: 0; }
.af-profile-avatar { position: relative; display: grid; place-items: center; flex: none; width: 46px; height: 46px; padding: 0; border: 1px solid hsl(var(--primary) / 0.15); border-radius: 50%; background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); font-size: 17px; font-weight: 600; cursor: pointer; }
.af-profile-avatar > i { position: absolute; right: -1px; bottom: 0; width: 12px; height: 12px; border: 2px solid hsl(var(--popover)); }
.af-profile-card i[data-presence] { display: inline-block; flex: none; border-radius: 50%; background: #00b994; }
.af-profile-card i[data-presence="away"] { background: #d99b24; }
.af-profile-card i[data-presence="busy"] { background: #e46077; }
.af-profile-card i[data-presence="offline"] { background: #8290aa; }
.af-profile-card img, .af-profile-card [data-slot="avatar"] { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.af-profile-card strong, .af-profile-card h3 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.af-profile-card small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: hsl(var(--muted-foreground)); font-size: 10px; }
.af-status-toggle { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 30px; margin-top: 5px; padding: 4px 7px; border: 1px solid hsl(var(--border)); border-radius: 7px; background: hsl(var(--card)); color: hsl(var(--muted-foreground)); font-size: 10px; text-align: left; cursor: pointer; }
.af-status-toggle > i, .af-status-options i { width: 7px; height: 7px; }
.af-status-options { position: absolute; top: calc(100% - 14px); left: 65px; right: 4px; z-index: 2; display: grid; gap: 2px; padding: 6px; border: 1px solid hsl(var(--border)); border-radius: 10px; background: hsl(var(--popover)); box-shadow: 0 8px 25px #07102120; }
.af-status-options > button { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 8px 10px; border-radius: 7px; background: transparent; color: hsl(var(--foreground)); font-size: 11px; text-align: left; cursor: pointer; }
.af-status-options > button:hover { background: hsl(var(--muted)); }
.af-profile-card p { max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 3px 0; color: hsl(var(--muted-foreground)); font-size: 11px; }
.af-profile-card select { min-height: 32px; max-width: 100%; margin-top: 6px; padding: 4px 8px; border: 1px solid hsl(var(--border)); border-radius: 7px; background: hsl(var(--card)); color: hsl(var(--foreground)); font-size: 10px; }
.af-profile-tools { display: grid; gap: 3px; }
.af-profile-tools > p { margin: 14px 10px 5px; color: hsl(var(--muted-foreground)); font-size: 10px; font-weight: 600; letter-spacing: 0.045em; text-transform: uppercase; }
.af-tool-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 4px; min-height: 44px; border-radius: 10px; }
.af-tool-row > button:first-child, .af-tool-row > a:first-child { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 11px; border-radius: 10px; color: hsl(var(--foreground)); text-align: left; font-size: 12px; background: transparent; cursor: pointer; }
.af-tool-row > button:first-child:hover, .af-tool-row > a:first-child:hover { background: hsl(var(--muted)); }
.af-tool-row > button:first-child svg, .af-tool-row > a:first-child svg { width: 17px; height: 17px; flex: none; color: hsl(var(--muted-foreground)); }
.af-tool-row > button:last-child:not(:first-child) { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 11px; border-radius: 9px; background: transparent; color: hsl(var(--muted-foreground)); cursor: pointer; }
.af-tool-row > button:last-child:not(:first-child) svg { width: 16px; height: 16px; }
.af-tool-row > button:last-child:not(:first-child):hover, .af-tool-row > button:last-child[aria-pressed="true"] { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.08); }
.af-tool-row > button:only-child { grid-column: 1 / -1; }
.af-profile-menu [role="menuitem"] { min-height: 40px; border-radius: 9px; font-size: 12px; }
.af-overlay-panels {
  position: fixed;
  top: var(--af-header-height, 64px);
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  width: 480px;
  max-width: 100vw;
  min-width: 0;
  border-left: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  box-shadow: -20px 0 65px -35px #0b10264d;
}
.af-overlay-panels[data-fullscreen="true"] { inset: 0; z-index: 70; width: 100%; border-left: 0; }
.af-panel-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding: 10px 14px 10px 22px; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--card)); }
.af-panel-header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.af-panel-header h2, .af-panel-header strong { font-size: 13px; font-weight: 650; letter-spacing: -0.02em; }
.af-panel-header > strong { min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-panel-header > .af-ai-orb { flex: none; }
.af-panel-header button { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px; border-radius: 10px; background: transparent; color: hsl(var(--muted-foreground)); cursor: pointer; }
.af-panel-header button:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.af-panel-header button svg { width: 18px; height: 18px; }
.af-panel-content { flex: 1; min-height: 0; min-width: 0; padding: 20px; overflow: auto; overscroll-behavior: contain; }
.af-panel-content > * { max-width: 100%; }
.af-panel-content:has(> .af-ai-content:not([style*="none"])) { display: flex; padding: 0; overflow: hidden; }
.af-panel-content:has(> .af-personal) { padding: 0; }
.af-panel-content textarea { width: 100%; min-height: 230px; padding: 14px; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--card)); color: hsl(var(--foreground)); font-size: 13px; line-height: 1.7; resize: vertical; }
.af-panel-content [class*="grid-cols-[76px_1fr_80px_90px]"] { grid-template-columns: 48px minmax(0, 1fr) 65px 65px; gap: 8px; padding-inline: 0; }
.af-panel-content .px-6 { padding-inline: 12px; }
.af-ai-content { display: flex; flex: 1; flex-direction: column; height: 100%; min-height: 0; min-width: 0; overflow: hidden; }
.af-ai-content > div { width: 100%; flex: 1; min-height: 0; min-width: 0; }
.af-ai-content textarea { width: auto; flex: 1; min-width: 0; min-height: 36px; max-height: 128px; padding: 8px; border: 0; border-radius: 0; background: transparent; font-size: 13px; line-height: 1.5; resize: none; }
.af-ai-content .prose { overflow-wrap: anywhere; }
.af-ai-content .prose pre { max-width: 100%; overflow-x: auto; }
.af-ai-history { min-height: 0; overflow: hidden; border-right: 1px solid hsl(var(--border)); }
.af-ai-history > * { min-height: 0; max-width: 280px; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-history { display: none !important; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-history-trigger { display: inline-flex !important; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-content .text-3xl { font-size: 24px; line-height: 1.3; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-content .px-6 { padding-inline: 22px; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-content .hidden.sm\:inline { display: none; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-content .max-w-3xl { max-width: 100%; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-content .max-w-\[75\%\] { max-width: 88%; }
.af-overlay-panels:not([data-fullscreen="true"]) .af-ai-content .space-y-5 { margin: 0; }
.af-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 8px;
  border: 1px solid #7b5cff44;
  border-radius: 50%;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  box-shadow: 0 8px 32px -8px #2d8bff4d, 0 0 0 5px hsl(var(--card) / 0.65);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.af-fab:hover { transform: translateY(-3px); box-shadow: 0 13px 36px -8px #7b5cff55, 0 0 0 5px #7b5cff09; }
.af-fab:active { transform: translateY(0); }
.af-fab > span { pointer-events: none; }
.af-team-chat { display: flex; flex: none; align-items: center; justify-content: center; position: relative; }
.af-team-chat > button {
  position: relative !important;
  inset: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  min-width: 44px;
  height: 44px !important;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px !important;
  background: transparent !important;
  color: hsl(var(--muted-foreground)) !important;
  box-shadow: none !important;
  transform: none !important;
  z-index: auto !important;
}
.af-team-chat > button:hover { background: hsl(var(--muted)) !important; color: hsl(var(--foreground)) !important; }
.af-team-chat > button > svg { width: 19px; height: 19px; }
.af-team-chat > button > span { top: 1px; min-width: 15px; height: 15px; font-size: 8px; padding-inline: 3px; }
.af-layout-error { padding: 8px 12px; color: hsl(var(--destructive)); font-size: 11px; line-height: 1.6; }
.af-ai-route-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; min-height: 65dvh; padding: 24px; text-align: center; color: hsl(var(--muted-foreground)); font-size: 13px; }
.af-ai-route-placeholder > button { min-height: 44px; padding: 10px 18px; border-radius: 10px; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); cursor: pointer; }
.af-workspace :is(.af-rail-link,.af-more-button,.af-secondary-link,.af-secondary-toggle,.af-tool-icon,.af-theme-toggle,.af-ai-search,.af-pin-button,.af-fab,.af-choice):focus-visible {
  outline: 2px solid #2d8bff;
  outline-offset: 3px;
}
.dark .af-secondary { background: #10182c; }
.dark .af-primary-rail { background: #0a1022; border-right-color: #273047; }
.dark .af-secondary-link[data-active="true"] { background: #7b5cff1c; color: #baaaff; }
.dark .af-nav-popover, .dark .af-profile-menu, .dark .af-customize { box-shadow: 0 24px 80px -20px #0009; }
.dark .af-ai-search { background: #151e33; }
.dark .af-backdrop { background: #03071366; }
.dark .af-overlay-panels { box-shadow: -20px 0 65px -30px #0009; }
@keyframes af-workspace-spectrum { to { background-position: 250% 0; } }
@media (min-width: 1550px) {
  .af-workspace { --af-secondary-width: 244px; }
  .af-toolbar { gap: 10px; }
}
@media (max-width: 1200px) {
  .af-workspace { --af-secondary-width: 212px; }
  .af-toolbar { gap: 3px; }
  .af-ai-search { width: 175px; }
  .af-ai-search kbd { display: none; }
  .af-workspace .af-header > div { padding-inline: 16px; gap: 8px; }
  .af-workspace .af-header .flex.items-center.gap-4 { gap: 6px; }
  .af-workspace .af-header .relative.hidden.md\:block input[type="search"] { width: 160px; }
}
@media (max-width: 1050px) {
  .af-ai-search { width: 44px; height: 44px; justify-content: center; padding: 10px; }
  .af-ai-search > span:not(:first-child), .af-ai-search > kbd { display: none; }
  .af-personal-pins { max-width: 132px; overflow-x: auto; scrollbar-width: none; }
  .af-personal-pins::-webkit-scrollbar { display: none; }
  .af-secondary > header, .af-secondary-header { padding-left: 18px; }
}
@media (max-width: 767px) {
  .af-workspace { --af-header-height: 64px; --af-rail-width: 78px; --af-secondary-width: min(232px, calc(100vw - 78px)); }
  .af-navigation { display: none; }
  .af-mobile-nav { position: fixed; inset: 64px 0 0; z-index: 60; }
  .af-mobile-nav .af-navigation { display: flex; position: absolute; inset: 0 auto 0 0; max-width: 100vw; box-shadow: 20px 0 70px -25px #0b102650; }
  .af-mobile-nav .af-backdrop { position: absolute; inset: 0; z-index: -1; }
  .af-mobile-nav .af-brand-symbol { height: 64px; min-height: 64px; }
  .af-mobile-nav .af-secondary > header, .af-mobile-nav .af-secondary-header { height: 64px; }
  .af-rail-link, .af-more-button { min-height: 58px; font-size: 9px; }
  .af-workspace .af-header > div { padding-inline: 10px; gap: 4px; }
  .af-workspace .af-header .flex.items-center.gap-4 { gap: 3px; }
  .af-toolbar { gap: 0; }
  .af-personal-pins { display: none; }
  .af-theme-toggle { width: 40px; min-width: 40px; height: 44px; border-color: transparent; }
  .af-tool-icon { min-width: 40px; width: 40px; }
  .af-ai-search { width: 40px; min-width: 40px; border-color: transparent; background: transparent; }
  .af-team-chat > button { width: 40px !important; }
  .af-overlay-panels { top: 64px; width: 100%; border-left: 0; }
  .af-overlay-panels[data-fullscreen="true"] { inset: 0; }
  .af-panel-header { min-height: 60px; padding-inline: 16px 8px; }
  .af-panel-content { padding: 16px; }
  .af-nav-popover { left: 12px; right: 12px; top: 76px; width: auto; max-width: none; max-height: calc(100dvh - 92px); padding: 18px; }
  .af-app-grid { gap: 8px; }
  .af-app-tile > button:first-child, button.af-app-tile { min-height: 100px; font-size: 10px; padding-inline: 7px; }
  .af-customize { padding: 22px; max-height: calc(100dvh - 32px); }
  .af-choices { gap: 10px; }
  .af-choice { padding: 14px; font-size: 11px; }
  .af-module-checks { grid-template-columns: 1fr; }
  .af-profile-menu { width: 330px; }
  .af-overlay-panels .af-ai-history { display: none !important; }
  .af-overlay-panels .af-ai-history-trigger { display: inline-flex !important; }
  .af-ai-content .text-3xl { font-size: 23px; }
  .af-ai-content .px-5 { padding-inline: 16px; }
  .af-fab { right: 17px; bottom: 17px; width: 58px; height: 58px; }
}
@media (max-width: 390px) {
  .af-workspace .af-header > div { padding-inline: 6px; }
  .af-workspace .af-header .flex.items-center.gap-4 { gap: 0; }
  .af-profile-menu { max-width: calc(100vw - 16px); }
  .af-panel-content [class*="grid-cols-[76px_1fr_80px_90px]"] { grid-template-columns: 38px minmax(0, 1fr) 59px 57px; gap: 5px; }
}
@media (pointer: coarse) {
  .af-pin-button, .af-app-tile .af-pin-button, .af-theme-toggle, .af-tool-icon, .af-ai-search, .af-profile-menu [role="menuitem"] { min-height: 44px; min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .af-workspace *, .af-workspace *::before, .af-workspace *::after,
  .af-nav-popover *, .af-customize *, .af-overlay-panels *, .af-fab {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
