:root {
  --bg: #f7f8fb;
  --ink: #0f172a;
  --line: #dbe2ef;
  --muted: #8a98b2;
  --nav-bg: #f1f3f9;
  --nav-dark: rgba(7, 17, 45, 0.92);
  --ai-bg: rgba(255, 255, 255, 0.96);
  --dock-bg: #0a1738;
  --brand-primary: var(--color-primary, #1F4DFF);
  --brand-primary-hover: var(--color-primary-600, #183ECC);

  --header-h: 66px;
  --module-tabs-h: 42px;
  --dock-h: 46px;
  --left-expanded: 220px;
  --left-collapsed: 74px;
  --right-w: 500px;

  --anim: 240ms cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.hidden { display: none !important; }

.vs-app { overflow: hidden; }
.vs-shell {
  height: calc(100vh - var(--dock-h));
  display: grid;
  grid-template-columns: var(--left-expanded) 1fr 0;
  transition: grid-template-columns var(--anim);
  position: relative;
}
.vs-app[data-left-open="0"] .vs-shell { grid-template-columns: var(--left-collapsed) 1fr 0; }
.vs-app[data-right-open="1"] .vs-shell { grid-template-columns: var(--left-expanded) 1fr minmax(360px, var(--right-w)); }
.vs-app[data-left-open="0"][data-right-open="1"] .vs-shell { grid-template-columns: var(--left-collapsed) 1fr minmax(360px, var(--right-w)); }

.vs-nav {
  background: var(--nav-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--anim), transform var(--anim);
}
.vs-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: var(--header-h);
  padding: 0 10px;
  border-bottom: 1px solid #d7deec;
}
.vs-brand-btn {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
.vs-brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.vs-brand-name { font-size: 1.1rem; white-space: nowrap; }
.vs-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6c7a93;
  cursor: pointer;
  font-size: 14px;
}
.vs-icon-btn:hover { background: #e6ebf5; color: #1f2b44; }

.vs-nav-links { padding: 8px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.vs-nav-link {
  text-decoration: none;
  color: #4b5b75;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}
.vs-nav-link i { width: 18px; text-align: center; color: #8fa0ba; font-size: 14px; }
.vs-nav-link:hover { background: #e7ecf6; color: #1f2b44; }
.vs-nav-link.active { background: #dbe2ee; color: #1f2b44; font-weight: 800; }
.vs-nav-link.active i { color: #4d59e6; }
.vs-nav-divider { border-top: 1px solid #d5ddeb; margin: 6px 6px; }

.vs-app[data-left-open="0"] .vs-brand-name,
.vs-app[data-left-open="0"] .vs-nav-link span,
.vs-app[data-left-open="0"] #vsLeftCollapse { display: none; }
.vs-app[data-left-open="0"] .vs-nav-head { justify-content: center; padding: 0 6px; }
.vs-app[data-left-open="0"] .vs-brand-btn { justify-content: center; width: 100%; }
.vs-app[data-left-open="0"] .vs-nav-link { justify-content: center; padding: 9px; position: relative; }
.vs-app[data-left-open="0"] .vs-nav-link:hover::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 40;
}

.vs-main-col { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.vs-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  position: relative;
  z-index: 8;
}
.vs-header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vs-project-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: inherit;
}
.vs-project-title {
  font-size: clamp(14px, 1.6vw, 19px);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-project-toggle i {
  font-size: 11px;
  color: #627391;
  flex: 0 0 auto;
}
.vs-project-menu {
  position: absolute;
  left: 14px;
  top: 58px;
  width: min(420px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid #dfe5f2;
  border-radius: 12px;
  box-shadow: 0 18px 28px rgba(17, 24, 39, 0.14);
  z-index: 30;
  padding: 8px;
}
.vs-project-menu-label {
  color: #7f8da7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 8px;
}
.vs-project-item {
  display: block;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #243149;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-project-item:hover { background: #eff3fb; }
.vs-project-item.active { color: var(--brand-primary); font-weight: 700; }
.vs-project-divider { border-top: 1px solid #e5eaf4; margin: 6px 0; }
.vs-header-right { display: flex; align-items: center; gap: 10px; }
.vs-header-link, .vs-link-btn {
  color: #627391;
  text-decoration: none;
  font-weight: 600;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}
.vs-header-link:hover, .vs-link-btn:hover { color: #1f2b44; }
.vs-inline-form { margin: 0; }
.vs-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #0a1738;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-size: 10px;
}
.vs-assistant-trigger {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid #ced8f4;
  background: #eef2ff;
  color: #7c73e6;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
}
.vs-wand-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
}
.vs-wand-icon--header { width: 18px; height: 18px; }
.vs-wand-icon--panel { width: 19px; height: 19px; }
.vs-avatar-menu {
  position: absolute;
  right: 84px;
  top: 58px;
  background: #fff;
  border: 1px solid #dfe5f2;
  border-radius: 10px;
  box-shadow: 0 18px 28px rgba(17, 24, 39, 0.14);
  min-width: 180px;
  z-index: 30;
  padding: 6px;
}
.vs-avatar-item { display: flex; align-items: center; gap: 10px; padding: 8px; text-decoration: none; color: #243149; border-radius: 8px; font-size: 12px; }
.vs-avatar-item:hover { background: #eff3fb; }
.vs-avatar-item.danger { color: #b42318; }

.vs-module-tabs {
  height: var(--module-tabs-h);
  border-bottom: 1px solid var(--line);
  background: #f3f5f9;
  padding: 0 14px;
  display: flex;
  align-items: center;
}
.vs-module-tabs-scroll {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
}
.vs-module-name {
  display: inline-flex;
  align-items: center;
  height: var(--module-tabs-h);
  color: #7f8da7;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 10px;
  font-weight: 700;
  margin-right: 8px;
  padding-right: 14px;
  border-right: 1px solid #d6ddeb;
  transform: translateY(-1px);
}
.vs-module-tab {
  display: inline-flex;
  align-items: center;
  height: var(--module-tabs-h);
  text-decoration: none;
  color: #697892;
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px;
  border-bottom: 2px solid transparent;
}
.vs-module-tab:hover { color: #3e4f6d; }
.vs-module-tab.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}

.vs-content {
  height: calc(100vh - var(--header-h) - var(--module-tabs-h) - var(--dock-h));
  overflow: auto;
  padding: 10px 12px 12px;
  min-width: 0;
}

.vs-budget-card { background: #f7f9fd; border: 1px solid #dce3f1; border-radius: 18px; overflow: hidden; }
.vs-budget-head { padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vs-budget-head h2 { margin: 0 0 4px; font-size: clamp(18px, 2vw, 24px); line-height: 1.2; }
.vs-budget-head p { margin: 0; color: var(--muted); font-size: 12px; max-width: 760px; }
.vs-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #d3dced;
  background: #ffffff;
  color: #5f7190;
  border-radius: 9px;
  height: 36px;
  min-width: 80px;
  padding: 0 10px;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--anim), color var(--anim), background-color var(--anim), box-shadow var(--anim);
}
.vs-reset-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: #f8fbff;
}
.vs-reset-btn:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 255, 0.15);
}
.vs-budget-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vs-module-placeholder-wrap { padding: 0 16px 16px; }
.vs-module-placeholder-card {
  border: 1px solid #d7dfef;
  border-radius: 12px;
  background: #fdfefe;
  padding: 16px;
}
.vs-module-placeholder-card p {
  margin: 0;
  color: #4b5b75;
  font-size: 13px;
  line-height: 1.5;
}
.vs-settings-wrap { padding: 0 16px 16px; }
.vs-settings-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.vs-settings-input,
.vs-settings-select {
  border: 1px solid #d0d9ec;
  border-radius: 10px;
  height: 36px;
  padding: 0 10px;
  font-size: 12px;
  color: #273247;
  background: #fff;
}
.vs-settings-input { min-width: 260px; flex: 1 1 320px; }
.vs-settings-select { min-width: 140px; }
.vs-settings-select--small { min-width: 104px; }
.vs-settings-stats {
  font-size: 12px;
  color: #4b5b75;
  margin-bottom: 10px;
}
.vs-standard-table-wrap {
  margin: 0 16px 16px;
  border: 1px solid #d7dfef;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}
.vs-standard-table-wrap--flush {
  margin-left: 0;
  margin-right: 0;
}
.vs-standard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}
.vs-standard-table th,
.vs-standard-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dfe5f2;
  text-align: left;
  font-size: 12px;
  color: #273247;
}
.vs-standard-table thead th {
  background: #dfe7f3;
  font-weight: 700;
  color: #1f2937;
  border-bottom: 1px solid #c4d1e4;
}
.vs-standard-table thead th:first-child { border-top-left-radius: 10px; }
.vs-standard-table thead th:last-child { border-top-right-radius: 10px; }
.vs-standard-table tbody tr:nth-child(even) td { background: #edf2f8; }
.vs-standard-table tbody tr:nth-child(odd) td { background: #ffffff; }
.vs-standard-table tbody tr:last-child td { border-bottom: 0; }
.vs-settings-pagination {
  margin: 0 16px 10px;
  color: #4b5b75;
  font-size: 12px;
}
.vs-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.vs-filter-input,
.vs-filter-select {
  border: 1px solid #d0d9ec;
  border-radius: 10px;
  height: 36px;
  padding: 0 10px;
  font-size: 12px;
  color: #273247;
  background: #fff;
}
.vs-filter-input { min-width: 260px; flex: 1 1 320px; }
.vs-filter-select { min-width: 140px; }
.vs-filter-select--small { min-width: 104px; }
.vs-filter-button,
.vs-filter-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #d3dced;
  background: #ffffff;
  color: #5f7190;
  border-radius: 9px;
  height: 36px;
  min-width: 80px;
  padding: 0 10px;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--anim), color var(--anim), background-color var(--anim), box-shadow var(--anim);
}
.vs-filter-button:hover,
.vs-filter-button-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: #f8fbff;
}
.vs-filter-button:focus-visible,
.vs-filter-button-secondary:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 255, 0.15);
}
.vs-card {
  border: 1px solid #d7dfef;
  border-radius: 12px;
  background: #fdfefe;
  padding: 14px;
}
.vs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.vs-kpi-card {
  border: 1px solid #d7dfef;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
}
.vs-kpi-label {
  color: #7f8da7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  font-weight: 700;
}
.vs-kpi-value {
  margin-top: 5px;
  color: #1e2a41;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.vs-kpi-subtext {
  margin-top: 3px;
  color: #63738f;
  font-size: 11px;
}
.vs-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.vs-chart-card {
  border: 1px solid #d7dfef;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  min-width: 0;
}
.vs-chart-card--full { grid-column: 1 / -1; }
.vs-chart-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #25324a;
}
.vs-chart-wrap {
  position: relative;
  height: 240px;
}
.vs-chart-wrap--short { height: 220px; }
.vs-data-table-wrap {
  margin: 0;
  border: 1px solid #d7dfef;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}
.vs-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 820px;
}
.vs-data-table th,
.vs-data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dfe5f2;
  text-align: left;
  font-size: 12px;
  color: #273247;
}
.vs-data-table thead th {
  background: #dfe7f3;
  font-weight: 700;
  color: #1f2937;
  border-bottom: 1px solid #c4d1e4;
}
.vs-data-table thead th:first-child { border-top-left-radius: 10px; }
.vs-data-table thead th:last-child { border-top-right-radius: 10px; }
.vs-data-table tbody tr:nth-child(even) td { background: #edf2f8; }
.vs-data-table tbody tr:nth-child(odd) td { background: #ffffff; }
.vs-data-table tbody tr:last-child td { border-bottom: 0; }
.vs-variance-positive { color: #b42318; font-weight: 700; }
.vs-variance-negative { color: #067647; font-weight: 700; }
.vs-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}
.vs-status-ontrack { background: #e8f7ef; color: #067647; border: 1px solid #b7e7ca; }
.vs-status-overbudget { background: #fff1f1; color: #b42318; border: 1px solid #f6c0c0; }
.vs-status-watch { background: #fff8e6; color: #a15c00; border: 1px solid #f2dfad; }
.vs-export-note {
  margin-top: 10px;
  color: #7b8aa4;
  font-size: 11px;
}
.vs-mermaid-card {
  border: 1px solid #d7dfef;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  margin-bottom: 12px;
}
.vs-mermaid-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #25324a;
}
.vs-mermaid-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #dfe5f2;
  border-radius: 10px;
  background: #fbfdff;
  padding: 10px;
}
.vs-mermaid-scroll .mermaid {
  min-width: 980px;
  width: max-content;
}
.vs-visual-card {
  border: 1px solid #d7dfef;
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 12px;
}
.vs-visual-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #dfe5f2;
}
.vs-visual-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #25324a;
}
.vs-visual-card-subtitle {
  margin: 4px 0 0;
  font-size: 11px;
  color: #6f7f99;
}
.vs-visual-card-toggle {
  border: 1px solid #cfd9ee;
  border-radius: 10px;
  background: #fff;
  color: #41506b;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.vs-visual-card-toggle:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.vs-visual-card-body {
  padding: 12px;
}
.vs-visual-card.is-collapsed .vs-visual-card-header {
  border-bottom: 0;
}
.vs-visual-card.is-collapsed .vs-visual-card-body {
  padding: 0;
  height: 0;
  overflow: hidden;
}
.vs-visual-card-body.is-collapsed > * {
  display: none;
}
.vs-calendar-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #dfe5f2;
  border-radius: 10px;
  background: #fbfdff;
}
.vs-calendar-shell {
  min-width: 900px;
  padding: 8px;
}
#vsDeliveryCalendar {
  min-height: 380px;
}
#vsDeliveryCalendar {
  font-size: 12px;
  color: #25324a;
  --fc-border-color: #d4deed;
  --fc-page-bg-color: #fbfdff;
  --fc-neutral-bg-color: #f7faff;
  --fc-neutral-text-color: #4b5b77;
  --fc-today-bg-color: #f5f8ff;
  --fc-button-bg-color: #ffffff;
  --fc-button-border-color: #bdd0ea;
  --fc-button-text-color: #5c6f8e;
  --fc-button-hover-bg-color: #f5f8ff;
  --fc-button-hover-border-color: #1f4dff;
  --fc-button-active-bg-color: #1f4dff;
  --fc-button-active-border-color: #1f4dff;
  --fc-button-active-text-color: #ffffff;
}
#vsDeliveryCalendar .fc-toolbar-title {
  font-size: 12px;
  font-weight: 800;
  color: #24324a;
}
#vsDeliveryCalendar .fc-button {
  background: #fff !important;
  border: 1px solid #bdd0ea !important;
  color: #5c6f8e !important;
  text-transform: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 10px !important;
  padding: 0.38rem 0.62rem !important;
  box-shadow: none !important;
}
#vsDeliveryCalendar .fc-button:hover,
#vsDeliveryCalendar .fc-button.fc-button-active {
  border-color: var(--brand-primary) !important;
  color: var(--brand-primary) !important;
  background: #f5f8ff !important;
}
#vsDeliveryCalendar .fc-button-primary:not(:disabled).fc-button-active,
#vsDeliveryCalendar .fc-button-primary:not(:disabled):active {
  border-color: var(--brand-primary) !important;
  color: #ffffff !important;
  background: var(--brand-primary) !important;
}
#vsDeliveryCalendar .fc-button-group .fc-button.fc-button-active {
  color: #ffffff !important;
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
#vsDeliveryCalendar .fc-daygrid-day-number {
  color: #4b5b77;
  font-size: 12px;
}
#vsDeliveryCalendar .fc-col-header-cell-cushion {
  color: #4b5b77;
  font-weight: 700;
  font-size: 12px;
  text-transform: none;
}
#vsDeliveryCalendar .fc-event {
  border: 0;
  border-radius: 6px;
  padding: 1px 4px;
  font-size: 11px;
  font-weight: 700;
}
.vs-fc-done { background: #16824f !important; color: #fff !important; }
.vs-fc-ontrack { background: #3559d7 !important; color: #fff !important; }
.vs-fc-scheduled { background: #64748b !important; color: #fff !important; }
.vs-fc-watch { background: #b7791f !important; color: #fff !important; }
.vs-fc-risk { background: #b42318 !important; color: #fff !important; }
.vs-role-chip {
  display: inline-block;
  background: #eaf0fc;
  color: #334155;
  border: 1px solid #d5deef;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  font-size: 11px;
}

.vs-table-wrap { overflow: auto; }
.vs-budget-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #f3f5f9;
}
.vs-budget-table th, .vs-budget-table td { border: 1px solid #cfd7e5; padding: 8px 10px; font-size: 12px; }
.vs-budget-table .vs-title-row th {
  background: #09173a;
  color: #fff;
  font-size: 13px;
  letter-spacing: 2px;
  text-align: center;
  border-color: #09173a;
}
.vs-budget-table thead tr:nth-child(2) th { background: #c9d2cb; font-size: 12px; }
.vs-budget-table td:first-child { min-width: 300px; font-size: 12px; color: #39475f; }
.vs-budget-table td input { width: 100%; border: 0; background: transparent; font: inherit; color: #273247; text-align: center; }
.vs-budget-table td input:focus { outline: 2px solid rgba(31,77,255,.25); border-radius: 6px; }
.vs-budget-table .group td { background: #cfd4db; color: #36445b; font-weight: 800; letter-spacing: 1px; }
.vs-budget-table .total-row td { font-weight: 800; }
.vs-budget-table .muted { color: var(--muted); font-weight: 600; }

.vs-ai {
  background: var(--ai-bg);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--anim), opacity var(--anim);
}
.vs-app[data-right-open="1"] .vs-ai { transform: translateX(0); opacity: 1; pointer-events: auto; }
.vs-ai-head { height: var(--header-h); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.vs-ai-title { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 800; color: #25314a; }
.vs-ai-title .vs-wand-icon { display: inline-block; }
.vs-ai-macros { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.vs-ai-macros h3 { margin: 0 0 8px; color: #8b97ae; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; }
.vs-macro-btn {
  width: 100%; border: 1px solid #cfd9ee; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
  background: #fff; display: flex; align-items: center; justify-content: space-between; color: #3d45ca; font-size: 13px; font-weight: 700; cursor: pointer;
}
.vs-macro-btn.secondary { background: #eef2f7; color: #36445c; }
.vs-ai-chat { padding: 12px 14px 8px; overflow: auto; }
.vs-ai-chat h4 { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 2px; color: #8b97ae; font-size: 11px; }
.vs-ai-bubble { border: 1px solid #d5deef; border-radius: 14px; padding: 12px; background: #fff; color: #3b4a62; font-size: 12px; }
.vs-ai-time { color: #8fa0ba; margin-top: 8px; font-size: 11px; }
.vs-ai-input-wrap { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.vs-ai-input { flex: 1; border: 1px solid #d0d9ec; border-radius: 12px; height: 42px; padding: 0 12px; font-size: 13px; }
.vs-ai-send { width: 42px; height: 42px; border: 0; border-radius: 12px; background: linear-gradient(160deg, #5b56ed, #3b46f2); color: #fff; font-size: 14px; }

.vs-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--dock-h);
  background: var(--dock-bg);
  border-top: 1px solid #13224b;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  z-index: 50;
}
.vs-dock-item {
  border: 0;
  background: transparent;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  min-width: 118px;
  padding: 0 2px;
}
.vs-dock-item i { font-size: 12px; }
.vs-dock-item .vs-wand-icon { width: 14px; height: 14px; }
.vs-wand-icon--dock {
  filter: brightness(0) invert(1);
  opacity: 1;
}
.vs-dock-item.active { color: #ffffff; }
.vs-dock-item:hover { color: #c1cee3; }
.vs-dock-item:hover .vs-wand-icon--dock { opacity: 0.78; }

.vs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 17, 45, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--anim);
  z-index: 35;
}
.vs-backdrop.show { opacity: 1; pointer-events: auto; }

.vs-swal-popup {
  border-radius: 12px;
  padding: 12px 18px 22px;
}
.vs-swal-popup .swal2-title {
  color: #4b5565;
  font-weight: 700;
  font-size: 1.85rem;
  margin: 0.2rem 0 0.55rem;
}
.vs-swal-popup .swal2-html-container {
  margin: 0.5rem 0 0.9rem;
  padding: 0 0.35rem;
}
.vs-swal-popup .swal2-icon {
  margin: 0.9rem auto 0.45rem;
  transform: scale(0.82);
  transform-origin: top center;
}
.vs-swal-popup .swal2-textarea {
  width: 100% !important;
  margin: 0.55rem 0 0;
  border: 1px solid #cfd6e6;
  border-radius: 8px;
  color: #334155;
}
.vs-swal-popup .swal2-textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 255, 0.15);
}
.vs-swal-popup input[type="radio"] {
  accent-color: var(--brand-primary);
}
.vs-swal-popup .swal2-actions {
  margin: 1.1rem auto 0.45rem;
}
.vs-swal-popup .swal2-confirm {
  background: var(--brand-primary) !important;
}
.vs-swal-popup .swal2-confirm:hover {
  background: var(--brand-primary-hover) !important;
}
.vs-swal-popup .swal2-close {
  width: 28px;
  height: 28px;
  font-size: 18px;
  color: #94a3b8;
  right: 8px;
  top: 8px;
}
.vs-swal-popup .swal2-close:hover {
  color: #475569;
  background: #eff3fb;
}

.vs-swal-text {
  margin: 0 0 1.25rem;
  color: #6b7280;
  font-size: 0.95rem;
}
.vs-swal-type {
  text-align: center;
  margin-bottom: 0.75rem;
}
.vs-swal-type label {
  margin: 0 6px;
  font-size: 1.05rem;
  color: #4b5565;
}
.vs-swal-calendar-detail {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #3f4b5f;
}

.vs-mobile-only { display: none; }

.vs-flash-stack {
  margin: 12px 12px 0;
  display: grid;
  gap: 8px;
}
.vs-alert {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d0d7e6;
  font-size: 0.95rem;
}
.vs-alert-error { background: #fff5f5; border-color: #f5c2c7; color: #842029; }
.vs-alert-warning { background: #fff8e6; border-color: #ffecb5; color: #664d03; }
.vs-alert-success { background: #e6ffed; border-color: #badbcc; color: #0f5132; }
.vs-alert-info { background: #eef6ff; border-color: #b6d4fe; color: #084298; }

@media (min-width: 981px) {
  .vs-nav-link { font-size: calc(11px + 0.1rem); }
  .vs-dock-item { font-size: calc(10px + 0.1rem); }
}

@media (max-width: 980px) {
  :root { --header-h: 64px; --module-tabs-h: 40px; --dock-h: 66px; }

  .vs-shell { display: block; height: calc(100vh - var(--dock-h)); }

  .vs-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: var(--dock-h);
    width: 90vw;
    max-width: 420px;
    background: var(--nav-dark);
    color: #dce6fb;
    border-right: 0;
    transform: translateX(-100%);
    z-index: 41;
  }
  .vs-nav .vs-brand-btn, .vs-nav .vs-brand-name { color: #fff; }
  .vs-nav .vs-icon-btn { color: #aebce0; }
  .vs-nav .vs-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
  .vs-nav .vs-nav-link { color: #c7d4ef; }
  .vs-nav .vs-nav-link i { color: #8ca1c9; }
  .vs-nav .vs-nav-link.active { background: rgba(88, 88, 239, 0.28); color: #fff; }
  .vs-app.mobile-left-open .vs-nav { transform: translateX(0); }

  .vs-ai {
    position: fixed;
    right: 0;
    top: 0;
    bottom: var(--dock-h);
    width: 90vw;
    border-left: 0;
    z-index: 42;
    transform: translateX(100%);
    background: rgba(255,255,255,0.9);
  }
  .vs-app.mobile-right-open .vs-ai { transform: translateX(0); opacity: 1; pointer-events: auto; }

  .vs-main-col { border-right: 0; }
  .vs-header { padding: 0 10px; }
  .vs-project-toggle { max-width: calc(100vw - 180px); }
  .vs-project-title { font-size: 12px; }
  .vs-project-toggle i { font-size: 10px; }
  .vs-project-menu { left: 10px; top: 56px; width: min(360px, calc(100vw - 20px)); }
  .vs-header-right .vs-header-link,
  .vs-header-right .vs-link-btn { display: none; }
  .vs-mobile-only.vs-icon-btn { width: 42px; height: 42px; align-items: center; justify-content: center; }
  .vs-mobile-only.vs-icon-btn i { font-size: 20px; }
  #vsMobileMenuBtn { margin-top: 2px; }
  .vs-header-right .vs-avatar { display: inline-flex; }
  .vs-header-right .vs-avatar {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }
  .vs-assistant-trigger { width: 32px; height: 32px; font-size: 14px; }
  .vs-assistant-trigger .vs-wand-icon { width: 16px; height: 16px; }
  .vs-mobile-only { display: inline-flex; }
  .vs-desktop-only { display: none; }

  .vs-module-tabs { padding: 0 10px; }
  .vs-module-name { padding-right: 12px; margin-right: 6px; }
  .vs-module-tab { font-size: 11px; padding: 0 10px; }

  .vs-content { padding: 10px; }
  .vs-budget-head { padding: 12px 12px; }
  .vs-budget-head h2 { font-size: 17px; }
  .vs-budget-head p { font-size: 12px; }
  .vs-reset-btn { height: 36px; min-width: 42px; font-size: 11px; }
  .vs-module-placeholder-wrap { padding: 0 12px 12px; }
  .vs-settings-wrap { padding: 0 12px 12px; }
  .vs-settings-input { min-width: 100%; flex: 1 1 100%; }
  .vs-filter-input { min-width: 100%; flex: 1 1 100%; }
  .vs-settings-select,
  .vs-settings-select--small { min-width: 120px; }
  .vs-filter-select,
  .vs-filter-select--small { min-width: 120px; }
  .vs-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vs-chart-grid { grid-template-columns: 1fr; }
  .vs-chart-wrap,
  .vs-chart-wrap--short { height: 210px; }
  .vs-calendar-shell { min-width: 720px; }
  #vsDeliveryCalendar { min-height: 340px; }
  .vs-export-note { font-size: 10px; }
  .vs-standard-table-wrap { margin: 0 12px 12px; }
  .vs-standard-table-wrap--flush { margin-left: 0; margin-right: 0; }
  .vs-settings-pagination { margin: 0 12px 8px; }

  .vs-dock { height: var(--dock-h); }
  .vs-dock-item { flex-direction: column; gap: 1px; font-size: 8px; min-width: 64px; }
  .vs-dock-item i { font-size: 18px; }
}

@media (max-width: 620px) {
  .vs-kpi-grid { grid-template-columns: 1fr; }
}
