:root {
  --presto-primary: #ff3000;
  --presto-primary-hover: #e42b00;
  --presto-primary-container: #ffe6d3;
  --presto-primary-soft: #fff3ed;
  --presto-on-primary: #ffffff;
  --presto-surface: #ffffff;
  --presto-surface-container: #f3f6fb;
  --presto-surface-container-lowest: #f8fbff;
  --presto-surface-container-low: #fefefe;
  --presto-surface-container-high: #f3f6fb;
  --presto-on-surface: #23272e;
  --presto-on-surface-variant: #68798f;
  --presto-outline: #d4d9e4;
  --presto-outline-variant: #dce1ea;
  --presto-info: #2343ea;
  --presto-success: #059b0b;
  --presto-caution: #f0a400;
  --presto-error: #d70000;
  --presto-tag-purple-bg: #f9efff;
  --presto-tag-purple: #8006c2;
  --presto-tag-cyan-bg: #e7f9ff;
  --presto-tag-cyan: #0078a4;
  --presto-chart-1: #ff3000;
  --presto-chart-2: #2343ea;
  --presto-chart-3: #059b0b;
  --presto-chart-4: #f0a400;
  --presto-chart-5: #8006c2;
  --presto-chart-6: #0078a4;
  --presto-chart-muted: #d9eafe;
  --presto-card-surface: var(--presto-surface);
  --presto-app-bg: var(--presto-surface-container-lowest);
  --presto-logo-horizontal: url("/assets/presto_erp/images/brand/presto-logo-horizontal.svg");
  --presto-logo-horizontal-inverse: url("/assets/presto_erp/images/brand/presto-logo-horizontal-inverse.svg");
  --presto-logo-mark: url("/assets/presto_erp/images/brand/presto-logo-mark.svg");
  --presto-logo-mark-light: url("/assets/presto_erp/images/brand/presto-logo-mark-mono-light.svg");
  --presto-app-icon: url("/assets/presto_erp/images/brand/presto-logo-app-icon-red-192.png");
  --presto-sidebar-logo: var(--presto-logo-horizontal);
  --presto-radius-sm: 8px;
  --presto-radius-md: 12px;
  --presto-shadow-sm: 0 1px 2px rgba(13, 13, 13, 0.06), 0 1px 3px rgba(13, 13, 13, 0.08);
  --presto-focus-ring: 0 0 0 3px rgba(255, 48, 0, 0.18);
  --presto-sidebar-surface: var(--presto-surface-container-lowest);
  --presto-sidebar-hover: var(--presto-primary-soft);
  --presto-selected-surface: #fff1e8;
  --presto-selected-text: var(--presto-on-surface);
  --presto-selected-border: rgba(255, 48, 0, 0.26);
  --presto-header-surface: var(--presto-surface);
  --presto-header-surface-alt: var(--presto-surface);
  --presto-header-border: rgba(255, 48, 0, 0.18);
  --brand-color: var(--presto-primary);
  --primary: var(--presto-primary);
  --primary-color: var(--presto-on-surface);
  --btn-primary: var(--presto-primary);
  --border-primary: var(--presto-primary);
  --control-bg: var(--presto-surface-container);
  --control-bg-on-gray: var(--presto-outline-variant);
  --bg-color: var(--presto-app-bg);
  --fg-color: var(--presto-surface);
  --card-bg: var(--presto-card-surface);
  --navbar-bg: rgba(255, 255, 255, 0.92);
  --modal-bg: var(--presto-card-surface);
  --popover-bg: var(--presto-card-surface);
  --awesomebar-focus-bg: var(--presto-card-surface);
  --border-color: var(--presto-outline-variant);
  --dark-border-color: var(--presto-outline);
  --table-border-color: var(--presto-outline-variant);
  --subtle-accent: var(--presto-surface-container);
  --subtle-fg: var(--presto-surface-container);
  --heading-color: var(--presto-on-surface);
  --text-color: var(--presto-on-surface);
  --text-muted: var(--presto-on-surface-variant);
  --text-light: var(--presto-on-surface-variant);
  --fg-hover-color: var(--presto-primary-soft);
  --awesomplete-hover-bg: var(--presto-primary-soft);
  --sidebar-hover-color: var(--presto-sidebar-hover);
  --sidebar-active-color: var(--presto-selected-surface);
  --sidebar-border-color: var(--presto-outline-variant);
  --sidebar-select-color: var(--presto-selected-surface);
  --divider-color: var(--presto-outline-variant);
  --surface-menu-bar: var(--presto-sidebar-surface);
  --checkbox-color: var(--presto-primary);
  --checkbox-focus-shadow: var(--presto-focus-ring);
  --checkbox-gradient: linear-gradient(180deg, var(--presto-primary) -124.51%, var(--presto-primary) 100%);
  --highlight-shadow: 1px 1px 10px rgba(255, 230, 211, 0.9), 0 0 4px rgba(255, 48, 0, 0.5);
  --charts-label-color: var(--presto-on-surface-variant);
  --charts-axis-line-color: var(--presto-outline);
  --charts-tooltip-title: var(--presto-on-surface);
  --charts-tooltip-label: var(--presto-on-surface-variant);
  --charts-tooltip-value: var(--presto-on-surface);
  --charts-tooltip-bg: var(--presto-card-surface);
  --charts-dataset-circle-stroke: var(--presto-card-surface);
  --charts-legend-label: var(--presto-on-surface);
  --charts-legend-value: var(--presto-on-surface-variant);
}

