html.ui-v2 #sb-ai-office { order: 7; margin-top: 16px; }
html.ui-v2 #sb-ai-office .sb-icon { font-size: 15px; }
html.ui-v2 #sb-ai-office .sb-icon::before { display: none; }

#section-ai-office {
  --ao-bg: #0c1323;
  --ao-card: #141d31;
  --ao-floor: #10192a;
  --ao-line: #28354e;
  --ao-text: #f0f3ff;
  --ao-soft: #a7b3cd;
  --ao-blue: #8498ff;
  --ao-violet: #ab8dff;
  --ao-green: #51d5a5;
  --ao-cyan: #62cfe8;
  --ao-amber: #f2c07d;
  --ao-rose: #ee87a0;
  --ao-red: #ff8296;
  --ao-depth: 0 12px 30px #04071130;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: auto;
  color: var(--ao-text);
  color-scheme: dark;
  background: radial-gradient(ellipse at 38% -20%, #212750, transparent 56%), var(--ao-bg);
}
.ao-shell { width: 100%; max-width: 1600px; box-sizing: border-box; margin: 0 auto; padding: 28px clamp(15px, 2.45vw, 36px) 36px; }
.ao-header, .ao-panel-head, .ao-stage-head, .ao-header-actions, .ao-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.ao-header { margin-bottom: 22px; }
#section-ai-office h1, #section-ai-office h2, #section-ai-office h3 { margin: 0; color: var(--ao-text); line-height: 1.22; }
#section-ai-office h1 { font-size: clamp(29px, 4vw, 45px); letter-spacing: -.055em; font-weight: 780; }
#section-ai-office h2 { font-size: 18px; letter-spacing: -.018em; font-weight: 700; }
#section-ai-office h3 { font-size: 14px; font-weight: 720; }
#section-ai-office p { margin: 6px 0 0; color: var(--ao-soft); font-size: 13px; line-height: 1.55; }
#section-ai-office small { color: var(--ao-soft); font-size: 11px; }
.ao-header-actions { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ao-shop { display: grid; gap: 3px; color: var(--ao-soft); font-size: 10px; font-weight: 650; }
.ao-shop select { max-width: 220px; }
#section-ai-office button, #section-ai-office input, #section-ai-office select, #section-ai-office textarea { font: inherit; }
#section-ai-office :is(button,input,select,textarea,summary):focus-visible { outline: 2px solid #bec9ff; outline-offset: 3px; }
.ao-button, .ao-toggle button, .ao-tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 6px 11px; border: 1px solid var(--ao-line); border-radius: 8px;
  background: #19253d; color: var(--ao-text); cursor: pointer; font-size: 12px !important; font-weight: 690 !important;
}
.ao-button:hover, .ao-toggle button:hover, .ao-tabs button:hover { border-color: #6678b5; background: #253253; }
.ao-button[data-primary] { border-color: #6f82fa; background: #5266eb; color: #fff; box-shadow: 0 5px 16px #5665ff35; }
.ao-button[data-primary]:hover { background: #5e71f1; }
.ao-button[data-link] { padding-left: 0; border-color: transparent; background: transparent; color: #adbbff; text-align: left; }
.ao-button[data-link]:hover { text-decoration: underline; }
.ao-button:disabled { opacity: .46; cursor: default; }
.ao-header .ao-button { min-height: 41px; padding: 6px 15px; }
.ao-header .ao-button span { font-size: 18px; line-height: 1; }
.ao-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 17px; border-bottom: 1px solid var(--ao-line); }
.ao-tabs button { flex-shrink: 0; min-height: 41px; border: 0; padding: 8px 15px; border-radius: 8px 8px 0 0; background: transparent; color: var(--ao-soft); }
.ao-tabs button[aria-pressed="true"] { box-shadow: inset 0 -2px #8799ff; background: #8498ff17; color: var(--ao-text); }
.ao-tabs button span { min-width: 16px; padding: 1px 5px; border-radius: 5px; background: #8498ff35; color: #d3dcff; }
.ao-content { display: grid; gap: 16px; }
.ao-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.ao-stat, .ao-card, .ao-stage { border: 1px solid var(--ao-line); border-radius: 13px; background: var(--ao-card); box-shadow: var(--ao-depth); }
.ao-stat { display: flex; gap: 12px; align-items: center; min-height: 76px; padding: 12px; box-sizing: border-box; }
.ao-stat-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px; border-radius: 9px; color: #abb9ff; background: #8799ff20; font-size: 19px; }
.ao-stat:nth-child(3) .ao-stat-icon { color: var(--ao-green); background: #51d5a51b; }
.ao-stat:nth-child(4) .ao-stat-icon { color: var(--ao-amber); background: #f2c07d1b; }
.ao-stat div { display: grid; gap: 3px; }
.ao-stat div span { color: var(--ao-soft); font-size: 11px; line-height: 1.2; }
.ao-stat strong { font-weight: 760; font-size: 22px; line-height: 1.1; }
.ao-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(214px, 27%); gap: 13px; align-items: start; }
.ao-stage { overflow: hidden; min-width: 0; }
.ao-stage-head { padding: 15px 16px; }
.ao-stage-head p { font-size: 11px !important; }
.ao-toggle { display: flex; gap: 3px; padding: 3px; background: #0d1628; border: 1px solid var(--ao-line); border-radius: 9px; flex-shrink: 0; }
.ao-toggle button { min-height: 28px; padding: 4px 8px; border: 0; background: transparent; color: var(--ao-soft); }
.ao-toggle button[aria-pressed="true"] { background: #2a3758; color: var(--ao-text); }
.ao-viewport {
  --ao-x: 0px; --ao-y: 0px; --ao-scale: 1;
  position: relative; isolation: isolate; overflow: hidden; min-height: 445px; height: min(54vh, 570px);
  background: radial-gradient(ellipse at 48% 45%, #263653 0, #151f36 66%, #0f1729 100%);
  cursor: grab; touch-action: none;
}
.ao-viewport:active { cursor: grabbing; }
.ao-viewport:fullscreen { height: 100%; }
.ao-viewport::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
  background-image: radial-gradient(#9fb5de 1px, transparent 1px); background-size: 18px 18px;
}
.ao-scene {
  position: absolute; left: 50%; top: 47%;
  transform: translate(calc(-50% + var(--ao-x)), calc(-50% + var(--ao-y))) scale(var(--ao-scale));
}
.ao-floor {
  position: absolute; inset: -13px; pointer-events: none;
  border: 1px solid #465777; border-radius: 15px;
  background: repeating-linear-gradient(90deg, #a5bce414 0 1px, transparent 1px 16px),
    repeating-linear-gradient(#a5bce414 0 1px, transparent 1px 16px), #19263f;
  box-shadow: 0 5px 0 #0c1323, 0 6px 0 #101b30, 0 18px 35px #0a111f9c, inset 0 1px #98b3e22b;
}
.ao-room, .ao-department { --department: var(--ao-blue); }
[data-color=violet] { --department: var(--ao-violet); }
[data-color=green] { --department: var(--ao-green); }
[data-color=rose] { --department: var(--ao-rose); }
[data-color=amber] { --department: var(--ao-amber); }
[data-color=cyan] { --department: var(--ao-cyan); }
.ao-room {
  position: absolute; box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--department) 42%, #273650); border-radius: 9px;
  background: repeating-linear-gradient(90deg, #91a6ce0d 0 1px, transparent 1px 12px),
    linear-gradient(150deg, color-mix(in srgb, var(--department) 13%, #23314b), #18243a);
  box-shadow: 0 3px 0 #10192a, 0 4px 0 #3b4b67, 0 7px 12px #0a101f8c,
    inset 0 2px color-mix(in srgb, var(--department) 44%, #26344c);
}
.ao-room-head {
  display: flex; position: absolute; inset: 9px 7px auto; gap: 4px; justify-content: space-between;
  align-items: center; min-height: 19px;
}
.ao-room h3 {
  min-width: 0; padding-left: 5px; border-left: 2px solid var(--department);
  font-size: 11px !important; line-height: 1.18 !important;
}
.ao-room.ao-hub {
  border-color: #9f96dc;
  background: repeating-linear-gradient(90deg, #acaff016 0 1px, transparent 1px 12px), linear-gradient(145deg, #3b3a68, #253253);
  box-shadow: 0 3px 0 #181d38, 0 4px 0 #6863a2, 0 8px 18px #9a7aff40, inset 0 2px #a897e6;
}
.ao-link { position: absolute; height: 2px; transform-origin: left center; background: #8299fa35; pointer-events: none; }
.ao-link.is-working { height: 3px; background: repeating-linear-gradient(90deg, #8498ff80 0 9px, #c0cbff 9px 14px, #6b81d932 14px 24px); background-size: 24px 100%; animation: ao-transfer .85s linear infinite; }
@keyframes ao-transfer { to { background-position: -24px 0; } }
.ao-memory-room {
  position: absolute; display: grid; align-content: center; justify-items: center; gap: 10px;
  border: 1px solid #5b6187; border-radius: 9px; background: #232d49; color: #d3daf2;
  box-shadow: 0 3px #11192d, 0 4px #3d4968, 0 7px 12px #0a101f8c; cursor: pointer;
  font-size: 11px !important; font-weight: 650 !important;
}
.ao-memory-room::before {
  content: ""; width: 59px; height: 29px; border: 1px solid #777caf; border-radius: 5px;
  background: repeating-linear-gradient(90deg, #374269 0 8px, #a1a1d9 8px 10px, #485379 10px 15px);
  box-shadow: inset 0 0 0 4px #303a58, 0 4px #161e34, 0 7px 10px #12182b8c;
}
.ao-memory-room:hover { border-color: #abb2db; }
.ao-desks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 6px; position: absolute; inset: 34px 8px 9px; align-content: start; }
.ao-agent {
  display: flex; align-items: center; gap: 9px; min-width: 0; text-align: left; color: var(--ao-text);
  border: 1px solid transparent; background: transparent; border-radius: 7px; cursor: pointer; padding: 5px;
}
.ao-agent:hover { border-color: var(--department); background: #8299fc1a; }
.ao-agent span:last-child:not(.ao-avatar) { min-width: 0; }
.ao-agent strong { display: block; font-size: 12px; line-height: 1.25; }
.ao-agent small { display: block; margin-top: 3px; }
.ao-avatar {
  --status: var(--ao-green);
  position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px;
  background: color-mix(in srgb, var(--department, var(--ao-violet)) 30%, #1c2a49);
  border: 1px solid color-mix(in srgb, var(--department, var(--ao-violet)) 65%, #40537a); border-radius: 10px;
  color: #fff; font-size: 11px; font-weight: 760;
}
.ao-avatar::after { content: ""; position: absolute; width: 7px; height: 7px; right: -2px; bottom: -2px; background: var(--status); border: 2px solid #1a2846; border-radius: 50%; }
.ao-room .ao-agent {
  display: flex; align-items: center; gap: 3px; padding: 7px 4px 3px; position: relative; min-height: 29px; border-radius: 5px;
  background: linear-gradient(#435470, #2a3a56); border-color: #62779a; box-shadow: 0 2px #162136;
}
.ao-room .ao-agent::before {
  content: ""; position: absolute; top: 2px; right: 9px; height: 3px; width: 15px; border-radius: 2px;
  background: #91a6d7; box-shadow: 0 2px #172239; pointer-events: none;
}
.ao-room .ao-agent:hover { background: #405182; }
.ao-room .ao-avatar { width: 19px; height: 16px; border-radius: 5px; font-size: 7px; }
.ao-room .ao-avatar::after { width: 5px; height: 5px; border-width: 1px; }
.ao-desk-label {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; font-size: 8.5px; line-height: 1.14;
}
.ao-more-agents { position: absolute; right: 6px; bottom: 1px; padding: 1px 3px; background: #121b33; border: 0; color: #e7ebff; cursor: pointer; font-size: 9px !important; }
.ao-room [data-finance-trigger] {
  min-height: 18px; padding: 1px 3px 1px 4px; gap: 3px; flex-shrink: 0; border-radius: 4px; font-size: 9px !important;
}
[data-finance-trigger]:has(.ao-news-count:not([hidden])) { border-color: #ca975e; background: #473b37; color: #fff0d3; }
.ao-news-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 13px; min-height: 13px;
  padding: 0 2px; border-radius: 5px; background: #f3c583; color: #251b13; font-size: 8px; font-weight: 800;
}
.ao-camera { position: absolute; z-index: 2; right: 11px; bottom: 11px; display: flex; flex-wrap: wrap; gap: 4px; }
.ao-camera .ao-button { min-width: 32px; min-height: 32px; padding: 0; background: #142037; font-size: 16px !important; }
.ao-scene-help { position: absolute; left: 13px; bottom: 13px; max-width: 48%; color: #aab8d8; font-size: 10px; line-height: 1.35; }
.ao-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 12px 14px; border-top: 1px solid var(--ao-line); }
.ao-legend .ao-status { border: 0; padding: 1px; background: none; }
.ao-department-list { padding: 0 12px 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 8px; }
.ao-department { padding: 10px; min-width: 0; background: #101a2d; border: 1px solid var(--ao-line); border-top: 2px solid var(--department); border-radius: 8px; }
.ao-department h3 { display: flex; justify-content: space-between; gap: 5px; margin-bottom: 8px !important; }
.ao-department h3 span { color: var(--department); font-size: 11px; }
.ao-department .ao-agent { width: 100%; }
.ao-side { display: grid; gap: 11px; min-width: 0; }
.ao-side .ao-card, .ao-panel, .ao-proposal { padding: 15px; }
.ao-director {
  background: radial-gradient(at 25% -15%, #3c438faa, transparent 72%), var(--ao-card);
  display: grid; justify-items: start; gap: 7px;
}
.ao-director .ao-avatar { width: 42px; height: 42px; margin-bottom: 4px; }
.ao-director .ao-button { width: 100%; }
.ao-director p { margin-bottom: 6px !important; }
.ao-operations .ao-button { margin: 8px 4px 0 0; }
.ao-efficiency dl, .ao-proposal dl { margin: 10px 0 0; color: var(--ao-soft); font-size: 11px; }
.ao-efficiency dl div, .ao-proposal dl div {
  display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #28354e99;
}
.ao-efficiency dd, .ao-proposal dd { margin: 0; color: var(--ao-text); text-align: right; }
.ao-status {
  --status: var(--ao-soft); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--status) 28%, transparent);
  border-radius: 20px; color: var(--status); background: color-mix(in srgb, var(--status) 8%, transparent);
  font-size: 10px; line-height: 1.2; font-weight: 650;
}
#section-ai-office [data-status=inactive], #section-ai-office [data-status=cancelled] { --status: #a4afc4; }
#section-ai-office [data-status=ready], #section-ai-office [data-status=completed], #section-ai-office [data-status=approved] { --status: var(--ao-green); }
#section-ai-office [data-status=running], #section-ai-office [data-status=queued] { --status: #9babff; }
#section-ai-office [data-status=pending], #section-ai-office [data-status=waiting_data], #section-ai-office [data-status=rework] { --status: var(--ao-amber); }
#section-ai-office [data-status=interaction] { --status: var(--ao-violet); }
#section-ai-office [data-status=error], #section-ai-office [data-status=rejected] { --status: var(--ao-red); }
.ao-status::before { content: ""; background: var(--status); width: 5px; height: 5px; border-radius: 50%; }
.ao-panel { min-width: 0; }
.ao-panel-head { margin-bottom: 11px; align-items: flex-start; }
.ao-filters, .ao-form-grid, .ao-task-list, .ao-draft-grid { display: grid; gap: 10px; }
.ao-filters { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); align-items: end; margin: 10px 0 16px; }
.ao-field { display: grid; gap: 4px; color: var(--ao-soft); font-size: 11px; min-width: 0; font-weight: 660; }
#section-ai-office [hidden] { display: none !important; }
#section-ai-office :is(input:not([type=checkbox]), select, textarea) {
  min-width: 0; width: 100%; box-sizing: border-box; min-height: 34px; padding: 6px 8px;
  border: 1px solid var(--ao-line); border-radius: 7px; color: var(--ao-text); background: #10192c; font-size: 12px;
}
#section-ai-office textarea { resize: vertical; }
.ao-empty { padding: 35px 9px; border: 1px dashed var(--ao-line); border-radius: 9px; color: var(--ao-soft); text-align: center; font-size: 13px; }
.ao-error { border: 1px solid #ff829650; background: #ff829619; color: #ffbccc; border-radius: 7px; padding: 9px 12px; margin: 8px 0; font-size: 13px; }
.ao-table-wrap { overflow-x: auto; }
.ao-table { width: 100%; border-collapse: collapse; color: var(--ao-text); font-size: 12px; text-align: left; }
.ao-table th, .ao-table td { border-bottom: 1px solid var(--ao-line); padding: 8px 6px; }
.ao-table th { color: var(--ao-soft); font-weight: 700; }
.ao-table th:first-child { min-width: 130px; }
.ao-pages { display: flex; justify-content: center; align-items: center; gap: 10px; padding-top: 14px; font-size: 12px; }
.ao-kanban { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); overflow-x: auto; gap: 8px; padding-bottom: 5px; }
.ao-kanban section, .ao-kanban article, .ao-task-list > div, .ao-flow article {
  padding: 9px; min-width: 0; border: 1px solid var(--ao-line); border-radius: 9px; background: #101a2c;
}
.ao-kanban section > h3 { display: flex; justify-content: space-between; }
.ao-kanban article { display: grid; justify-items: start; gap: 5px; margin-top: 7px; background: #19243c; }
.ao-context { overflow-wrap: anywhere; white-space: pre-wrap; border-left: 2px solid var(--ao-blue); padding: 5px 9px; }
.ao-run-detail { width: 100%; max-width: 1260px; box-sizing: border-box; margin-inline: auto; }
.ao-run-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.ao-run-bar .ao-button { font-size: 13px !important; }
.ao-report {
  --ao-period-base: #7899bd;
  --ao-period-current: #a1aaff;
  container: office-report / inline-size;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px;
}
.ao-report-overview, .ao-report-card {
  background: #101a2d; border: 1px solid var(--ao-line); border-radius: 12px;
  margin: 0; padding: clamp(14px, 2vw, 23px); min-width: 0;
}
.ao-report-overview {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px;
  background: radial-gradient(ellipse at 2% 0, #26355b 0, transparent 70%), #131c30;
}
.ao-report-overview > :not(.ao-report-title, .ao-report-periods) { grid-column: 1 / -1; }
#section-ai-office .ao-report-title h2 { font-size: clamp(19px, 2.2vw, 27px); line-height: 1.28; overflow-wrap: anywhere; }
#section-ai-office .ao-report-title p { font-size: 13px; overflow-wrap: anywhere; }
.ao-report-periods { display: flex; flex-wrap: wrap; gap: 7px; }
.ao-report-periods > div {
  --ao-period-color: var(--ao-period-base);
  display: grid; gap: 3px; padding: 8px 11px; border-radius: 7px; border-left: 3px solid var(--ao-period-color);
  background: #0c1527; font-size: 11px; color: var(--ao-soft);
}
.ao-report-periods > [data-period=current] { --ao-period-color: var(--ao-period-current); }
.ao-report-periods strong { color: var(--ao-text); font-size: 12px; font-weight: 650; }
.ao-report-lead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; }
.ao-report-lead .ao-button { min-height: 30px; }
#section-ai-office .ao-report-summary {
  margin: 0; color: var(--ao-text); font-size: clamp(18px, 2vw, 24px); font-weight: 740; line-height: 1.35;
}
#section-ai-office .ao-report-summary[data-trend=up] { color: #8be1bc; }
#section-ai-office .ao-report-summary[data-trend=down] { color: #ffb3bb; }
#section-ai-office .ao-report-summary small { display: block; margin-top: 3px; color: var(--ao-soft); font-size: 13px; font-weight: 500; }
.ao-report-highlights {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; font-variant-numeric: tabular-nums;
}
.ao-report-highlights > div {
  display: grid; align-content: start; gap: 6px; min-width: 0; padding: 12px;
  border: 1px solid #33425e; border-radius: 9px; background: #101a30;
}
.ao-report-highlights dt { font-size: 12px; line-height: 1.35; color: var(--ao-soft); }
.ao-report-highlights dd { margin: 0; }
.ao-report-value { font-weight: 730; font-size: clamp(17px, 2.1vw, 24px); overflow-wrap: anywhere; line-height: 1.16; }
.ao-report-comparison { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--ao-soft); }
.ao-report-delta { color: #c6d1ff; font-weight: 680; }
#section-ai-office .ao-coverage { display: flex; flex-wrap: wrap; gap: 4px 9px; margin: 0; }
.ao-coverage strong { color: #f5cd96; font-size: 13px; font-weight: 690; }
.ao-coverage span { color: var(--ao-soft); }
#section-ai-office .ao-report-card h3 { font-size: 18px; }
.ao-chart-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ao-chart-inspector {
  display: grid; grid-template-columns: auto minmax(175px, 1fr) auto; align-items: center; gap: 5px;
  color: #dce5ff; font-size: 12px; font-variant-numeric: tabular-nums;
}
.ao-chart-inspector output { padding-inline: 5px; text-align: center; }
.ao-chart-inspector .ao-button { min-width: 33px; min-height: 32px; padding: 1px 5px; font-size: 17px !important; }
.ao-chart-inspector [aria-disabled=true] { opacity: .46; cursor: default; }
.ao-chart {
  --ao-plot-height: 150px;
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 10px;
  color: var(--ao-soft); font-size: 11px; font-variant-numeric: tabular-nums;
}
.ao-chart-axis { position: relative; min-width: max(24px, var(--axis-width)); height: var(--ao-plot-height); text-align: right; }
.ao-chart-axis span { position: absolute; right: 0; bottom: var(--level); transform: translateY(50%); white-space: nowrap; }
.ao-chart-plot, .ao-chart-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; grid-column: 2; }
.ao-chart-plot {
  height: var(--ao-plot-height); border-bottom: 1px solid #435477;
  background: repeating-linear-gradient(to bottom, #344460 0 1px, transparent 1px var(--grid-size));
}
.ao-chart-period { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); gap: clamp(1px, .27vw, 4px); }
.ao-chart-period + .ao-chart-period { box-shadow: -7px 0 0 -6px #6b7da3; }
.ao-chart-period button {
  --bar-color: var(--ao-period-base);
  display: flex; align-items: end; justify-content: center; min-width: 0; height: 100%;
  padding: 0; color: inherit; border: 0; border-radius: 3px 3px 0 0; background: transparent; cursor: pointer;
}
.ao-chart-period[data-period=current] button { --bar-color: var(--ao-period-current); }
.ao-chart-period button span {
  display: block; width: 100%; max-width: 34px; min-height: 2px; height: var(--height);
  background: var(--bar-color); border-radius: 3px 3px 0 0; pointer-events: none;
}
.ao-chart-period button[aria-pressed=true] { background: #c0cbff25; }
.ao-chart-period button[aria-pressed=true] span { background: #e4e6ff; }
.ao-chart-period button[data-zero=true] span { min-height: 1px; opacity: .65; }
.ao-chart-period button[data-missing=true] span { height: 0; background: none; border-bottom: 2px dotted #e6b778; }
.ao-chart-dates > div { display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; }
#section-ai-office .ao-chart-missing { font-size: 12px; }
.ao-daily-table th:first-child { min-width: auto; }
.ao-daily-table td:last-child, .ao-daily-table th:last-child { text-align: right; }
.ao-daily-table { margin-top: 9px; font-size: 13px; }
.ao-report-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; border-bottom: 1px solid var(--ao-line); }
.ao-report-tabs button {
  min-height: 40px; padding: 7px 11px; background: none; color: var(--ao-soft); border: 0; border-radius: 6px 6px 0 0;
  cursor: pointer; font-size: 13px !important; font-weight: 680 !important;
}
.ao-report-tabs button[aria-selected=true] { color: #ecefff; background: #273557; box-shadow: inset 0 -2px #a1aaff; }
.ao-report-tabs button:hover { color: #ecefff; }
.ao-breakdown { scroll-margin-block-start: 10px; }
.ao-report-finding { display: grid; gap: 11px; margin-top: 13px; }
#section-ai-office .ao-report-finding p { margin: 0; font-size: 14px; }
.ao-report-table { font-size: 14px; font-variant-numeric: tabular-nums; }
.ao-report-table :is(td, th) { padding: 11px 9px; }
.ao-report-table thead th { font-size: 12px; }
.ao-report-table tbody th { color: var(--ao-text); font-weight: 580; }
.ao-report-table :is(td, th):not(:first-child) { text-align: right; white-space: nowrap; }
.ao-report-table td:nth-child(3) { font-weight: 730; color: #edeeff; }
.ao-report-table td:last-child { color: #c4d2ff; }
.ao-report-table tbody tr:nth-child(even) { background: #1b294367; }
.ao-mobile-column { display: none; }
.ao-report .ao-hypothesis, .ao-report .ao-gap {
  padding: 9px 11px; margin: 0; border-radius: 6px; font-size: 13px; line-height: 1.48;
}
.ao-hypothesis { border-left: 2px solid var(--ao-violet); background: #ab8dff17; }
.ao-hypothesis strong { color: #dfd1ff; margin-right: 4px; }
.ao-gap { border-left: 2px solid var(--ao-amber); background: #f2c07d13; color: #ddc9ae; }
.ao-gap li { margin-left: 17px; }
.ao-gap li + li { margin-top: 5px; }
#section-ai-office .ao-snapshot { color: var(--ao-soft); font-size: 12px; }
.ao-report-details { padding: 10px 12px; }
.ao-report-details > summary { font-size: 13px !important; }
.ao-details { margin-top: 9px; padding: 8px 10px; border: 1px solid var(--ao-line); border-radius: 8px; }
.ao-details > summary, .ao-drawer-actions summary { color: var(--ao-text); font-size: 12px; font-weight: 680; cursor: pointer; }
.ao-task-list, .ao-draft-grid, .ao-events { margin-top: 9px; }
.ao-task-list > div { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.ao-task-list > div > strong { min-width: 140px; }
.ao-task-list .ao-status { margin-left: auto; }
.ao-events { padding-left: 22px; font-size: 12px; line-height: 1.6; color: var(--ao-soft); }
.ao-draft-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.ao-proposal { background: #101a2d; }
.ao-proposal .ao-panel-head { gap: 8px; }
.ao-proposal dl div { justify-content: start; }
.ao-proposal dt { flex: 0 0 90px; font-weight: 700; }
.ao-proposal dd { text-align: left; overflow-wrap: anywhere; }
.ao-proposal-actions { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 10px; }
.ao-flow { display: grid; grid-template-columns: repeat(var(--ao-layers, 5), minmax(130px, 1fr)); overflow: auto; align-items: center; gap: 16px; margin: 18px 0; }
.ao-flow > div { display: grid; gap: 7px; }
.ao-flow article { position: relative; min-height: 61px; border-color: #42517a; }
.ao-flow article::before, .ao-flow article::after { content: ""; display: block; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--ao-blue); top: 50%; }
.ao-flow article::before { left: -3px; }
.ao-flow article::after { right: -3px; }
.ao-flow strong, .ao-flow small { display: block; font-size: 12px; }
.ao-flow small { padding-top: 4px; }
.ao-flow-ports { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 7px; }
.ao-flow-ports .ao-button { min-height: 23px; padding: 2px 6px; font-size: 10px !important; }
.ao-flow-ports [aria-pressed=true] { border-color: #9babff; background: #394d89; }
.ao-dialog { box-sizing: border-box; color: var(--ao-text); border: 1px solid #44557b; border-radius: 13px; background: var(--ao-card);
  box-shadow: 0 15px 90px #070b17e0; width: min(475px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 17px; }
.ao-dialog::backdrop { background: #050a189e; backdrop-filter: blur(2px); }
.ao-dialog.ao-drawer { position: fixed; inset: 10px 10px 10px auto; margin: 0; max-height: none; width: min(410px, calc(100vw - 20px)); }
.ao-dialog-head { margin-bottom: 12px; }
.ao-dialog-head .ao-button { min-width: 32px; padding: 0; font-size: 17px !important; }
.ao-form { display: grid; gap: 11px; }
.ao-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ao-form-note { margin: 0 !important; font-size: 11px !important; }
.ao-check { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
.ao-search-results:empty { display: none; }
.ao-search-results { display: grid; gap: 3px; max-height: 135px; overflow: auto; }
.ao-search-results .ao-button { justify-content: flex-start; text-align: left; }
.ao-drawer-actions { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 8px; border-top: 1px solid var(--ao-line); }
.ao-drawer-actions > details { flex-basis: 100%; margin-top: 6px; }
.ao-agent-summary { display: flex; align-items: center; gap: 9px; }
.ao-agent-summary small { display: block; margin-top: 4px; }
.ao-dialog:has(.ao-finance-digest) { width: min(940px, calc(100vw - 24px)); }
.ao-dialog:has(.ao-finance-detail) { width: min(720px, calc(100vw - 24px)); }
.ao-dialog:has(.ao-finance-digest, .ao-finance-detail) {
  position: fixed; inset: 0; margin: auto; max-height: min(910px, calc(100dvh - 24px));
}
.ao-finance-lead {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 10px 16px; padding: 12px 14px; background: #1a2844; border: 1px solid #3a4b70; border-radius: 9px;
}
#section-ai-office .ao-finance-lead h3 { font-size: 19px; }
.ao-finance-lead .ao-field { min-width: 144px; }
.ao-finance-digest-list { list-style: none; padding: 0; margin: 11px 0 0; display: grid; gap: 7px; }
.ao-finance-product {
  display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(91px, 1fr));
  align-items: center; gap: 10px; text-align: left; width: 100%; padding: 8px 11px;
  background: #101a30; border: 1px solid var(--ao-line); border-radius: 8px;
  color: var(--ao-text); cursor: pointer; font-size: 13px !important;
}
.ao-finance-product:hover { border-color: var(--ao-blue); background: #172541; }
.ao-finance-product-name { min-width: 0; overflow-wrap: anywhere; }
.ao-finance-product-name > strong { display: block; line-height: 1.35; }
.ao-finance-product small { display: block; margin-top: 4px; }
.ao-finance-product-metric { min-width: 0; padding-left: 9px; border-left: 1px solid var(--ao-line); font-variant-numeric: tabular-nums; }
.ao-finance-product-metric small { margin: 0 0 4px; }
.ao-finance-product-metric strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.ao-finance-product-metric:nth-child(3) strong { color: #c4d2ff; }
.ao-finance-tag, .ao-finance-new {
  display: inline-block; margin: 5px 5px 0 0; border-radius: 5px; padding: 3px 6px;
  background: #8dacf11f; color: #d3ddff; font-size: 11px; line-height: 1.2;
}
.ao-finance-new, .ao-finance-tag[data-tone=warn] { color: #ffe3b8; background: #f2c07d26; }
.ao-finance-tag[data-tone=good] { color: #a7efcc; background: #51d5a528; }
.ao-finance-tag[data-tone=bad] { color: #ffbcc9; background: #ff829627; }
#section-ai-office .ao-finance-detail h3 { font-size: 18px; overflow-wrap: anywhere; }
.ao-finance-detail > .ao-gap { margin-top: 11px !important; padding: 8px; }
.ao-finance-result {
  margin-top: 13px; padding: 13px; border: 1px solid #5267a6; border-radius: 9px;
  background: radial-gradient(ellipse at 0 0, #354371, transparent 80%), #15233f;
}
.ao-finance-result[data-tone=bad] { border-color: #9c566a; }
.ao-finance-result-head { display: flex; gap: 5px 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ao-finance-result-head h4 { margin: 0; color: var(--ao-text); font-size: 15px; }
.ao-finance-result-head .ao-finance-tag { margin: 0; }
.ao-finance-result dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.ao-finance-result dl > div { min-width: 0; padding: 8px; background: #0c152984; border-radius: 6px; }
.ao-finance-result dt { font-size: 11px; color: var(--ao-soft); }
.ao-finance-result dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: clamp(16px, 2.6vw, 23px); font-weight: 740; font-variant-numeric: tabular-nums; }
.ao-finance-detail .ao-report-details > .ao-gap { margin-top: 8px; padding: 8px; }
.ao-finance-table th:first-child { min-width: 89px; }
.ao-finance-table :is(td, th):not(:first-child) { text-align: right; white-space: nowrap; }
.ao-finance-table th small { display: block; font-weight: 500; }
.ao-finance-best-step { background: #283753; }
.ao-finance-detail > .ao-finance-source { margin-bottom: 7px !important; }
@media(max-width: 570px) {
  .ao-finance-product { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 4px; padding: 9px 7px; }
  .ao-finance-product-name { grid-column: 1 / -1; }
  .ao-finance-product-metric { padding-left: 4px; }
  .ao-finance-product-metric strong { font-size: 13px; }
  .ao-finance-result dl { gap: 4px; }
  .ao-finance-result dl > div { padding: 5px; }
}

@media(max-width: 1100px) {
  .ao-workspace { grid-template-columns: minmax(0, 1fr); }
  .ao-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container office-report (max-width: 830px) {
  .ao-report-overview { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ao-report-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container office-report (max-width: 510px) {
  .ao-report-highlights > div { padding: 9px; }
  .ao-chart { --ao-plot-height: 112px; column-gap: 6px; }
  .ao-chart-inspector { width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; }
  .ao-chart-inspector .ao-button { min-width: 44px; min-height: 44px; }
  .ao-chart-plot, .ao-chart-dates { column-gap: 8px; }
  .ao-chart-period + .ao-chart-period { box-shadow: -5px 0 0 -4px #6b7da3; }
  .ao-report-tabs button { padding-inline: 8px; min-height: 36px; }
  .ao-report-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%);
  }
  .ao-report-table tbody, .ao-report-table tbody tr { display: grid; }
  .ao-report-table tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--ao-line); }
  .ao-report-table tbody th { grid-column: 1 / -1; }
  .ao-report-table tbody :is(th, td) { border: 0; padding: 6px 5px; }
  .ao-report-table tbody td:not(:first-child) { text-align: left; white-space: normal; font-size: 12px; overflow-wrap: anywhere; }
  .ao-mobile-column { display: block; color: var(--ao-soft); font-size: 10px; font-weight: 500; margin-bottom: 4px; }
}
@media(max-width: 760px) {
  .ao-shell { padding-top: 17px; }
  .ao-header { flex-direction: column; align-items: flex-start; gap: 9px; margin-bottom: 12px; }
  .ao-header-actions { justify-content: flex-start; }
  .ao-tabs button { padding: 6px 11px; }
  .ao-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .ao-stat { min-height: 62px; padding: 8px; gap: 7px; }
  .ao-stat-icon { flex-basis: 28px; width: 28px; height: 28px; }
  .ao-side { grid-template-columns: minmax(0, 1fr); }
  .ao-stage-head { gap: 7px; padding: 10px; }
  .ao-stage-head h2 { font-size: 15px !important; }
  .ao-viewport { min-height: 330px; height: 46vh; }
  .ao-camera { bottom: 9px; right: 6px; }
  .ao-panel-head { flex-wrap: wrap; }
  .ao-scene-help { display: none; }
}
@media(prefers-reduced-motion: reduce) {
  .ao-link.is-working { animation: none; }
}
