:root {
  color-scheme: dark;
  --shell-width: calc(100% - 12px);
  --card-column-width: calc((min(calc(100vw - 12px), 1580px) - 20px) / 3);
  --bg: #171723;
  --panel: #1e1f30;
  --panel-2: #24263a;
  --line: #34374d;
  --line-soft: #2b2e43;
  --text: #eef0fb;
  --muted: #9ea3bf;
  --green: #5d9c61;
  --green-2: #4f8553;
  --red: #b34c5d;
  --red-2: #903b4a;
  --chip: #2f3248;
  --dash: #50536b;
  font-family: "Segoe UI Variable Text", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #1d1d2a 0%, #151521 100%);
  color: var(--text);
}

html {
  scrollbar-gutter: stable;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.12;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.shell {
  width: var(--shell-width);
  margin: 0 auto;
  padding: 8px 0 14px;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 12px;
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(0, 0, 0, 0.12) 100%),
    var(--panel);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
  padding: 18px;
}

.auth-brand {
  margin-bottom: 18px;
}

.auth-title {
  margin: 0;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span,
.user-session-role,
.admin-head {
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.auth-field input {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0 12px;
  outline: 0;
}

.auth-message {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.auth-message.is-error {
  border-color: rgba(179, 76, 93, 0.65);
  color: #ffd5dc;
}

.auth-message.is-success {
  border-color: rgba(93, 156, 97, 0.6);
  color: #d7f4dc;
}

.auth-submit,
.admin-toolbar-button,
.admin-role-toggle,
.admin-status-toggle,
.admin-delete {
  min-height: 36px;
  border-radius: 3px;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.auth-submit {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-2) 100%);
  color: #f5f7ff;
}

.auth-submit:disabled,
.admin-toolbar-button:disabled,
.admin-role-toggle:disabled,
.admin-status-toggle:disabled,
.admin-delete:disabled {
  opacity: 0.6;
  cursor: default;
}

.auth-mode-toggle,
.admin-toolbar-button,
.admin-role-toggle,
.admin-status-toggle,
.admin-delete,
.admin-cancel-delete {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  color: var(--text);
}

.admin-toolbar-button,
.admin-role-toggle,
.admin-status-toggle,
.admin-delete,
.admin-cancel-delete {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.68rem;
}

.admin-delete {
  border-color: rgba(179, 76, 93, 0.45);
  color: #ffd5dc;
}

.admin-role-toggle,
.admin-status-toggle,
.admin-delete {
  justify-self: start;
  min-height: 28px;
  font-size: 0.7rem;
  letter-spacing: 0;
}

.admin-role-toggle {
  min-width: 86px;
}

.admin-role-toggle.is-admin {
  border-color: rgba(212, 165, 73, 0.48);
  color: #ffe6ad;
}

.admin-status-toggle {
  min-width: 64px;
  border-color: rgba(179, 76, 93, 0.45);
  color: #ffd5dc;
}

.admin-status-toggle.is-disabled {
  border-color: rgba(93, 156, 97, 0.48);
  color: #d7f4dc;
}

.admin-status-toggle.is-pending {
  border-color: rgba(93, 156, 97, 0.48);
  color: #d7f4dc;
}

.admin-delete.is-confirming {
  background: rgba(179, 76, 93, 0.24);
  border-color: rgba(179, 76, 93, 0.75);
  color: #fff2f5;
}

.auth-mode-toggle {
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  border-radius: 3px;
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-left,
.brand,
.nav-tabs,
.toolbar {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 18px;
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: linear-gradient(180deg, #f4f5fd 0%, #bfc4ec 100%);
  color: #181a26;
}

.brand-mark svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-title {
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-tabs {
  gap: 14px;
}

.nav-tab,
.toolbar-button,
.search input,
.field-box,
.summary-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  color: var(--text);
}

.nav-tab {
  min-height: 28px;
  padding: 0 16px;
  border-radius: 3px;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.nav-tab.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.toolbar {
  gap: 6px;
}

.user-settings {
  position: relative;
}

.app-settings {
  position: relative;
}

.notifications {
  position: relative;
}

.user-settings-menu,
.settings-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 136px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #1d1f2f;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
  z-index: 24;
}

.settings-menu {
  width: 320px;
}

.user-settings-menu {
  width: 240px;
}

.notifications-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 320px;
  max-height: 420px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #1d1f2f;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
  overflow-y: auto;
  z-index: 24;
}

.notifications-menu[hidden] {
  display: none;
}

.user-settings-menu[hidden],
.settings-menu[hidden] {
  display: none;
}

.user-session-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.user-session-email {
  font-size: 0.78rem;
  line-height: 1.4;
  word-break: break-word;
}

.user-settings-logout {
  width: 100%;
  min-height: 30px;
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.user-settings-logout:hover {
  border-color: rgba(179, 76, 93, 0.55);
  background: rgba(179, 76, 93, 0.12);
  color: #ffd5dc;
}

.user-settings-label,
.settings-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.notifications-label,
.notifications-section-label,
.notifications-config-label {
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.settings-section-label {
  margin-top: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.notifications-config {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.settings-menu .notifications-config {
  margin-top: 0;
}

.settings-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.settings-status,
.settings-hint,
.settings-message {
  font-size: 0.72rem;
  line-height: 1.35;
}

.settings-status {
  color: var(--text);
}

.settings-hint {
  color: var(--muted);
}

.settings-message {
  color: #f5f7ff;
}

.settings-message.is-error {
  color: #ff8f8f;
}

.settings-message.is-success {
  color: #8de0b4;
}

.settings-submit {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-2) 100%);
  color: #f5f7ff;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.notifications-input {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.72rem;
  outline: 0;
}

.notifications-section-label {
  margin-top: 12px;
  margin-bottom: 6px;
}

.notifications-list {
  display: grid;
  gap: 6px;
}

.notification-entry {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
}

.notification-entry-copy {
  min-width: 0;
}

.notification-entry-title {
  display: block;
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}

.notification-entry-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.71rem;
}

.notification-entry-remove {
  min-width: 58px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.notification-entry-empty {
  padding: 8px 10px;
  border: 1px dashed var(--line-soft);
  border-radius: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.user-settings-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  z-index: 24;
}

.user-settings-option {
  min-height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.user-settings-option:hover,
.user-settings-option.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-78%);
  color: var(--muted);
  pointer-events: none;
}

.search-icon svg,
.icon-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search input {
  width: 164px;
  height: 31px;
  padding: 0 12px 0 32px;
  border-radius: 3px;
  outline: 0;
  font-size: 0.82rem;
}

.toolbar-button {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--muted);
}

.toolbar-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d96475;
  box-shadow: 0 0 0 2px #1b1d2c;
  color: #fff2f5;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
}

.toolbar-badge[hidden] {
  display: none;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.content {
  padding-top: 8px;
  overflow-x: hidden;
  overflow-y: hidden;
}

.page-view[hidden] {
  display: none;
}

#dashboard-view {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: auto;
  scrollbar-color: #595d78 transparent;
}

.page-view {
  width: 100%;
  min-width: 0;
}

#markets-view,
#history-view {
  max-width: 100%;
  overflow-x: hidden;
}

#dashboard-view::-webkit-scrollbar {
  height: 14px;
}