[data-theme="dark"],
.dark {
  --presto-primary: #ea3d16;
  --presto-primary-hover: #ff441a;
  --presto-primary-container: #451e00;
  --presto-primary-soft: rgba(234, 61, 22, 0.12);
  --presto-surface: #0b0f14;
  --presto-surface-container: #1a1c1e;
  --presto-surface-container-lowest: #2d323b;
  --presto-surface-container-low: #2a2f36;
  --presto-surface-container-high: #25292e;
  --presto-on-surface: #e6e6e6;
  --presto-on-surface-variant: #c7d4e0;
  --presto-outline: #2e333d;
  --presto-outline-variant: #171b22;
  --presto-info: #84b9ff;
  --presto-success: #00c853;
  --presto-caution: #ffd37e;
  --presto-error: #ff8b7b;
  --presto-tag-purple-bg: #2a0041;
  --presto-tag-purple: #e9b9ff;
  --presto-tag-cyan-bg: #002a3a;
  --presto-tag-cyan: #b6e9fd;
  --presto-chart-1: #ea3d16;
  --presto-chart-2: #a3cbff;
  --presto-chart-3: #00c853;
  --presto-chart-4: #ffdc6d;
  --presto-chart-5: #e9b9ff;
  --presto-chart-6: #b6e9fd;
  --presto-chart-muted: #2a2f36;
  --presto-card-surface: var(--presto-surface-container);
  --presto-app-bg: #0b0f14;
  --presto-sidebar-logo: var(--presto-logo-horizontal-inverse);
  --presto-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.5);
  --presto-focus-ring: 0 0 0 3px rgba(234, 61, 22, 0.24);
  --presto-sidebar-surface: #0b0f14;
  --presto-sidebar-hover: rgba(255, 230, 211, 0.08);
  --presto-selected-surface: rgba(234, 61, 22, 0.14);
  --presto-selected-text: #fdfdfd;
  --presto-selected-border: rgba(234, 61, 22, 0.42);
  --presto-header-surface: var(--presto-surface-container);
  --presto-header-surface-alt: var(--presto-surface-container);
  --presto-header-border: rgba(234, 61, 22, 0.24);
  --control-bg: var(--presto-surface-container-high);
  --control-bg-on-gray: var(--presto-surface-container-low);
  --bg-color: var(--presto-app-bg);
  --fg-color: var(--presto-card-surface);
  --card-bg: var(--presto-card-surface);
  --navbar-bg: rgba(11, 15, 20, 0.94);
  --modal-bg: var(--presto-card-surface);
  --popover-bg: var(--presto-card-surface);
  --awesomebar-focus-bg: var(--presto-surface-container-high);
  --border-color: var(--presto-outline);
  --dark-border-color: var(--presto-outline);
  --table-border-color: var(--presto-outline);
  --subtle-accent: var(--presto-surface-container);
  --subtle-fg: var(--presto-surface-container);
  --heading-color: var(--presto-on-surface);
  --text-color: var(--presto-on-surface);
  --text-muted: var(--presto-on-surface-variant);
  --text-light: var(--presto-on-surface-variant);
  --fg-hover-color: var(--presto-sidebar-hover);
  --awesomplete-hover-bg: var(--presto-surface-container-high);
  --sidebar-hover-color: var(--presto-sidebar-hover);
  --sidebar-active-color: var(--presto-selected-surface);
  --sidebar-border-color: var(--presto-outline);
  --sidebar-select-color: var(--presto-selected-surface);
  --divider-color: var(--presto-outline);
  --surface-menu-bar: var(--presto-sidebar-surface);
  --highlight-shadow: 1px 1px 10px rgba(69, 30, 0, 0.8), 0 0 4px rgba(234, 61, 22, 0.55);
  --charts-label-color: var(--presto-on-surface-variant);
  --charts-axis-line-color: var(--presto-outline);
  --charts-tooltip-title: var(--presto-on-surface);
  --charts-tooltip-label: var(--presto-on-surface-variant);
  --charts-tooltip-value: var(--presto-on-surface);
  --charts-tooltip-bg: var(--presto-surface-container-high);
  --charts-dataset-circle-stroke: var(--presto-card-surface);
  --charts-legend-label: var(--presto-on-surface);
  --charts-legend-value: var(--presto-on-surface-variant);
}

