/* E10 PC shell and page recipes, matched against the live E10 interface. */

html,
body {
  color: #111;
  background: var(--page-bg);
  font-family: var(--regular-ff);
  font-size: 14px;
  line-height: 1.15;
}

.e10-shell {
  position: relative;
  display: grid;
  grid-template: 50px minmax(0, 1fr) / 220px minmax(0, 1fr);
  width: 100%;
  height: 100%;
}

.topbar {
  position: relative;
  z-index: 50;
  grid-column: 1 / -1;
  display: flex;
  height: 50px;
  min-height: 50px;
  align-items: stretch;
  color: #fff;
  background: var(--primary);
  border: 0;
  box-shadow: none;
}

.brand {
  display: flex;
  width: 220px;
  min-width: 220px;
  height: 50px;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  color: #fff;
  border: 0;
}

.ecology-logo {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0;
}

.brand-chevron {
  opacity: 0.86;
}

.top-modules {
  display: flex;
  height: 50px;
  align-items: stretch;
}

.top-module {
  display: inline-flex;
  min-width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
}

.top-module:hover,
.top-module.active {
  color: #fff;
  background: rgba(0, 42, 82, 0.2);
}

.top-module:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: -2px;
}

.top-actions {
  display: flex;
  height: 50px;
  align-items: center;
  gap: 0;
  margin-left: auto;
  padding: 0;
}

.top-actions .icon-button {
  width: 42px;
  height: 50px;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 0;
}

.top-actions .icon-button:hover,
.top-actions .icon-button:focus-visible {
  color: #fff;
  background: rgba(0, 35, 72, 0.18);
}

.user-menu {
  display: flex;
  min-width: 150px;
  height: 50px;
  gap: 10px;
  margin: 0;
  padding: 0 14px 0 10px;
  color: #fff;
  background: rgba(0, 35, 72, 0.12);
  border: 0;
  border-radius: 0;
}

.user-menu:hover {
  background: rgba(0, 35, 72, 0.22);
}

.topbar .avatar {
  width: 34px;
  height: 34px;
  color: #fff;
  background: #5f9deb;
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.user-copy {
  display: grid;
  min-width: 70px;
  gap: 2px;
  text-align: left;
}

.user-copy strong,
.user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  font-size: 13px;
  font-weight: 500;
}

.user-copy small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
}

.mobile-menu-button {
  display: none;
}

.sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: 0;
  flex-direction: column;
  color: #fff;
  background: var(--sidebar-bg);
  border: 0;
}

.nav-list {
  display: block;
  min-height: 0;
  flex: 1;
  margin: 0;
  padding: 20px 0 44px;
  overflow: auto;
}

.nav-section-label {
  height: 32px;
  margin: 8px 0 0;
  padding: 0 15px;
  color: #777c84;
  font-size: 11px;
  line-height: 32px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  height: 35px;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 20px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.nav-item::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: transparent;
}

.nav-item:hover {
  color: #fff;
  background: var(--sidebar-hover-bg);
}

.nav-item.active {
  color: #fff;
  background: var(--sidebar-active-bg);
  font-family: var(--regular-ff);
  font-weight: 400;
}

.nav-item.active::before {
  background: #1a86e5;
}

.nav-item:focus,
.nav-item:focus-visible {
  outline: none;
  box-shadow: none;
}

.nav-item .icon {
  width: 16px;
  height: 16px;
  color: #d6d8dc;
}

.nav-item.active .icon {
  color: #fff;
}

.nav-item.nav-child {
  padding-left: 45px;
}

.nav-arrow {
  margin-left: auto;
  opacity: 0.7;
}

.nav-badge {
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  color: #cfd2d6;
  background: #3a3e46;
  border-radius: 9px;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

.sidebar-collapse {
  position: absolute;
  right: -12px;
  bottom: 58px;
  z-index: 4;
  width: 12px;
  height: 42px;
  padding: 0;
  color: #c7ddf3;
  background: #4d8ec7;
  border: 0;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

.main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--page-bg);
}

.watermark-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  grid-auto-rows: 150px;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  pointer-events: none;
}

