:root {
  color-scheme: dark;
}

html[data-bambam-theme="pastel"] {
  color-scheme: light;
  --bg: #e8e1ef !important;
  --bg2: #eee8f3 !important;
  --bg3: #e1e8ef !important;
  --sur: #f3edf5 !important;
  --sur2: #e8eef2 !important;
  --panel: #f2ebf4 !important;
  --panel2: #e6edf2 !important;
  --card: #f2ebf4 !important;
  --card2: #e7edf2 !important;
  --sidebar: #dfe7ee !important;
  --hover: #d8e3ea !important;
  --active: #d8d7ec !important;
  --brd: #c8c0d1 !important;
  --border: #c8c0d1 !important;
  --line: #c8c0d1 !important;
  --txt: #403b4d !important;
  --tx: #403b4d !important;
  --ink: #403b4d !important;
  --txt2: #6d6678 !important;
  --sub: #70697a !important;
  --muted: #70697a !important;
  --mt: #70697a !important;
  --mt2: #81788a !important;
  --blue: #6f80aa !important;
  --b: #6f80aa !important;
  --a1: #6f80aa !important;
  --acc: #8276a9 !important;
  --navy: #394978 !important;
  --green: #568b75 !important;
  --g: #568b75 !important;
  --red: #b66f78 !important;
  --r: #b66f78 !important;
  --orange: #b88a61 !important;
  --yellow: #a68c55 !important;
  --y: #a68c55 !important;
  --purple: #8c78a8 !important;
  --p: #8c78a8 !important;
  --c: #5f8790 !important;
}

html[data-bambam-theme="pastel"],
html[data-bambam-theme="pastel"] body {
  background: #e8e1ef !important;
  color: #403b4d !important;
}

html[data-bambam-theme="pastel"] .card,
html[data-bambam-theme="pastel"] .panel,
html[data-bambam-theme="pastel"] .kpi,
html[data-bambam-theme="pastel"] .box,
html[data-bambam-theme="pastel"] .chart-card,
html[data-bambam-theme="pastel"] .table-card,
html[data-bambam-theme="pastel"] .modal-content,
html[data-bambam-theme="pastel"] .modal-card,
html[data-bambam-theme="pastel"] .detail-box,
html[data-bambam-theme="pastel"] .mdl-box {
  box-shadow: 0 8px 24px rgba(91, 76, 110, .10) !important;
}

html[data-bambam-theme="pastel"] input,
html[data-bambam-theme="pastel"] select,
html[data-bambam-theme="pastel"] textarea {
  color: #403b4d;
  background-color: #f8f5fa;
  border-color: #c8c0d1;
}

.bambam-brand-logo {
  display: block;
  object-fit: contain;
  max-width: 100%;
  height: auto;
}

.bambam-brand-logo--portal {
  width: min(210px, 72%);
  max-height: 112px;
  margin: 0 auto 15px;
}

.bambam-brand-logo--sidebar {
  width: min(160px, 100%);
  max-height: 88px;
  margin: 0 auto 11px;
}

.bambam-company-card-logo {
  height: 94px;
  width: min(230px, 100%);
  margin: 0 0 18px;
  object-fit: contain;
  object-position: left center;
}

#bambam-theme-control {
  --theme-control-bg: rgba(18, 22, 31, .94);
  --theme-control-border: rgba(255, 255, 255, .12);
  --theme-control-text: #eef2f7;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--theme-control-border);
  border-radius: 12px;
  background: var(--theme-control-bg);
  color: var(--theme-control-text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .20);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 12px;
  line-height: 1;
  z-index: 2147483000;
}

html[data-bambam-theme="pastel"] #bambam-theme-control {
  --theme-control-bg: rgba(248, 245, 250, .96);
  --theme-control-border: #c8c0d1;
  --theme-control-text: #514b5e;
  box-shadow: 0 10px 28px rgba(91, 76, 110, .16);
}

#bambam-theme-control.bambam-theme-control--floating {
  position: fixed;
  top: 16px;
  right: 16px;
}

#bambam-theme-control.bambam-theme-control--embedded {
  width: 100%;
  margin-top: 13px;
  box-shadow: none;
}

#bambam-theme-control .bambam-theme-label {
  padding: 0 7px;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .72;
}

#bambam-theme-control button {
  min-height: 32px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: 650 12px/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .15s, color .15s, transform .15s;
}

#bambam-theme-control button:hover {
  transform: translateY(-1px);
  background: rgba(111, 128, 170, .14);
}

#bambam-theme-control button[aria-pressed="true"] {
  color: #fff;
  background: #536b9b;
  box-shadow: 0 4px 12px rgba(53, 72, 119, .22);
}

html[data-bambam-theme="pastel"] #bambam-theme-control button[aria-pressed="true"] {
  color: #fff;
  background: #6f80aa;
}

@media (max-width: 760px) {
  #bambam-theme-control.bambam-theme-control--floating {
    top: 10px;
    right: 10px;
  }

  #bambam-theme-control .bambam-theme-label {
    display: none;
  }

  #bambam-theme-control button {
    min-height: 36px;
    padding: 8px 10px;
  }

  .bambam-brand-logo--portal {
    width: min(160px, 68%);
    max-height: 82px;
  }

  .bambam-company-card-logo {
    height: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bambam-theme-control button {
    transition: none;
  }
}
