/* Shell contract:
   Statusbar consumes theme tokens only.
   Do not hardcode Fiori/Compact-specific colors here. */
body.app-shell:not(.app-shell--default) {
  --shell-bottom-bar-min-height: 45px;
  --shell-bottom-bar-height: var(--shell-bottom-bar-min-height);
  --shell-bottom-bar-gap: 10px;
  --shell-bottom-bar-padding-y: 6px;
  --shell-bottom-bar-padding-x: 12px;
  --shell-bottom-bar-border: #cfd9e6;
  --shell-bottom-bar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 246, 251, 0.98) 100%);
  --shell-bottom-bar-shadow: none;
  --shell-bottom-bar-text: #25364a;
  --shell-bottom-bar-font-size: 0.78rem;
  --shell-bottom-status-dot: #16803c;
  --shell-bottom-status-ring: rgba(22, 128, 60, 0.22);
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  max-width: 100vw;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  min-height: var(--shell-bottom-bar-min-height);
  margin: 0;
  padding: var(--shell-bottom-bar-padding-y) max(var(--shell-bottom-bar-padding-x), env(safe-area-inset-left))
    calc(var(--shell-bottom-bar-padding-y) + env(safe-area-inset-bottom))
    max(var(--shell-bottom-bar-padding-x), env(safe-area-inset-right));
  border-top: 1px solid var(--shell-bottom-bar-border);
  background: var(--shell-bottom-bar-bg);
  box-shadow: var(--shell-bottom-bar-shadow);
  color: var(--shell-bottom-bar-text);
  font-size: var(--shell-bottom-bar-font-size);
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__lane {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--shell-bottom-bar-gap);
  min-width: 0;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  color: var(--shell-bottom-bar-text);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__item--context-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-picker .dropdown-menu {
  min-width: 280px;
  z-index: 80;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-menu {
  padding: 12px;
  border: 1px solid #223a57;
  border-radius: 12px;
  background: #13273d;
  color: #edf4ff;
  box-shadow: 0 18px 40px rgba(9, 23, 39, 0.3);
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-form {
  display: grid;
  gap: 10px;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9bb3cb;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-company {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-field {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: #d8e6f5;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-field .form-select {
  min-height: 34px;
  border-radius: 10px;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__context-actions {
  display: flex;
  justify-content: flex-end;
}

body.app-shell:not(.app-shell--default) .erp-bottom-bar__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--shell-bottom-status-dot);
  box-shadow: 0 0 0 2px var(--shell-bottom-status-ring);
}

@media (max-width: 991.98px) {
  body.app-shell:not(.app-shell--default) .erp-bottom-bar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  body.app-shell:not(.app-shell--default) .erp-bottom-bar__lane {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  body.app-shell:not(.app-shell--default) .erp-bottom-bar {
    gap: 6px;
  }

  body.app-shell:not(.app-shell--default) .erp-bottom-bar__item {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