.watermark-layer span {
  color: #607080;
  font-size: 12px;
  line-height: 18px;
  opacity: 0.055;
  text-align: center;
  transform: rotate(-20deg);
  white-space: nowrap;
}

.view,
.e10-view {
  position: relative;
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.view.active,
.e10-view.active {
  display: flex;
  flex-direction: column;
}

.view:not(.active) {
  visibility: hidden;
}

.content-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 50px;
  height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  background: #f6f7f9;
  border-bottom: 1px solid #e5e5e5;
}

.toolbar-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.toolbar-title > div {
  min-width: 0;
}

.content-toolbar strong {
  overflow: hidden;
  color: #222;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  color: #4f9cff;
  background: #fff;
  border: 1px solid #66a8ff;
  border-radius: 2px;
}

.module-icon .icon {
  width: 16px;
  height: 16px;
}

.toolbar-tabs {
  display: flex;
  gap: 26px;
  height: 22px;
  margin-top: 1px;
  color: #666;
  font-size: 12px;
}

.toolbar-tabs span {
  position: relative;
  line-height: 22px;
}

.toolbar-tabs span.active {
  color: var(--primary);
}

.toolbar-tabs span.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--primary);
}

.toolbar-buttons,
.e10-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.e10-page-scroll {
  min-height: 0;
  flex: 1;
  padding: 14px;
  overflow: auto;
}

.e10-panel {
  position: relative;
  background: #fff;
  border: 1px solid #e8e9ec;
  border-radius: 10px;
  box-shadow: none;
}

.e10-panel + .e10-panel {
  margin-top: 14px;
}

.e10-panel-header {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid #e8e8e8;
}

.e10-section-title {
  position: relative;
  margin: 0;
  padding-left: 16px;
  color: #222;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.e10-section-title::before {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 3px;
  content: "";
  background: #68a5ff;
}

.range-label {
  color: #f0a51b;
  font-size: 12px;
}

.compact-select {
  width: auto;
  min-width: 82px;
  height: 30px;
  padding-right: 25px;
}

.overview-panel {
  min-height: 220px;
}

.overview-panel .e10-panel-header {
  border-bottom: 0;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 160px;
  align-items: center;
  padding: 2px 32px 22px;
}

.overview-metric {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  padding: 14px;
}

.overview-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin-top: 2px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
}

.overview-icon .icon {
  width: 22px;
  height: 22px;
}

