:root {
  --bg: #242424;
  --panel: #303030;
  --panel-2: #383838;
  --line: #484848;
  --text: #f4f7fb;
  --muted: #aeb6c2;
  --accent: #e50914;
  --accent-2: #1d8f6f;
  --warning: #e6a11c;
  --sidebar: #343434;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.toast-stack {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 20;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 240px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  background: #202020;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}

.toast.error {
  border-left-color: var(--accent);
}

.login-body {
  min-height: 100%;
  background:
    linear-gradient(120deg, rgba(229, 9, 20, .12), transparent 34%),
    linear-gradient(300deg, rgba(29, 143, 111, .16), transparent 36%),
    #202020;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  background: #2b2b2b;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.brand-mark,
.logo {
  color: var(--accent);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0;
}

.brand-mark {
  margin: 4px 0 30px;
  text-align: center;
  font-size: 46px;
  line-height: 1;
}

.login-panel h1 {
  margin: 18px 0 24px;
  font-size: 22px;
}

.login-form,
.editor-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

input,
select {
  min-height: 36px;
  border: 1px solid #555;
  border-radius: 5px;
  background: #2b2b2b;
  color: var(--text);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
}

button,
.button-ghost {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.button-ghost {
  padding: 0 12px;
  background: transparent;
  border-color: var(--line);
}

.app-shell {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  transition: grid-template-columns .24s ease;
}

.app-shell.nav-collapsed {
  grid-template-columns: 48px minmax(0, 1fr);
}

.sidebar {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  overflow: hidden;
  transition: background-color .24s ease, border-color .24s ease;
}

.sidebar.collapsed {
  width: 48px;
}

.sidebar.collapsed .logo {
  justify-content: center;
  align-items: flex-start;
  padding: 21px 0 0;
  font-size: 0;
  overflow: hidden;
  animation: none;
}

.sidebar.collapsed .logo::before {
  content: "S";
  font-size: 24px;
  line-height: 1;
}

.app-shell.superman-mode .sidebar.collapsed .logo::before {
  content: "S";
}

.sidebar.collapsed .logo-word {
  opacity: 0;
  transform: none;
}

.sidebar.collapsed .nav-section {
  height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.sidebar.collapsed .nav-group {
  margin: 6px 0;
}

.sidebar.collapsed .nav-group-toggle {
  justify-content: flex-start;
  padding-left: 9px;
  padding-right: 9px;
}

.sidebar.collapsed .nav-group-toggle span,
.sidebar.collapsed .group-chevron {
  width: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.sidebar.collapsed .nav-group-list {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.sidebar.collapsed .nav-group[open] .nav-group-list {
  max-height: 220px;
  opacity: 1;
  padding: 3px 0 4px;
}

.sidebar.collapsed .nav-group-list .nav-item {
  visibility: hidden;
  pointer-events: none;
}

.sidebar.collapsed .nav-item,
.sidebar.collapsed .settings-link {
  justify-content: flex-start;
  padding-left: 9px;
  padding-right: 9px;
}

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .settings-link span,
.sidebar.collapsed .nav-item small {
  width: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.logo {
  height: 64px;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 21px 0 0 16px;
  font-size: 24px;
  white-space: nowrap;
  transform-origin: 35% 70%;
  animation: logoWave 60s ease-in-out infinite;
  transition: opacity .18s ease, font-size .2s ease, padding .24s ease;
}

.logo-switch {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 0;
  justify-content: flex-start;
  background: transparent;
  cursor: pointer;
}

.logo-switch:hover {
  color: #ff2a35;
  background: rgba(255, 255, 255, .015);
}

.logo-word {
  display: inline-block;
  transition: opacity .26s ease, transform .32s cubic-bezier(.16, 1, .3, 1);
}

.logo .superman {
  position: absolute;
  left: 15px;
  top: 21px;
  opacity: 0;
  transform: translateX(22px);
}

.app-shell.superman-mode .logo .normal {
  opacity: 0;
  transform: translateX(-22px);
}

.app-shell.superman-mode .logo .superman {
  opacity: 1;
  transform: translateX(0);
}

.logo::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 1px;
  background: var(--line);
}

.nav-list {
  position: relative;
  overflow-y: auto;
  padding: 10px 7px 12px;
  transition: opacity .18s ease, transform .22s cubic-bezier(.16, 1, .3, 1), filter .18s ease;
}

.nav-list.mode-leaving {
  opacity: 0;
  filter: blur(2px);
  transform: translateX(-18px);
}

.nav-list.mode-entering {
  animation: navModeIn .26s cubic-bezier(.16, 1, .3, 1) both;
}

.nav-mode-panel {
  display: none;
}

.nav-mode-panel.active {
  display: block;
}

.app-shell.superman-mode .sidebar {
  background: linear-gradient(180deg, rgba(229, 9, 20, .09), transparent 150px), var(--sidebar);
}

.app-shell.superman-mode .nav-item.active,
.app-shell.superman-mode .nav-item:hover,
.app-shell.superman-mode .settings-link:hover {
  background: rgba(229, 9, 20, .30);
}

@keyframes navModeIn {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}

@keyframes logoWave {
  0%, 96%, 100% { transform: translateY(0) skewX(0deg) scale(1); }
  96.8% { transform: translateY(-1px) skewX(-7deg) scale(1.015); }
  97.6% { transform: translateY(1px) skewX(7deg) scale(1.015); }
  98.4% { transform: translateY(-1px) skewX(-5deg) scale(1.01); }
  99.2% { transform: translateY(0) skewX(4deg) scale(1.005); }
}

.nav-section {
  margin: 10px 4px 5px;
  color: #cdd3dc;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-group {
  margin: 4px 0;
}

.nav-group summary {
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group-toggle {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #dbe1ea;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  transition: background-color .18s ease, color .18s ease, padding .24s ease;
}

.nav-group-toggle:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.nav-group-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity .16s ease, width .24s ease, margin .24s ease;
}

.nav-group-toggle svg,
.table-icon svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.group-chevron {
  margin-left: auto;
  transition: transform .18s ease, opacity .16s ease, width .24s ease, margin .24s ease;
}

.nav-group[open] .group-chevron {
  transform: rotate(180deg);
}

.nav-group-list {
  display: grid;
  gap: 2px;
  max-height: 0;
  opacity: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(0 0 100% 0 round 4px);
  filter: blur(2px);
  transform: translateY(-2px);
  transform-origin: top;
  transition: max-height .34s cubic-bezier(.16, 1, .3, 1), opacity .22s ease, transform .34s cubic-bezier(.16, 1, .3, 1), clip-path .34s cubic-bezier(.16, 1, .3, 1), filter .22s ease;
}

.nav-group[open] .nav-group-list {
  max-height: 220px;
  opacity: 1;
  padding: 3px 0 4px;
  clip-path: inset(0 0 0 0 round 4px);
  filter: blur(0);
  transform: translateY(0);
}

.nav-group-list .nav-item {
  padding-left: 24px;
}

.nav-item,
.settings-link {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
  background: transparent;
  color: #fff;
  font-size: 11px;
  text-align: left;
  overflow: hidden;
  transition: background-color .18s ease, color .18s ease, padding .24s ease;
}

.nav-item span,
.settings-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity .16s ease, width .24s ease, margin .24s ease;
}

.nav-item:hover,
.nav-item.active,
.settings-link:hover {
  background: rgba(229, 9, 20, .24);
  color: #fff;
}

.nav-item svg,
.settings-link svg,
.quick-link svg,
.icon-btn svg,
.back-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.table-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d9dee7;
}

.nav-item small {
  margin-left: auto;
  color: var(--warning);
  font-size: 10px;
  transition: opacity .16s ease, width .24s ease, margin .24s ease;
}

.empty-menu {
  padding: 16px 10px;
  color: var(--muted);
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  padding: 7px;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: 38px 28px minmax(0, 1fr);
  transition: min-width .24s ease;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #282828;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #5a5a5a;
  border-radius: 5px;
  height: 25px;
  padding: 0 8px;
}

.search-wrap svg {
  width: 13px;
  color: var(--muted);
}

.search-wrap input {
  min-height: 0;
  height: 23px;
  border: 0;
  background: transparent;
  padding: 0;
}

.quick-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  overflow: hidden;
}

.quick-link {
  min-height: 24px;
  background: transparent;
  padding: 0 4px;
  white-space: nowrap;
}

.quick-link:hover {
  color: var(--accent);
}

.user-menu {
  position: relative;
  justify-self: end;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
}

.user-box > svg {
  width: 11px;
  height: 11px;
  color: var(--muted);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 12;
  min-width: 136px;
  border: 1px solid var(--line);
  background: #252525;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .32);
  padding: 5px;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s cubic-bezier(.16, 1, .3, 1);
}

.user-dropdown[hidden] {
  display: none;
}

.user-dropdown.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.user-dropdown.is-closing {
  opacity: 0;
  transform: translateY(-5px) scale(.98);
  pointer-events: none;
}

.user-dropdown button {
  width: 100%;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  justify-content: flex-start;
  padding: 0 8px;
}

.user-dropdown button:hover {
  background: rgba(255, 255, 255, .06);
}

.avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

.user-box strong,
.user-box span {
  display: block;
  line-height: 1.1;
}

.user-box span {
  display: none;
}

.icon-btn {
  width: 27px;
  min-height: 27px;
  padding: 0;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: #2c2c2c;
  color: #fff;
}

.icon-btn:hover {
  border-color: var(--accent);
}

.icon-btn.danger {
  color: #ff5961;
}

.icon-btn.warn {
  color: #ffc95f;
}

.icon-btn.power.running {
  color: #7ee6a8;
  border-color: rgba(126, 230, 168, .38);
  background: rgba(29, 143, 111, .18);
}

.icon-btn.power.stopped {
  color: #ffc95f;
  border-color: rgba(255, 201, 95, .34);
  background: rgba(230, 161, 28, .14);
}

.tabbar {
  display: flex;
  align-items: end;
  gap: 0;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
  background: #242424;
  overflow-x: auto;
}

.tab {
  position: relative;
  min-width: 76px;
  max-width: 132px;
  height: 26px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #dce1e8;
  justify-content: center;
  padding: 0 18px;
  font-size: 9px;
  font-weight: 600;
  transition: none;
}

.tab::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: transparent;
  transition: none;
}

.tab span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  transform: translateX(0);
  transition: transform .14s ease;
}

.tab:hover {
  background: transparent;
  color: #dce1e8;
}

.tab.active {
  color: var(--accent);
  background: transparent;
}

.tab.active:hover {
  color: var(--accent);
}

.tab.active::after {
  background: var(--accent);
}

.tab-close {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: 0;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(.85);
  transition: opacity .14s ease, transform .14s ease;
}

.tab:hover .tab-close {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.tab:hover span {
  transform: translateX(-5px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start end;
  padding: 58px 18px 18px;
  background: rgba(0, 0, 0, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop.is-closing {
  opacity: 0;
  pointer-events: none;
}

.profile-modal {
  width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  background: #292929;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(-8px) translateX(10px) scale(.985);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s cubic-bezier(.16, 1, .3, 1);
}

.modal-backdrop.is-open .profile-modal {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

.modal-backdrop.is-closing .profile-modal {
  opacity: 0;
  transform: translateY(-6px) translateX(8px) scale(.985);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-head h2 {
  margin: 0;
  font-size: 15px;
}

.modal-actions {
  justify-content: flex-end;
}

.frame-zone {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #202020;
}

.app-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 121.95122%;
  height: 121.95122%;
  border: 0;
  display: none;
  background: #fff;
  opacity: 1;
  transform: scale(.82);
  transform-origin: top left;
  transition: opacity .18s ease;
}

.app-frame.active {
  display: block;
}

.app-frame.loading {
  opacity: 0;
}

.app-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: #202020;
  color: var(--text);
  opacity: 1;
  transition: opacity .18s ease;
}

.app-loading[hidden] {
  display: none;
}

.app-loading.leaving {
  opacity: 0;
}

.app-loading strong {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
}

.app-loading small {
  color: var(--muted);
  font-size: 12px;
}

.loading-mark {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.loading-mark span {
  width: 5px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  animation: loading-pulse .9s ease-in-out infinite;
}

.loading-mark span:nth-child(2) {
  animation-delay: .12s;
}

.loading-mark span:nth-child(3) {
  animation-delay: .24s;
}

@keyframes loading-pulse {
  0%, 100% { height: 10px; opacity: .45; }
  50% { height: 24px; opacity: 1; }
}

.error-page {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.portal-empty {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  overflow: hidden;
}

.empty-watermark {
  color: var(--accent);
  font-size: clamp(48px, 8vw, 118px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0;
  opacity: .085;
  user-select: none;
}

.empty-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
}

.portal-empty h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
}

.portal-empty p {
  margin: 0;
  font-size: 10px;
}

.settings-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.settings-side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: #2d2d2d;
}

.settings-side h1 {
  margin: 24px 0;
}

.settings-side a {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.settings-side a:hover,
.back-link {
  color: #fff;
}

.settings-main {
  min-width: 0;
  display: grid;
  gap: 20px;
  padding: 22px;
}

.settings-section {
  min-width: 0;
  border: 1px solid var(--line);
  background: #2a2a2a;
  padding: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0 0 5px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.editor-form {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.editor-form.app-editor-form {
  display: block;
  width: 100%;
  grid-template-columns: none;
}

.app-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 12px;
  align-items: end;
}

.app-form-grid > label {
  grid-column: span 3;
  min-width: 0;
}

.app-form-grid .app-field-name {
  grid-column: span 3;
}

.app-form-grid .app-field-zip {
  grid-column: span 4;
}

.app-form-grid .app-field-category {
  grid-column: span 2;
}

.app-form-grid .app-field-new-category {
  grid-column: span 3;
}

.app-form-grid .app-field-icon {
  grid-column: span 3;
}

.app-form-grid .app-field-order {
  grid-column: span 2;
}

.app-form-grid input,
.app-form-grid select {
  width: 100%;
}

.app-form-grid input[type="file"] {
  padding: 4px 6px;
  line-height: 26px;
  overflow: hidden;
}

.app-form-grid input[type="file"]::file-selector-button {
  height: 26px;
  margin: 0 10px 0 0;
  padding: 0 11px;
  border: 0;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
}

.upload-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 52, 71, .25);
  border-radius: 5px;
  background: rgba(255, 52, 71, .06);
  color: #d9dee7;
  line-height: 1.45;
}

.upload-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--accent);
}

.upload-note code {
  color: #fff;
}

.app-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.app-toggle-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.app-toggle-group .check-row {
  min-height: 34px;
  white-space: nowrap;
}

.app-form-footer .form-actions {
  flex: 0 0 auto;
}

.app-form-footer .form-actions button {
  padding: 0 16px;
}

.check-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.check-row input {
  min-height: 0;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.form-actions button {
  padding: 0 13px;
}

.data-table {
  overflow: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #d9dee7;
  background: #242424;
}

td {
  color: #f7f9fd;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: #444;
  color: #fff;
  font-size: 11px;
}

.badge.good {
  background: rgba(29, 143, 111, .25);
  color: #80e8c5;
}

.badge.warn {
  background: rgba(230, 161, 28, .2);
  color: #ffc95f;
}

.badge.mute {
  color: #c1c7d0;
}

.badge.bad {
  background: rgba(229, 9, 20, .18);
  color: #ff8b91;
}

.header-section {
  scroll-margin-top: 18px;
}

.header-section-head {
  align-items: center;
}

.header-section-head form {
  margin: 0;
}

.danger-action {
  color: #ff9ca1;
  border-color: rgba(229, 9, 20, .45);
  padding: 0 12px;
}

button:disabled,
.button-ghost:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.header-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.header-stat {
  min-height: 76px;
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #252525;
  padding: 12px 14px;
}

.header-stat span {
  color: var(--muted);
  font-size: 10px;
}

.header-stat strong {
  font-size: 22px;
  font-weight: 600;
}

.header-stat > svg {
  position: absolute;
  width: 30px;
  height: 30px;
  right: 13px;
  top: 22px;
  color: #7c8794;
  opacity: .7;
}

.header-stat.primary {
  border-left: 3px solid var(--accent-2);
}

.header-stat.primary > svg,
.api-success {
  color: #75dbb9;
}

.header-stat.expired {
  border-left: 3px solid var(--accent);
}

.header-stat.expired > svg,
.api-failed {
  color: #ff858b;
}

.header-test-bar {
  min-height: 58px;
  display: flex;
  align-items: end;
  gap: 9px;
  border: 1px solid var(--line);
  background: #252525;
  padding: 10px;
}

.header-test-bar form {
  margin: 0;
}

.header-waybill-form {
  display: flex;
  align-items: end;
  gap: 8px;
}

.header-waybill-form label {
  min-width: 245px;
}

.header-waybill-form button,
.header-test-bar .button-ghost {
  padding: 0 12px;
  white-space: nowrap;
}

.poll-note {
  min-width: 240px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.poll-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--warning);
}

.header-table {
  max-height: 430px;
}

.header-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.header-number {
  color: #fff;
  font-family: Consolas, monospace;
}

.source-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.source-app svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.source-domain {
  display: block;
  margin-top: 4px;
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-table small {
  color: var(--muted);
}

.header-message {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-action-heading,
.header-action-cell {
  width: 48px;
  text-align: center;
}

.header-download {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d8dde6;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.header-download:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(239, 35, 60, .12);
}

.header-download svg {
  width: 14px;
  height: 14px;
}

.empty-table {
  height: 90px;
  color: var(--muted);
  text-align: center;
}

.row-actions {
  display: flex;
  gap: 7px;
}

.row-actions form {
  margin: 0;
}

.error-page a {
  color: var(--accent);
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .header-stat-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .header-test-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .poll-note {
    width: 100%;
    margin-left: 0;
  }

  .app-shell {
    width: max-content;
    max-width: none;
    min-width: 1168px;
    grid-template-columns: 48px minmax(1120px, 1fr);
    overflow: visible;
  }

  .settings-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 48px;
    z-index: 30;
    transform: none;
    transition: width .24s ease, background-color .24s ease;
  }

  .sidebar:not(.collapsed) {
    width: 170px;
    box-shadow: 18px 0 42px rgba(0, 0, 0, .32);
  }

  .sidebar.collapsed {
    width: 48px;
  }

  .sidebar:not(.collapsed) .logo {
    justify-content: flex-start;
    padding: 21px 0 0 16px;
    font-size: 24px;
  }

  .sidebar.collapsed .logo {
    justify-content: center;
    align-items: flex-start;
    padding: 21px 0 0;
    font-size: 0;
    overflow: hidden;
  }

  .sidebar:not(.collapsed) .nav-group-toggle,
  .sidebar:not(.collapsed) .nav-item,
  .sidebar:not(.collapsed) .settings-link {
    justify-content: flex-start;
    padding-left: 9px;
    padding-right: 9px;
  }

  .sidebar.collapsed .nav-group-toggle,
  .sidebar.collapsed .nav-item,
  .sidebar.collapsed .settings-link {
    justify-content: flex-start;
    padding-left: 9px;
    padding-right: 9px;
  }

  .sidebar.collapsed .nav-group-list {
    max-height: 0;
    opacity: 0;
    padding: 0;
  }

  .sidebar.collapsed .nav-group[open] .nav-group-list {
    max-height: 220px;
    opacity: 1;
    padding: 3px 0 4px;
  }

  .sidebar.collapsed .nav-group-list .nav-item {
    visibility: hidden;
    pointer-events: none;
  }

  .sidebar.collapsed .nav-group-toggle span,
  .sidebar.collapsed .group-chevron,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .settings-link span,
  .sidebar.collapsed .nav-item small {
    width: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
  }

  .workspace {
    min-width: 1120px;
    margin-left: 48px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .quick-links {
    display: none;
  }

  .settings-side {
    position: static;
    height: auto;
  }

  .editor-form {
    grid-template-columns: 1fr;
  }

  .app-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-form-grid > label,
  .app-form-grid .app-field-name,
  .app-form-grid .app-field-zip,
  .app-form-grid .app-field-category,
  .app-form-grid .app-field-new-category,
  .app-form-grid .app-field-icon,
  .app-form-grid .app-field-order {
    grid-column: span 1;
  }

  .app-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
