/* Web editor chrome. Scoped so imported page styles and colors stay untouched. */
[data-hve-toolbar] {
  --tool-blue: #2563eb;
  --tool-ink: #42516b;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 0;
  border-radius: 0;
  color: var(--tool-ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
[data-hve-toolbar] .hve-tb-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  flex-shrink: 0;
  padding: 5px 6px 4px;
  background: #f3f6fa;
  border: 1px solid #e8edf5;
  border-radius: 9px;
}
[data-hve-toolbar] .hve-group-controls { display: flex; align-items: center; gap: 3px; }
[data-hve-toolbar] .hve-group-caption { color: #8b98ac; font-size: 9px; font-weight: 500; line-height: 12px; text-align: center; letter-spacing: .5px; }
[data-hve-toolbar] button {
  width: 31px;
  height: 31px;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--tool-ink);
  background: transparent;
  overflow: visible;
  transition: background .12s, color .12s, box-shadow .12s;
}
[data-hve-toolbar] button svg { flex-shrink: 0; }
[data-hve-toolbar] button:not(:disabled):hover { color: #1d4ed8; background: #e4ecfb; }
[data-hve-toolbar] button:focus-visible { outline: 2px solid #93b4fa; outline-offset: 2px; }
[data-hve-toolbar] button.hve-type-control { width: auto; min-width: 46px; padding: 0 7px; gap: 5px; background: white; border-color: #e0e6ef; }
[data-hve-toolbar] button.hve-type-control svg { width: 12px; height: 12px; }
[data-hve-toolbar] button[data-action="font-family-menu"] { min-width: 78px; max-width: 104px; }
[data-hve-toolbar] .hve-tb-label { font-size: 11px; font-weight: 500; letter-spacing: 0; max-width: 66px; }
[data-hve-toolbar] button.hve-insert-control { width: auto; min-width: 65px; padding: 0 9px; gap: 5px; color: #2563eb; background: #e5edff; font-size: 12px; font-weight: 600; }
[data-hve-toolbar] button.hve-danger-control { color: #c35862; }
[data-hve-toolbar] button.hve-danger-control:not(:disabled):hover { background: #fce8ec; color: #c3334b; }
[data-hve-toolbar] .hve-color-indicator { position: absolute; bottom: 2px; left: 50%; width: 16px; height: 3px; transform: translateX(-50%); border-radius: 2px; box-shadow: 0 0 0 1px #1e3a5f12; }

/* Outer toolbar stays in the application header rather than floating over content. */
.toolbar-row { min-height: 79px; padding: 5px 12px; background: #fff; border-bottom: 1px solid #e4eaf4; justify-content: flex-start; }
.toolbar-row #toolbar { margin: 0 auto; scrollbar-width: thin; scrollbar-color: #c9d7ed transparent; }
.toolbar-row [data-hve-toolbar] { padding: 0; border: 0 !important; border-radius: 0; }
.toolbar-row [data-hve-toolbar] button { width: 31px; height: 31px; padding: 0; border: 1px solid transparent; }
.toolbar-row [data-hve-toolbar] button.hve-type-control { width: auto; padding: 0 7px; border-color: #e0e6ef; }
.toolbar-row [data-hve-toolbar] button.hve-insert-control { width: auto; padding: 0 9px; }
.toolbar-row #selection-tip { display: none; }
#toolbar [data-hve-toolbar] button:disabled { opacity: .3; background: transparent !important; filter: grayscale(1); cursor: not-allowed; box-shadow: none !important; transform: none !important; }
#toolbar [data-hve-toolbar] button.hve-active:not(:disabled) { color: white; background: #2563eb; box-shadow: 0 2px 5px #2563eb25; border-color: #1d58dc; }
#toolbar [data-hve-toolbar] button.hve-active:not(:disabled):hover { color: white; background: #1d4ed8; }
#toolbar [data-hve-toolbar] button.hve-mixed:not(:disabled) { background: repeating-linear-gradient(135deg,#dce8ff,#dce8ff 3px,#eff4ff 3px,#eff4ff 6px); color: #2563eb; }
.mode.editing { color: #2563eb; }
#toolbar-tooltip { position: fixed; z-index: 100; max-width: min(340px, calc(100vw - 16px)); padding: 8px 11px; border: 1px solid #dce5f2; border-radius: 6px; background: #fff; color: #42516b; box-shadow: 0 4px 16px #213a6426; font: 12px/1.6 "Microsoft YaHei UI", sans-serif; pointer-events: none; overflow-wrap: anywhere; }
#toast, #toast.error, [data-hve-toast], [data-hve-multi-toast] { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; box-shadow: 0 4px 16px #1e40af14; }
[data-hve-multi-toast] b { color: #1e40af; }
[data-hve-multi-toast] { max-width: calc(100vw - 24px); padding: 12px; border-radius: 9px; font: 12px/1.6 "Microsoft YaHei UI", "PingFang SC", sans-serif; }
[data-hve-multi-toast] .hve-multi-actions { --multi-blue: #2563eb; flex-wrap: wrap; gap: 3px; }
[data-hve-multi-toast] .hve-multi-actions button { width: 31px; height: 31px; border: 1px solid transparent; border-radius: 6px; color: #000; }
[data-hve-multi-toast] .hve-multi-actions button:not(:disabled):hover { background: #e4ecfb; color: #000; }
[data-hve-multi-toast] .hve-multi-actions button:disabled { opacity: .3; cursor: not-allowed; }
[data-hve-multi-toast] .hve-multi-actions button:focus-visible { outline: 2px solid #93b4fa; outline-offset: 2px; }
[data-hve-multi-toast] .hve-multi-sep { background: #dce5f2; }
[data-hve-multi-toast] .hve-multi-hint { color: #8b98ac; }
[data-hve-multi-tooltip] { position: fixed; z-index: 2147483647; max-width: min(340px, calc(100vw - 16px)); padding: 8px 11px; border: 1px solid #dce5f2; border-radius: 6px; background: #fff; color: #42516b; box-shadow: 0 4px 16px #213a6426; font: 12px/1.6 "Microsoft YaHei UI", sans-serif; pointer-events: none; overflow-wrap: anywhere; }

[data-hve-dropdown] { background: white; border-color: #dce5f2; border-radius: 9px; box-shadow: 0 8px 28px #213a6426; }
[data-hve-dropdown] .hve-dd-item { color: #42516b; border-radius: 5px; }
[data-hve-dropdown] .hve-dd-item:hover { background: #edf3ff; color: #2563eb; }
[data-hve-dropdown] .hve-dd-divider { background: #e7edf5; }
.hve-insert-menu[data-hve-dropdown] { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; width: 246px; padding: 8px; font-family: "Microsoft YaHei UI", sans-serif; }
.hve-insert-menu .hve-dd-divider { display: none; }
.hve-insert-menu .hve-dd-item { display: flex; align-items: center; gap: 9px; padding: 11px 10px; border: 1px solid #e0e6ef; background: #f3f6fa; font: 12px/18px "Microsoft YaHei UI", sans-serif; text-align: left; cursor: pointer; }
.hve-insert-menu .hve-dd-item:hover { border-color: #abc5fa; background: #e5edff; }
.hve-insert-menu .hve-dd-item:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.hve-insert-menu .hve-dd-icon { display: flex; width: 18px; color: #000; }
[data-hve-dropdown].hve-host-dropdown { display: flex; flex-direction: column; overflow: hidden; }
[data-hve-dropdown].hve-radius-menu { box-sizing: border-box; width: 92px; min-width: 0; }
.hve-host-dropdown > .hve-dd-scroll { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c9d7ed transparent; }
.hve-host-dropdown.hve-insert-menu > .hve-dd-scroll { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.hve-dd-section { padding: 9px 6px 5px; color: #68788e; font: 11px/16px "Microsoft YaHei UI", sans-serif; }
.hve-insert-menu .hve-dd-section { grid-column: 1 / -1; }
.hve-insert-menu .hve-dd-item:has(.hve-template-preview) { flex-wrap: wrap; gap: 7px; padding: 8px; white-space: normal; }
.hve-template-preview { position: relative; display: block; width: 100%; height: 46px; overflow: hidden; border-radius: 4px; background: #fff; pointer-events: none; }
.hve-template-preview > * { transform: scale(.32); transform-origin: top left; pointer-events: none; }
.hve-template-preview > .hve-chart-kpi-grid { transform: scale(.22); }
.hve-template-preview > .hve-chart-metric-row,
.hve-template-preview > .hve-chart-comparison,
.hve-template-preview > .hve-chart-table-header { transform: scale(.25); }
.hve-insert-menu .hve-dd-item small { display: block; margin-top: 2px; color: #738197; font-size: 10px; line-height: 15px; }
[data-hve-typography].hve-host-dropdown { transform: translateX(-50%); animation: none; width: 254px; padding: 8px; color: #42516b; font: 12px/18px "Microsoft YaHei UI", sans-serif; }
.hve-setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 6px; }
.hve-setting-row > span:last-child { display: flex; align-items: center; gap: 5px; }
.hve-setting-row input, .hve-setting-row select { width: 116px; min-width: 0; height: 32px; padding: 4px 7px; border: 1px solid #dbe5f3; border-radius: 6px; background: #fff; color: #334155; font: inherit; }
.hve-setting-row input[type="number"] { width: 88px; }
.hve-setting-row input:focus, .hve-setting-row select:focus { outline: 2px solid #abc5fa; outline-offset: 1px; }
.hve-setting-row input[type="color"] { padding: 3px; cursor: pointer; }
.hve-settings-help { margin: 6px; color: #7c8ca3; font-size: 11px; line-height: 1.6; }
[data-hve-toolbar] .hve-font-size-control { display: flex; align-items: center; height: 31px; background: white; border: 1px solid #e0e6ef; border-radius: 6px; overflow: hidden; }
[data-hve-toolbar] .hve-font-size-control:focus-within { outline: 2px solid #93b4fa; outline-offset: 1px; }
[data-hve-toolbar] [data-role="font-size-input"] { box-sizing: border-box; width: 40px; height: 29px; min-width: 0; padding: 0 3px 0 6px; border: 0; outline: none; background: transparent; color: #42516b; font: 11px "Microsoft YaHei UI", sans-serif; appearance: textfield; }
[data-hve-toolbar] [data-role="font-size-input"]::-webkit-inner-spin-button,
[data-hve-toolbar] [data-role="font-size-input"]::-webkit-outer-spin-button { appearance: none; margin: 0; }
[data-hve-toolbar] [data-role="font-size-input"]:disabled { opacity: .35; }
[data-hve-toolbar] button.hve-size-dropdown { width: 18px; height: 29px; border: 0; border-radius: 0; }
[data-hve-toolbar] button.hve-size-dropdown svg { width: 12px; height: 12px; }
[data-hve-color-panel].hve-host-dropdown { width: 250px; padding: 12px; font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; }
[data-hve-color-panel] .hve-cp-title { color: #42516b; }
[data-hve-color-panel] .hve-cp-swatch { box-sizing: border-box; width: 100%; }
[data-hve-placement] { position: fixed !important; inset: 0 !important; z-index: 2147483647 !important; cursor: crosshair !important; background: transparent !important; }
[data-visual-shape="line"][data-hve-selected],
[data-visual-shape="arrow"][data-hve-selected],
[data-visual-shape="line"][data-hve-hovered],
[data-visual-shape="arrow"][data-hve-hovered] { outline: none !important; }
[data-visual-shape="line"][data-hve-selected]::before,
[data-visual-shape="arrow"][data-hve-selected]::before { display: none !important; }
[data-visual-shape="line"][data-hve-hovered] path,
[data-visual-shape="arrow"][data-hve-hovered] path { stroke: #2563eb; stroke-dasharray: 4 3; }
[data-hve-placement] .hve-placement-hint { position: fixed; left: 16px; top: 16px; pointer-events: none; padding: 8px 12px; background: #2563eb; border: 1px solid #1d4ed8; border-radius: 6px; color: white; box-shadow: 0 3px 12px #1e3a5f26; white-space: nowrap; font: 12px/18px "Microsoft YaHei UI", sans-serif; }
[data-hve-selected]:not(td):not(th):not(tr)::before { background: #2563eb; border-radius: 4px 4px 0 0; opacity: 1; }

[data-hve-context-menu] { box-sizing: border-box; width: 220px; min-width: 0; padding: 6px; overflow-y: auto; background: #fff; border: 1px solid #e0e6ef; border-radius: 9px; box-shadow: 0 8px 28px #213a6426; color: #000; font: 13px/1.5 "Microsoft YaHei UI", "PingFang SC", sans-serif; transform: none; animation: hve-context-menu-in .12s ease; }
[data-hve-context-menu] .hve-cm-item,
[data-hve-context-menu] .hve-cm-item.danger { gap: 9px; padding: 8px 10px; border-radius: 6px; color: #000; white-space: nowrap; }
[data-hve-context-menu] .hve-cm-item:not(.disabled):hover { color: #000; background: #f3f6fa; }
[data-hve-context-menu] .hve-cm-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; color: #000; }
[data-hve-context-menu] .hve-cm-shortcut { color: #000; font: 11px/1.5 "Microsoft YaHei UI", sans-serif; }
[data-hve-context-menu] .hve-cm-divider { margin: 4px 6px; background: #e7edf5; }
@keyframes hve-context-menu-in { from { opacity: 0; } to { opacity: 1; } }
[data-hve-table-handle] {
  position: fixed;
  width: 40px;
  height: 30px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 2147483644;
}
[data-hve-table-handle] button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  padding: 0;
  border: 1px solid #e0e6ef;
  border-radius: 6px;
  background: #f3f6fa;
  color: #42516b;
  cursor: pointer;
}
[data-hve-table-handle] button:hover {
  border-color: #abc5fa;
  background: #e4ecfb;
  color: #1d4ed8;
}
[data-hve-table-handle] button:focus-visible {
  outline: 2px solid #93b4fa;
  outline-offset: 2px;
}
[data-hve-table-outline] {
  position: fixed;
  box-sizing: border-box;
  outline: 2px dashed #2563eb;
  outline-offset: 2px;
  pointer-events: none;
  z-index: 2147483643;
}