html,
body {
  background: var(--presto-app-bg);
  color: var(--presto-on-surface);
}

.navbar {
  background: var(--navbar-bg);
  border-color: var(--presto-outline);
  box-shadow: 0 1px 0 rgba(255, 48, 0, 0.08);
}

.search-bar .awesomplete input,
#navbar-modal-search {
  background: var(--presto-surface-container-high);
  border-color: transparent;
  color: var(--presto-on-surface);
}

.navbar-home,
.navbar .navbar-brand {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  position: relative;
}

.navbar-home img,
.navbar .navbar-brand img {
  display: none;
}

.navbar-home::before,
.navbar .navbar-brand::before {
  background: var(--presto-app-icon) center / cover no-repeat;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--presto-shadow-sm);
  content: "";
  display: block;
  height: 34px;
  width: 34px;
}

.page-card-head .app-logo,
.for-login .page-card-head .app-logo,
.for-signup .page-card-head .app-logo,
.for-forgot .page-card-head .app-logo,
.for-login-with-email-link .page-card-head .app-logo {
  background: var(--presto-app-icon) center / contain no-repeat;
  border-radius: 18px;
  content: var(--presto-app-icon);
  height: 84px;
  margin-bottom: 22px;
  object-fit: contain;
  width: 84px;
}