#dashboard-view::-webkit-scrollbar-track {
  background: transparent;
}

#dashboard-view::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, #646886 0%, #4e526d 100%);
  background-clip: padding-box;
}

.markets-toolbar,
.markets-head,
.market-row,
.market-status-cell,
.market-prices-cell,
.market-quote {
  display: flex;
  align-items: center;
}

.markets-toolbar {
  justify-content: flex-start;
  margin-bottom: 8px;
}

.markets-filter-bar {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
}

.markets-filter {
  min-width: 74px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.markets-filter.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.markets-board {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.03) 100%), var(--panel);
  overflow-x: auto;
  overflow-y: hidden;
}

.markets-head,
.market-row {
  display: grid;
  grid-template-columns: minmax(300px, 2.5fr) minmax(148px, 1.15fr) minmax(148px, 1.15fr) minmax(148px, 1.15fr) 112px 112px 166px;
  gap: 10px;
  padding: 10px 12px;
  width: max-content;
  min-width: 100%;
}

.markets-head {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.market-row {
  min-height: 62px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.market-row:first-child {
  border-top: 0;
}

.market-title-cell {
  min-width: 0;
}

.market-row-title {
  display: block;
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-row-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.market-status-cell {
  gap: 8px;
  color: var(--text);
}

.market-status-score {
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
}

.market-status-meta,
.market-number-cell,
.market-mode-cell {
  color: var(--muted);
  font-size: 0.74rem;
}

.market-mode-cell,
.market-number-cell,
.market-action-cell {
  display: flex;
  align-items: center;
}

.market-action-cell {
  gap: 6px;
  justify-content: flex-end;
}

.market-action-cell.is-single-action {
  justify-content: flex-end;
}

.market-prices-cell {
  gap: 6px;
  flex-wrap: wrap;
  margin-left: -36px;
}

.markets-head > :nth-child(4) {
  margin-left: -36px;
}

.market-quote {
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
}

.market-quote-label {
  color: #d7dbf4;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
}

.market-quote-value {
  color: var(--text);
  font-size: 0.74rem;
}

.market-add-button,
.market-notify-button {
  min-width: 76px;
  min-height: 28px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-2) 100%);
  color: #f5f7ff;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.market-notify-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.market-add-button.is-added,
.market-notify-button.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.market-add-button.is-ended,
.market-notify-button:disabled,
.dialog-result-add.is-ended {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.market-add-button:disabled,
.market-notify-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-filter-form,
.admin-toolbar-actions,
.admin-page-controls {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.admin-filter-form {
  min-width: 0;
  flex-wrap: wrap;
}

.admin-toolbar-actions {
  margin-left: auto;
}

.admin-title {
  margin: 0 8px 2px 0;
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 28px;
}

.admin-field {
  display: grid;
  gap: 4px;
}

.admin-field span {
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.admin-field input,
.admin-field select {
  height: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: #11141d;
  color: var(--text);
  padding: 0 10px;
  font-size: 0.72rem;
  outline: 0;
}

.admin-field input {
  width: 254px;
}

.admin-field select {
  width: 256px;
  appearance: none;
}

.admin-page-controls {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 28px;
}

.admin-toolbar-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.admin-status {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.admin-board {
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow-x: auto;
  overflow-y: hidden;
}

.admin-head,
.admin-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(330px, 1fr) 132px 142px 72px 76px minmax(224px, auto);
  min-width: 1328px;
  gap: 10px;
  align-items: center;
  padding: 0 10px;
}

.admin-head {
  min-height: 34px;
  background: #111722;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.admin-list {
  display: grid;
}

.admin-row {
  min-height: 50px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.admin-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-row.is-active {
  background: rgba(255, 255, 255, 0.035);
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-user {
  min-width: 0;
}

.admin-user-title {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-id-cell,
.admin-date-cell,
.admin-value-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-id-cell,
.admin-date-cell {
  color: var(--muted);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.68rem;
}

.admin-value-cell {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
}

.admin-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-detail {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.admin-summary-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-summary-label,
.admin-summary-value,
.admin-summary-meta {
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.admin-summary-label {
  color: var(--muted);
}

.admin-summary-value {
  margin-top: 0;
  color: var(--text);
}

.admin-summary-value.is-positive {
  color: #8de0b4;
}

.admin-summary-value.is-negative {
  color: #ff8f8f;
}

.admin-summary-meta {
  margin-top: 0;
  color: var(--muted);
}

.admin-wallet {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-wallet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-wallet-title {
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-wallet-status,
.admin-wallet-hint,
.admin-wallet-field span {
  color: var(--muted);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.admin-wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-wallet-field {
  display: grid;
  gap: 4px;
}

.admin-wallet-field input,
.admin-wallet-field select {
  min-width: 0;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: 0;
}

.history-refresh {
  min-width: 92px;
  min-height: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.history-refresh:disabled {
  cursor: default;
  opacity: 0.72;
}

.history-board {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.03) 100%), var(--panel);
  overflow-x: auto;
  overflow-y: hidden;
}

.history-head,
.history-row {
  display: grid;
  grid-template-columns: 132px minmax(280px, 2.2fr) minmax(190px, 1.5fr) 118px 92px minmax(156px, 1.2fr);
  gap: 10px;
  padding: 10px 12px;
  width: max-content;
  min-width: 100%;
}

.history-head {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.history-row {
  min-height: 62px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.history-row:first-child {
  border-top: 0;
}

.history-time-cell,
.history-number-cell,
.history-status {
  font-size: 0.74rem;
}

.history-time-cell,
.history-number-cell {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.history-match-cell,
.history-order-cell,
.history-value-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-match-title,
.history-order-title,
.history-value-title {
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-match-meta,
.history-order-meta,
.history-value-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.71rem;
}

.history-status {
  align-self: center;
  justify-self: start;
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.history-status.is-live,
.history-status.is-delayed {
  color: #dfe8ff;
}

.history-status.is-matched {
  color: #d5f7d8;
}

.history-status.is-canceled,
.history-status.is-unmatched {
  color: #f5ddb1;
}

.history-empty {
  padding: 18px 16px;
  color: var(--muted);
  font-size: 0.76rem;
}

.history-empty.is-error {
  color: #ffd5dc;
}

.notification-toasts {
  position: fixed;
  top: 66px;
  right: 16px;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 24px));
  z-index: 28;
  pointer-events: none;
}

.notification-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(93, 156, 97, 0.55);
  border-radius: 3px;
  background: rgba(26, 31, 37, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.notification-toast-copy {
  min-width: 0;
}

.notification-toast-title {
  display: block;
  color: #eef7ef;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}

.notification-toast-meta {
  display: block;
  margin-top: 4px;
  color: #b8c7bb;
  font-size: 0.71rem;
}

.notification-toast-dismiss {
  min-width: 22px;
  min-height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(93, 156, 97, 0.35);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  color: #dfece0;
  line-height: 1;
  cursor: pointer;
}

.markets-status,
.empty-panel {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.markets-status {
  margin-top: 8px;
  padding: 14px 16px;
  font-size: 0.78rem;
}

.markets-status.is-error {
  color: #ffd5dc;
  border-color: rgba(179, 76, 93, 0.65);
}

.markets-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.markets-page-button {
  min-width: 78px;
  min-height: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.markets-page-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.markets-page-status {
  color: var(--muted);
  font-size: 0.74rem;
}

.empty-panel {
  padding: 18px 20px;
}

.empty-panel-title {
  color: var(--text);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.empty-panel-copy {
  margin-top: 8px;
  font-size: 0.76rem;
}

.live-strip,
.live-strip-track,
.live-strip-item {
  display: flex;
  align-items: center;
}

.live-strip {
  gap: 10px;
  min-height: 30px;
  margin-bottom: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.live-strip-label {
  min-width: 58px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border-right: 1px solid var(--line-soft);
  background: rgba(179, 76, 93, 0.16);
  color: #f4d7dd;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.live-strip-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.live-strip-track {
  width: max-content;
  gap: 28px;
  padding: 0 18px;
}

.live-strip-spacer {
  flex: 0 0 auto;
  height: 1px;
}

.live-strip-item {
  gap: 10px;
  white-space: nowrap;
  color: #d7dbf4;
  font-size: 0.76rem;
}

.live-strip-item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.live-strip-item:last-child::after {
  display: none;
}

.live-strip-status {
  color: var(--muted);
}

.live-strip-title {
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 600;
}

.live-strip-score {
  color: #f2f4ff;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(var(--layout-columns, 3), var(--card-column-width));
  gap: 10px;
  width: max-content;
  margin: 0 auto;
}

.match-card {
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.03) 100%), var(--panel);
  padding: 8px;
}

.match-card.is-active {
  border-color: rgba(114, 186, 125, 0.7);
  box-shadow: inset 0 0 0 1px rgba(114, 186, 125, 0.26);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-index {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--chip);
  color: #cfd3f2;
  font-size: 0.72rem;
}

.match-title {
  margin: 0;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-loss-button,
.section-stop-button,
.action-button {
  height: 28px;
  padding: 0 11px;
  border-radius: 2px;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.remove-panel-button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.remove-panel-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.stop-loss-button,
.section-stop-button {
  background: linear-gradient(180deg, var(--red) 0%, var(--red-2) 100%);
  color: #fff2f5;
  white-space: nowrap;
  text-align: center;
}

.stop-loss-button {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 120px;
}

.section-stop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stop-loss-label {
  display: block;
  text-align: center;
}

.stop-loss-hotkey {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.66rem;
}

.match-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.72rem;
}

.match-trade-strip {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.match-trade-badge {
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.match-trade-badge.is-open {
  color: #dfe8ff;
}

.match-trade-badge.is-pending {
  color: #f5ddb1;
}

.match-trade-badge.is-fill {
  color: #d5f7d8;
}

.match-trade-badge.is-error {
  color: #ffd5dc;
}

.match-trade-badge.is-auto {
  color: #f5ddb1;
}

.match-trade-badge.is-market {
  color: #cfd3f2;
}

.match-live-score {
  margin-top: 7px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.match-live-score-label {
  color: #9fd2a6;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.match-live-score-value {
  color: #d5f7d8;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1;
}

.match-live-score-status {
  color: #b8c7bb;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.69rem;
  font-weight: 600;
}

.card-status {
  margin-top: 6px;
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.7rem;
}

.card-status.is-saving {
  color: #d7dbf4;
}

.card-status.is-removing {
  color: #d7dbf4;
}

.card-status.is-error {
  color: #ffd5dc;
  border-color: rgba(179, 76, 93, 0.65);
}

.card-status.is-success {
  color: #d6ffd8;
  border-color: rgba(73, 151, 92, 0.65);
}

.manual-section,
.companion-section {
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel-2);
}

.outcome-head {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
}

.outcome-head-cell {
  min-height: 36px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  padding: 4px 8px;
}

.outcome-head-price {
  color: #f5f7ff;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.outcome-head-cell + .outcome-head-cell {
  border-left: 1px solid var(--line-soft);
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.outcome-column {
  min-width: 0;
}

.action-button {
  width: 100%;
  margin-bottom: 6px;
  color: #f5f7ff;
}

.action-button.start {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-2) 100%);
}

.action-button.stop {
  background: linear-gradient(180deg, var(--red) 0%, var(--red-2) 100%);
}

.action-button:disabled,
.section-stop-button:disabled,
.stop-loss-button:disabled,
.settings-submit:disabled {
  cursor: default;
  opacity: 0.58;
}

.field-label {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.field-box,
.summary-box {
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.8rem;
  font-weight: 600;
}

.field-box {
  margin-bottom: 6px;
}

.field-box.is-input {
  padding: 0;
}

.field-box.is-centered {
  justify-content: center;
}

.field-input {
  width: 100%;
  min-height: 22px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  outline: 0;
}

.field-input.is-centered {
  text-align: center;
}

.field-input::placeholder {
  color: #8f95b8;
  opacity: 1;
}

.field-input::-webkit-outer-spin-button,
.field-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.field-input[type="number"] {
  -moz-appearance: textfield;
}

.summary-box {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 31px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
}

.section-title {
  color: #d8dbf2;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.section-toggle-button.is-enabled {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-2) 100%);
  color: #f5f7ff;
}

.section-toggle-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.companion-market-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 8px 0;
}

.companion-market-options:not([hidden]) {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.companion-market-button,
.companion-market-status {
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
}

.companion-market-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.companion-market-button:hover:not(:disabled),
.companion-market-button:focus-visible:not(:disabled) {
  border-color: rgba(114, 186, 125, 0.7);
}

.companion-market-button.is-selected {
  border-color: rgba(114, 186, 125, 0.7);
  background: rgba(74, 127, 84, 0.38);
  color: #f3fff5;
}

.companion-market-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.companion-market-status {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.companion-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.companion-summary {
  padding: 0 8px 8px;
}

.summary-box.full {
  width: 100%;
}

.add-grid {
  display: grid;
  grid-template-columns: repeat(var(--layout-columns, 3), var(--card-column-width));
  gap: 10px;
  margin-top: 10px;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

.add-slot {
  min-height: 76px;
  border: 1px dashed var(--dash);
  border-radius: 3px;
  background: transparent;
  color: #c1c6e9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.add-slot-plus {
  font-size: 1.9rem;
  line-height: 1;
  color: #8f95b8;
}

.add-slot-text {
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dialog-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 14, 0.72);
}

.dialog-panel {
  position: relative;
  width: min(720px, calc(100vw - 24px));
  margin: 72px auto 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.08) 100%),
    var(--panel);
  padding: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.admin-delete-dialog-panel {
  width: min(420px, calc(100vw - 24px));
}

.dialog-header,
.dialog-form,
.dialog-result {
  display: flex;
  align-items: center;
}

.dialog-header {
  justify-content: space-between;
  gap: 10px;
}

.dialog-title,
.dialog-result-title {
  margin: 0;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 600;
}

.dialog-title {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.dialog-close,
.dialog-search-button,
.dialog-result-add {
  min-height: 30px;
  border-radius: 2px;
  font-family: "Segoe UI Semibold", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.dialog-close {
  width: 30px;
  padding: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  color: var(--text);
}

.dialog-form {
  gap: 8px;
  margin-top: 10px;
}

.dialog-input,
.dialog-error,
.dialog-status {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.dialog-input {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  outline: 0;
}

.dialog-search-button,
.dialog-result-add {
  padding: 0 14px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-2) 100%);
  color: #f5f7ff;
}

.dialog-error,
.dialog-status {
  margin-top: 10px;
  padding: 9px 10px;
  font-size: 0.76rem;
}

.dialog-error {
  color: #ffd5dc;
  border-color: rgba(179, 76, 93, 0.65);
}

.admin-delete-message {
  color: #ffd5dc;
  border-color: rgba(179, 76, 93, 0.45);
}

.admin-delete-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dialog-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: min(56vh, 460px);
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  overflow-y: hidden;
}

.dialog-results.is-scrollable {
  overflow-y: auto;
}

.dialog-result {
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel-2);
  padding: 10px;
}

.dialog-result-copy {
  min-width: 0;
}

.dialog-result-title {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialog-result-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 1024px) {
  .card-grid,
  .add-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .markets-head {
    display: none;
  }

  .market-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-prices-cell {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 8px);
  }

  .topbar,
  .topbar-left {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-tabs {
    gap: 8px;
    flex-wrap: wrap;
  }

  .toolbar {
    justify-content: space-between;
  }

  .live-strip {
    gap: 0;
  }

  .live-strip-label {
    min-width: 50px;
  }

  .search {
    flex: 1;
  }

  .search input {
    width: 100%;
  }

  .dialog-form,
  .dialog-result {
    flex-direction: column;
    align-items: stretch;
  }

  .markets-filter-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .markets-pagination {
    justify-content: space-between;
  }

  .markets-filter {
    min-width: 0;
  }

  .market-row {
    grid-template-columns: 1fr;
  }

  .admin-summary {
    grid-template-columns: 1fr;
  }

  .admin-wallet-grid {
    grid-template-columns: 1fr;
  }

  .admin-wallet-header {
    align-items: stretch;
    flex-direction: column;
  }

  .card-grid,
  .add-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }
}