.overview-icon.blue {
  background: linear-gradient(135deg, #6678ff, #72a1ff);
}

.overview-icon.green {
  background: linear-gradient(135deg, #49c45d, #69df82);
}

.overview-icon.cyan {
  background: linear-gradient(135deg, #659eff, #6edbe8);
}

.overview-icon.red {
  background: linear-gradient(135deg, #ff6368, #ff9090);
}

.overview-number {
  color: #222;
  font-size: 34px;
  font-weight: 400;
  line-height: 40px;
}

.overview-label {
  margin-top: 10px;
  color: #555;
  font-size: 13px;
}

.overview-meta,
.overview-rank {
  margin-top: 6px;
  color: #999;
  font-size: 12px;
}

.danger-text {
  color: #ff5c63;
}

.overview-meta span {
  color: #aaa;
}

.realtime-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  color: #ff8e2c;
  background: #fff1e6;
  font-size: 10px;
}

.todo-panel {
  min-height: 330px;
}

.plain-icon-button,
.more-text,
.filter-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  color: #999;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.plain-icon-button:hover,
.filter-icon:hover {
  color: var(--primary);
}

.more-text {
  width: auto;
  color: #999;
  font-size: 11px;
}

.e10-tabs {
  display: flex;
  height: 48px;
  align-items: stretch;
  gap: 28px;
  padding: 0 18px;
  border-bottom: 1px solid #e8e8e8;
}

.e10-tab {
  position: relative;
  padding: 0 2px;
  color: #777;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.e10-tab.active {
  color: var(--primary);
}

.e10-tab.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--primary);
}

.e10-empty {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #999;
  font-size: 12px;
}

.empty-document {
  position: relative;
  width: 82px;
  height: 56px;
  padding: 13px 12px;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 3px;
}

.empty-document::before {
  position: absolute;
  top: 9px;
  right: 9px;
  left: 9px;
  height: 7px;
  content: "";
  background: #9fc4f0;
  border-radius: 1px;
}

.empty-document i {
  display: inline-block;
  width: 22px;
  height: 4px;
  margin: 19px 5px 0 0;
  background: #e8edf2;
  border-radius: 2px;
}

.e10-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.compact-panel {
  min-height: 210px;
}

.compact-panel + .compact-panel {
  margin-top: 0;
}

.process-row {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid #ededed;
}

.process-row strong,
.process-row span {
  display: block;
}

.process-row strong {
  margin-bottom: 6px;
  color: #666;
  font-size: 12px;
  font-weight: 400;
}

.process-row div > span {
  color: #999;
  font-size: 11px;
}

.quick-launch {
  display: flex;
  width: calc(100% - 36px);
  height: 44px;
  align-items: center;
  gap: 12px;
  margin: 18px;
  padding: 0 14px;
  color: #666;
  background: #f7f8fa;
  border: 0;
  border-left: 4px solid #34a9ff;
  cursor: pointer;
  text-align: left;
}

.list-page-toolbar {
  background: #f5f6f8;
}

.e10-filterbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.filter-caption {
  min-width: 100px;
  margin-right: auto;
  color: #666;
}

.compact-field {
  width: 105px;
}

.header-inline-search {
  position: relative;
  display: inline-flex;
  width: 210px;
  height: 30px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
}

.header-inline-search .icon {
  width: 15px;
  height: 15px;
  margin-left: 9px;
  color: #aaa;
}

.header-inline-search input {
  min-width: 0;
  height: 28px;
  flex: 1;
  padding: 0 8px;
  color: #333;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.e10-list-tabs,
.list-toolbar.e10-list-tabs {
  position: relative;
  z-index: 10;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.e10-list-tabs .tabs {
  gap: 26px;
}

.e10-list-tabs .tab {
  min-height: 42px;
}

.e10-table-panel {
  position: relative;
  z-index: 6;
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: #fff;
}

.data-table {
  min-width: 900px;
  background: #fff;
  font-size: 12px;
}

.data-table th,
.data-table td {
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid #ebebeb;
}

.data-table th {
  color: #111;
  background: #fbfbfb;
  font-weight: 400;
}

.data-table tbody tr:hover {
  background: #ecf5ff;
}

.record-link {
  color: #111;
}

.flow-index-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  vertical-align: 2px;
  background: #56c8b7;
  border-radius: 50%;
}

.flow-index-dot.red {
  background: #ff6b73;
}

.pagination-bar {
  min-height: 46px;
  padding: 8px 18px;
  border-top: 1px solid #ebebeb;
}

.page-button {
  border-color: transparent;
}

.page-button.active {
  color: var(--primary);
  background: transparent;
  border-color: transparent;
}

.e10-approval-layout {
  position: relative;
  z-index: 5;
  min-height: 0;
  flex: 1;
  margin: 14px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0;
}

.approval-list {
  border-right: 1px solid #e5e5e5;
}

.approval-item {
  border-bottom: 1px solid #ebebeb;
  border-radius: 0;
}

.approval-item.active {
  background: #f1f1f1;
  box-shadow: inset 3px 0 #1785df;
}

.detail-titlebar {
  min-height: 56px;
}

.flow-canvas {
  position: relative;
  z-index: 4;
  min-height: 0;
  flex: 1;
  background: #f0f1f4;
}

.legend-button {
  position: absolute;
  top: 26px;
  right: 28px;
  width: 44px;
  height: 44px;
  color: #3184ca;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.flow-stack {
  position: absolute;
  top: 115px;
  left: 50%;
  display: flex;
  width: 205px;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.flow-node {
  width: 205px;
  height: 78px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #c9c9c9;
  border-radius: 9px;
}

.flow-node div,
.flow-node strong {
  display: flex;
  height: 39px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.flow-node div {
  color: #555;
}

.flow-node div span {
  position: absolute;
  right: 14px;
  color: #aaa;
}

.flow-node strong {
  color: #fff;
  background: #c8c8c8;
  font-weight: 400;
}

.flow-arrow {
  position: relative;
  width: 2px;
  height: 88px;
  background: #c8c8c8;
}

.flow-arrow::after {
  position: absolute;
  bottom: -1px;
  left: -4px;
  width: 0;
  height: 0;
  content: "";
  border-top: 8px solid #c8c8c8;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

.settings-sheet {
  position: relative;
  z-index: 4;
  min-height: 0;
  flex: 1;
  margin: 12px 14px 14px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e5e5;
}

.setting-row {
  display: grid;
  min-height: 66px;
  grid-template-columns: 400px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid #e8e8e8;
}

.setting-row > span {
  padding-left: 26px;
  color: #666;
  font-size: 14px;
}

.setting-row > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
  color: #333;
}

.setting-options {
  display: flex;
  flex-wrap: wrap;
  gap: 28px !important;
}

.radio-label,
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #333;
  white-space: nowrap;
}

.radio-label input,
.check-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.switch {
  width: 42px;
  height: 22px;
  border-radius: 11px;
}

.switch::after {
  width: 18px;
  height: 18px;
}

.switch.on::after {
  transform: translateX(20px);
}

.help-dot {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #fff;
  background: #aaa;
  border-radius: 50%;
  font-size: 11px;
}

.round-plus {
  width: 32px;
  height: 32px;
  color: #aaa;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  cursor: pointer;
}

.btn {
  height: 30px;
  padding: 0 16px;
  color: #666;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  font-size: 12px;
  line-height: 28px;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  color: #fff;
  background: #035f9f;
  border-color: #035f9f;
}

.input,
.select,
.textarea {
  height: 30px;
  color: #333;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  font-size: 12px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: none;
}

.tag {
  height: 22px;
  border-radius: 2px;
  line-height: 20px;
}

.recipe-grid,
.component-grid {
  position: relative;
  z-index: 4;
}

.recipe-card,
.component-card,
.token-section,
.spec-guide {
  border-radius: 2px;
}

.spec-editor {
  position: relative;
  z-index: 4;
}

.dialog {
  border-radius: 3px;
}

.dialog-header,
.dialog-footer,
.drawer-header,
.drawer-footer {
  min-height: 50px;
}

.drawer {
  top: 50px;
}

@media (max-width: 1120px) {
  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-metric {
    justify-content: flex-start;
  }

  .e10-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .setting-row {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .range-label {
    display: none;
  }
}

@media (max-width: 760px) {
  .e10-shell {
    grid-template: 50px minmax(0, 1fr) / 1fr;
  }

  .brand {
    width: auto;
    min-width: 112px;
    padding-left: 8px;
  }

  .mobile-menu-button {
    display: inline-grid;
    color: #fff;
  }

  .top-modules .top-module:not(.active),
  .top-module span,
  .top-actions .icon-button:nth-child(-n + 3),
  .user-copy {
    display: none;
  }

  .top-module {
    padding: 0 12px;
  }

  .user-menu {
    min-width: 50px;
    padding: 0 8px;
  }

  .sidebar {
    position: fixed;
    top: 50px;
    bottom: 0;
    left: 0;
    width: 220px;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    grid-row: 2;
  }

  .content-toolbar {
    padding: 0 10px;
  }

  .toolbar-buttons .btn:not(.btn-primary),
  .toolbar-buttons .select {
    display: none;
  }

  .e10-page-scroll {
    padding: 8px;
  }

  .overview-metrics,
  .e10-dashboard-grid,
  .recipe-grid,
  .component-grid,
  .spec-editor {
    grid-template-columns: 1fr;
  }

  .overview-metric {
    border-bottom: 1px solid #eee;
  }

  .e10-filterbar .compact-field {
    display: none;
  }

  .header-inline-search {
    width: min(190px, 48vw);
  }

  .setting-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .setting-row > span {
    padding: 0;
  }

  .flow-stack {
    top: 70px;
  }
}