.for-login .page-card-head h4,
.for-signup .page-card-head h4,
.for-forgot .page-card-head h4,
.for-login-with-email-link .page-card-head h4 {
  color: var(--presto-on-surface);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

.btn.btn-primary,
.btn-primary {
  background-color: var(--presto-primary);
  border-color: var(--presto-primary);
  color: var(--presto-on-primary);
}

.btn.btn-primary:hover,
.btn-primary:hover,
.btn.btn-primary:focus,
.btn-primary:focus {
  background-color: var(--presto-primary-hover);
  border-color: var(--presto-primary-hover);
  box-shadow: var(--presto-focus-ring);
  color: var(--presto-on-primary);
}

.form-control:focus,
.input-with-feedback:focus,
.awesomplete input:focus {
  border-color: var(--presto-primary);
  box-shadow: var(--presto-focus-ring);
}

.body-sidebar {
  background: var(--presto-sidebar-surface);
  border-color: var(--presto-outline);
}

.body-sidebar-container.expanded .body-sidebar {
  padding-bottom: 58px;
}

.body-sidebar-container.expanded .body-sidebar::after {
  background: var(--presto-sidebar-logo) center / contain no-repeat;
  bottom: 16px;
  content: "";
  height: 30px;
  inset-inline: 18px;
  opacity: 0.9;
  pointer-events: none;
  position: absolute;
}

.body-sidebar .divider {
  border-color: var(--presto-outline);
}

.body-sidebar .sidebar-header {
  background: var(--presto-header-surface);
  border: 1px solid transparent;
  border-radius: var(--presto-radius-md);
  box-shadow: none;
  min-height: 56px;
}

.body-sidebar .header-logo-container {
  background: var(--presto-surface-container-high);
  border: 1px solid var(--presto-outline);
  border-radius: 10px;
  overflow: hidden;
}

.body-sidebar .header-logo-container:has(img) {
  background: var(--presto-surface-container-high);
}

.body-sidebar .header-logo img {
  border-radius: 9px;
  object-fit: cover;
}

.body-sidebar .header-title,
.body-sidebar .standard-sidebar-item .item-anchor {
  color: var(--presto-on-surface);
}

.body-sidebar .header-subtitle,
.body-sidebar .sidebar-item-suffix .keyboard-shortcut {
  color: var(--presto-on-surface-variant);
}

.body-sidebar .standard-sidebar-item {
  border: 1px solid transparent;
  border-radius: var(--presto-radius-sm);
}

.body-sidebar .standard-sidebar-item:not(.active-sidebar):has(a:not(.section-break)):hover,
.body-sidebar .sidebar-header.hover {
  background: var(--presto-sidebar-hover);
  border-color: var(--presto-header-border);
  color: var(--presto-primary);
}

.body-sidebar .standard-sidebar-item.active-sidebar,
.body-sidebar .sidebar-header.active-sidebar,
.desk-sidebar .standard-sidebar-item.selected,
.standard-sidebar .standard-sidebar-item.selected {
  background: var(--presto-selected-surface);
  border-color: var(--presto-selected-border);
  box-shadow: none;
  color: var(--presto-selected-text);
  position: relative;
}

.body-sidebar .standard-sidebar-item.active-sidebar::before,
.body-sidebar .sidebar-header.active-sidebar::before,
.desk-sidebar .standard-sidebar-item.selected::before,
.standard-sidebar .standard-sidebar-item.selected::before {
  background: var(--presto-primary);
  border-radius: 999px;
  content: "";
  inset-block: 6px;
  inset-inline-start: 0;
  position: absolute;
  width: 3px;
}

.body-sidebar .standard-sidebar-item.active-sidebar .item-anchor,
.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label,
.body-sidebar .sidebar-header.active-sidebar .header-title,
.desk-sidebar .standard-sidebar-item.selected,
.standard-sidebar .standard-sidebar-item.selected {
  color: var(--presto-selected-text);
}

.body-sidebar .standard-sidebar-item:hover .sidebar-item-icon,
.body-sidebar .standard-sidebar-item:hover svg,
.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-icon,
.body-sidebar .standard-sidebar-item.active-sidebar svg,
.body-sidebar .sidebar-header.active-sidebar .drop-icon,
.desk-sidebar .standard-sidebar-item.selected svg,
.standard-sidebar .standard-sidebar-item.selected svg {
  color: var(--presto-primary) !important;
  stroke: currentColor;
}

.body-sidebar .standard-sidebar-item.active-sidebar .keyboard-shortcut {
  color: var(--presto-primary);
}

.body-sidebar .collapse-sidebar-link,
.body-sidebar .sidebar-user-button {
  border-color: var(--presto-outline);
  color: var(--presto-on-surface);
}

.body-sidebar .collapse-sidebar-link:hover,
.body-sidebar .dropdown-navbar-user:hover,
.body-sidebar .onboarding-sidebar:hover,
.body-sidebar .promotional-banner:hover {
  background: var(--presto-sidebar-hover);
  color: var(--presto-primary);
}

.dropdown-menu .dropdown-menu-item:hover,
.sidebar-header-menu .dropdown-menu-item:hover,
.awesomplete ul li:hover,
.awesomplete ul li[aria-selected="true"] {
  background-color: var(--presto-sidebar-hover);
  color: var(--presto-primary);
}

.body-sidebar .item-anchor:focus-visible,
.body-sidebar .sidebar-user-button:focus-visible,
.body-sidebar .collapse-sidebar-link:focus-visible,
.sidebar-header:focus-within {
  box-shadow: var(--presto-focus-ring);
  outline: none;
}

.nav-tabs .nav-link.active,
.form-tabs-list .nav-link.active,
.page-form .nav-link.active {
  border-bottom-color: var(--presto-primary);
  color: var(--presto-primary);
}

.list-row:hover,
.list-row-head:hover,
.frappe-list .list-row:hover {
  background-color: var(--presto-sidebar-hover);
}

.frappe-chart .chart-label,
.frappe-chart .legend-dataset-label,
.frappe-chart .legend-dataset-value,
.frappe-chart text {
  fill: var(--presto-on-surface-variant);
}

.frappe-chart .axis line,
.frappe-chart .line-horizontal,
.frappe-chart .line-vertical {
  stroke: var(--presto-outline) !important;
  stroke-opacity: 0.72;
}

.frappe-chart .bar.mini {
  fill: var(--presto-chart-1) !important;
  rx: 4px;
}

.frappe-chart .bar.mini:nth-of-type(6n + 2) {
  fill: var(--presto-chart-2) !important;
}

.frappe-chart .bar.mini:nth-of-type(6n + 3) {
  fill: var(--presto-chart-3) !important;
}

.frappe-chart .bar.mini:nth-of-type(6n + 4) {
  fill: var(--presto-chart-4) !important;
}

.frappe-chart .bar.mini:nth-of-type(6n + 5) {
  fill: var(--presto-chart-5) !important;
}

.frappe-chart .bar.mini:nth-of-type(6n + 6) {
  fill: var(--presto-chart-6) !important;
}

.frappe-chart .dataset-path,
.frappe-chart .path-group path,
.frappe-chart .dataset-units path {
  stroke: var(--presto-chart-1) !important;
}

.frappe-chart .dataset-units circle,
.frappe-chart .dataset-units rect:not(.bar) {
  fill: var(--presto-chart-1) !important;
  stroke: var(--presto-card-surface) !important;
}

.frappe-chart .pie-slices .pie-path:nth-child(6n + 1),
.frappe-chart .donut-slices .donut-path:nth-child(6n + 1),
.frappe-chart .chart-legend g:nth-child(6n + 1) .legend-dot {
  fill: var(--presto-chart-1) !important;
  stroke: var(--presto-chart-1) !important;
}

.frappe-chart .pie-slices .pie-path:nth-child(6n + 2),
.frappe-chart .donut-slices .donut-path:nth-child(6n + 2),
.frappe-chart .chart-legend g:nth-child(6n + 2) .legend-dot {
  fill: var(--presto-chart-2) !important;
  stroke: var(--presto-chart-2) !important;
}

.frappe-chart .pie-slices .pie-path:nth-child(6n + 3),
.frappe-chart .donut-slices .donut-path:nth-child(6n + 3),
.frappe-chart .chart-legend g:nth-child(6n + 3) .legend-dot {
  fill: var(--presto-chart-3) !important;
  stroke: var(--presto-chart-3) !important;
}

.frappe-chart .pie-slices .pie-path:nth-child(6n + 4),
.frappe-chart .donut-slices .donut-path:nth-child(6n + 4),
.frappe-chart .chart-legend g:nth-child(6n + 4) .legend-dot {
  fill: var(--presto-chart-4) !important;
  stroke: var(--presto-chart-4) !important;
}

.frappe-chart .pie-slices .pie-path:nth-child(6n + 5),
.frappe-chart .donut-slices .donut-path:nth-child(6n + 5),
.frappe-chart .chart-legend g:nth-child(6n + 5) .legend-dot {
  fill: var(--presto-chart-5) !important;
  stroke: var(--presto-chart-5) !important;
}

.frappe-chart .pie-slices .pie-path:nth-child(6n + 6),
.frappe-chart .donut-slices .donut-path:nth-child(6n + 6),
.frappe-chart .chart-legend g:nth-child(6n + 6) .legend-dot {
  fill: var(--presto-chart-6) !important;
  stroke: var(--presto-chart-6) !important;
}

.frappe-chart .chart-legend {
  color: var(--presto-on-surface);
}

.graph-svg-tip,
.chart-tooltip {
  background: var(--charts-tooltip-bg) !important;
  border: 1px solid var(--presto-outline);
  border-radius: var(--presto-radius-sm);
  box-shadow: var(--presto-shadow-sm);
  color: var(--presto-on-surface);
}

.icon-container:has(img[src*="presto_erp"]),
.icon-container:has(img[src*="presto-logo"]),
.desktop .app-icon:has(img[src*="presto_erp"]) {
  background: var(--presto-primary) !important;
  border-color: var(--presto-selected-border);
}

.indicator-pill.red,
.indicator-pill.orange,
.indicator-pill.yellow,
.indicator-pill.green,
.indicator-pill.blue {
  border-radius: 999px;
}

.login-content .page-card,
.for-login .page-card,
.for-forgot .page-card {
  border-color: var(--presto-outline-variant);
  border-radius: var(--presto-radius-md);
  box-shadow: var(--presto-shadow-sm);
}

.for-login .page-card,
.for-signup .page-card,
.for-forgot .page-card,
.for-login-with-email-link .page-card {
  border-top: 4px solid var(--presto-primary);
}

.for-login .page-card .btn-login,
.for-login .page-card .btn-primary {
  min-height: 48px;
  font-size: 16px;
  font-weight: 600;
}
