*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: #000000;
  color: #fafafa;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

body.page-panel {
  display: block;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: 260px;
  height: 100vh;
  padding: 1.5rem 1rem;
  background-color: #050505;
  border-right: 1px solid #1a1a1a;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.45);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #1a1a1a;
}

.sidebar-brand__logo {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  object-fit: contain;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.sidebar-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #a3a3a3;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.sidebar-link:hover {
  color: #fafafa;
  background-color: rgba(255, 255, 255, 0.04);
  border-color: #262626;
}

.sidebar-link--active {
  color: #fafafa;
  background-color: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: inset 3px 0 0 #dc2626;
}

.sidebar-link--logout {
  margin-top: auto;
  color: #737373;
}

.sidebar-link--logout:hover {
  color: #dc2626;
  background-color: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
}

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: 260px;
  min-height: 100vh;
  background-color: #000000;
}

.app-main__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 2rem 0;
}

.app-main__heading {
  flex: 1;
  min-width: 0;
}

.app-main__title {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.app-main__subtitle {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #a3a3a3;
}

.app-main__content {
  padding: 1.5rem 2rem 2rem;
}

.sidebar-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  background-color: #0a0a0a;
  border: 1px solid #262626;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-menu-btn__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fafafa;
  border-radius: 1px;
}

.sidebar-toggle {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.content-card {
  padding: 1.5rem;
  background-color: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.content-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.content-card__text {
  font-size: 0.9375rem;
  color: #a3a3a3;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background-color: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-card__subtitle {
  font-size: 0.875rem;
  color: #a3a3a3;
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  color: #fafafa;
  background-color: #141414;
  border: 1px solid #262626;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder {
  color: #525252;
}

.form-group input:focus {
  border-color: #dc2626;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fafafa;
  background-color: #dc2626;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #b91c1c;
}

.btn-primary:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #a3a3a3;
}

.auth-footer a {
  color: #dc2626;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert-error {
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #fafafa;
  background-color: rgba(220, 38, 38, 0.15);
  border: 1px solid #dc2626;
  border-radius: 8px;
  text-align: center;
}

.panel-card {
  text-align: center;
}

.btn-logout {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fafafa;
  background-color: transparent;
  border: 1px solid #262626;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.alert-success {
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #fafafa;
  background-color: rgba(34, 197, 94, 0.12);
  border: 1px solid #22c55e;
  border-radius: 8px;
}

.bot-settings-group {
  margin-bottom: 1.5rem;
  background-color: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.bot-settings-group__header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid #1a1a1a;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.08) 0%, transparent 100%);
}

.bot-settings-group__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-left: 0.75rem;
  border-left: 3px solid #dc2626;
}

.bot-settings-group__subtitle {
  margin-top: 0.5rem;
  padding-left: 0.75rem;
  font-size: 0.875rem;
  color: #a3a3a3;
}

.bot-settings-group__body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.status-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.status-cards--grouped {
  margin-bottom: 1.5rem;
}

.status-cards--grouped .status-card {
  background-color: #050505;
  border-color: #262626;
  padding: 1rem 1.125rem;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.status-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.status-overview-card {
  min-height: 4.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.status-overview-card__content {
  flex: 1 1 auto;
  min-width: 0;
}

.status-overview-card__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fafafa;
  line-height: 1.25;
  white-space: nowrap;
}

.status-overview-card__desc {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  color: rgba(250, 250, 250, 0.62);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-overview-badge {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.4375rem 0.6875rem;
  font-size: 0.75rem;
  line-height: 1;
}

.status-card {
  padding: 1.25rem 1.5rem;
  background-color: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-card__label {
  font-size: 0.875rem;
  color: #a3a3a3;
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
}

.status-badge--active {
  color: #22c55e;
  background-color: rgba(34, 197, 94, 0.12);
  border: 1px solid #22c55e;
}

.status-badge--passive {
  color: #a3a3a3;
  background-color: rgba(163, 163, 163, 0.1);
  border: 1px solid #404040;
}

.status-badge--waiting {
  color: #fafafa;
  background-color: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.45);
}

.status-badge--error {
  color: #dc2626;
  background-color: rgba(220, 38, 38, 0.15);
  border: 1px solid #dc2626;
}

.settings-section {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
}

.settings-section__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1a1a1a;
}

.settings-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: stretch;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.settings-panel-card--split {
  min-width: 0;
}

.settings-split .settings-panel-card {
  display: flex;
  flex-direction: column;
}

.settings-split .settings-form--table {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.settings-card-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 6.75rem;
}

.settings-card-body .settings-table {
  width: 100%;
}

.settings-card-body--bot {
  align-items: stretch;
  min-height: 0;
}

.settings-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #1a1a1a;
}

.settings-table--trade th {
  width: 9.5rem;
  padding-right: 1rem;
  vertical-align: middle;
}

.settings-table--trade td {
  vertical-align: middle;
}

.settings-split--trade {
  margin-bottom: 1.25rem;
}

.settings-split--trade .settings-panel-card {
  display: flex;
  flex-direction: column;
}

.settings-split--trade .settings-form--trade-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  gap: 0;
  min-height: 0;
}

.settings-split--trade .settings-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #1a1a1a;
  width: 100%;
  box-sizing: border-box;
}

.settings-form__footer--commission {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #1a1a1a;
  width: 100%;
  box-sizing: border-box;
}

.page-panel .settings-split--trade .settings-card-footer .btn-primary,
.page-panel .settings-split--trade .settings-card-footer .settings-table__btn,
.page-panel .settings-form__footer--commission .btn-primary,
.page-panel .settings-form__footer--commission .settings-table__btn {
  width: auto;
  min-width: 7.5rem;
  max-width: 100%;
  margin-top: 0;
}

.settings-panel-card--commission {
  margin-bottom: 0;
}

.settings-panel-card--commission .settings-form--commission {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.commission-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

.commission-settings__select {
  flex: 0 0 auto;
  min-width: 12rem;
}

.commission-settings__select > label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a3a3a3;
}

.commission-tier-select {
  min-width: 11rem;
}

.commission-settings__volume {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: #737373;
}

.commission-rates {
  display: flex;
  flex: 1 1 20rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.commission-rates__card {
  flex: 1 1 14rem;
  padding: 1rem 1.125rem;
  background-color: #0a0a0a;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 10px;
}

.commission-rates__title {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fafafa;
}

.commission-rates__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.8125rem;
  color: #a3a3a3;
}

.commission-rates__row + .commission-rates__row {
  margin-top: 0.5rem;
}

.commission-rates__row strong {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fafafa;
  text-align: right;
}

@media (max-width: 768px) {
  .commission-settings {
    flex-direction: column;
  }

  .commission-rates {
    width: 100%;
  }

  .commission-rates__card {
    flex: 1 1 100%;
  }
}

.settings-split--trade .settings-table--trade th {
  width: 8.5rem;
}

.settings-card-body--exit {
  align-items: stretch;
  min-height: 0;
}

.exit-mode-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.exit-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 8px;
  background-color: #0a0a0a;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.exit-mode-option:hover {
  border-color: rgba(220, 38, 38, 0.5);
}

.exit-mode-option input[type="radio"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: #dc2626;
  cursor: pointer;
}

.exit-mode-option:has(input:checked) {
  border-color: #dc2626;
  background-color: rgba(220, 38, 38, 0.1);
}

.exit-mode-option__content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.exit-mode-option__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fafafa;
  line-height: 1.35;
}

.exit-mode-option__hint {
  font-size: 0.75rem;
  color: #737373;
  line-height: 1.4;
}

.settings-table--bot th {
  width: 5.5rem;
}

.settings-table--bot .bot-select {
  width: 100%;
  max-width: 11rem;
}

.switch-field--table {
  margin: 0;
}

.settings-form--table {
  gap: 0;
}

.settings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.settings-table th,
.settings-table td {
  padding: 0.5rem 0;
  vertical-align: middle;
}

.settings-table th {
  width: 7.5rem;
  padding-right: 1rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.875rem;
  color: #a3a3a3;
  white-space: nowrap;
}

.settings-table th label {
  margin: 0;
  font-weight: 500;
  color: #a3a3a3;
}

.settings-table td .input-control {
  width: 100%;
}

.settings-table td .form-hint {
  display: block;
  margin-top: 0.35rem;
}

.settings-table__actions td {
  padding-top: 1rem;
  border-top: 1px solid #1a1a1a;
}

.settings-table__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.page-panel .settings-table__btn.btn-primary,
.page-panel .settings-table__btn.btn-secondary {
  width: auto;
  min-width: 7.5rem;
  max-width: none;
  height: 2.75rem;
  margin: 0;
  flex: 0 0 auto;
  padding: 0 1.125rem;
  font-size: 0.875rem;
}

.settings-inline-form--hidden {
  display: none;
}

.settings-panel-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.375rem;
  background-color: #050505;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.settings-panel-card--full {
  margin-bottom: 1.25rem;
}

.settings-panel-card__title {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fafafa;
  border-bottom: 1px solid #1a1a1a;
}

.settings-panel-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid #1a1a1a;
}

.settings-panel-card__footer--single {
  justify-content: flex-start;
}

.settings-inline-form {
  display: contents;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.settings-form--bot {
  gap: 1rem;
}

.bot-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.bot-toolbar__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.875rem 1.25rem;
  flex: 1 1 auto;
  min-width: 0;
}

.bot-toolbar__status {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 0 0 auto;
  padding: 0.5rem 0.875rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.bot-toolbar__status-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a3a3a3;
  white-space: nowrap;
}

.page-panel .bot-toolbar__save.btn-primary {
  width: auto;
  min-width: 6.75rem;
  max-width: none;
  height: 2.75rem;
  margin: 0;
  padding: 0 1.125rem;
  flex: 0 0 auto;
  font-size: 0.875rem;
  white-space: nowrap;
}

.bot-toolbar .switch-field--compact {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
  align-items: center;
}

.bot-interval-field {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 0 0 auto;
}

.bot-interval-field > label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a3a3a3;
  white-space: nowrap;
}

.page-panel .bot-select,
.bot-toolbar select.bot-select {
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 7.25rem;
  height: 2.75rem;
  padding: 0 2.25rem 0 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  color: #fafafa;
  color-scheme: dark;
  background-color: #0a0a0a;
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 8px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23dc2626' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-panel .bot-select:hover,
.bot-toolbar select.bot-select:hover {
  border-color: rgba(220, 38, 38, 0.65);
}

.page-panel .bot-select:focus,
.bot-toolbar select.bot-select:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.22);
}

.page-panel .bot-select option,
.bot-toolbar select.bot-select option {
  background-color: #0a0a0a;
  color: #fafafa;
}

@media (max-width: 768px) {
  .bot-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bot-toolbar__status {
    justify-content: space-between;
    width: 100%;
  }

  .bot-toolbar__controls {
    width: 100%;
  }

  .bot-interval-field {
    flex: 1 1 auto;
  }

  .page-panel .bot-select,
  .bot-toolbar select.bot-select {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .page-panel .bot-toolbar__save.btn-primary {
    width: 100%;
  }
}

.settings-form--inline {
  margin-top: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-inline {
  width: auto;
  min-width: 140px;
  margin-top: 0;
}

.btn-action {
  flex: 1 1 calc(50% - 0.375rem);
  min-width: 8.5rem;
  max-width: 100%;
  height: 2.75rem;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-panel .input-control,
.page-panel .settings-table .input-control,
.page-panel .form-group input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: #fafafa;
  color-scheme: dark;
  background-color: #0a0a0a;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-panel .input-control::placeholder,
.page-panel .form-group input::placeholder {
  color: #525252;
}

.page-panel .input-control:hover,
.page-panel .settings-table .input-control:hover,
.page-panel .form-group input:hover {
  border-color: rgba(220, 38, 38, 0.55);
}

.page-panel .input-control:focus,
.page-panel .settings-table .input-control:focus,
.page-panel .form-group input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.page-panel .input-control:-webkit-autofill,
.page-panel .input-control:-webkit-autofill:hover,
.page-panel .input-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #fafafa;
  -webkit-box-shadow: 0 0 0 1000px #0a0a0a inset;
  box-shadow: 0 0 0 1000px #0a0a0a inset;
  transition: background-color 9999s ease-out 0s;
}

.page-panel .btn-toggle {
  min-height: 2.75rem;
}

.switch-field {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
}

.switch-field__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.switch-field__slider {
  position: relative;
  flex-shrink: 0;
  width: 3rem;
  height: 1.625rem;
  margin-top: 0.125rem;
  background-color: #262626;
  border: 1px solid #404040;
  border-radius: 999px;
  transition: background-color 0.2s, border-color 0.2s;
}

.switch-field__slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background-color: #fafafa;
  border-radius: 50%;
  transition: transform 0.2s;
}

.switch-field__input:checked + .switch-field__slider {
  background-color: rgba(220, 38, 38, 0.35);
  border-color: #dc2626;
}

.switch-field__input:checked + .switch-field__slider::after {
  transform: translateX(1.375rem);
}

.switch-field__input:focus-visible + .switch-field__slider {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.switch-field__content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.switch-field__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fafafa;
}

.switch-field__hint {
  font-size: 0.8125rem;
  color: #737373;
  line-height: 1.45;
}

.worker-meta {
  display: grid;
  grid-template-columns: minmax(8.5rem, auto) 1fr;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
  padding: 1rem 1.125rem;
  background-color: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
}

.worker-meta dt {
  font-size: 0.8125rem;
  color: #737373;
  font-weight: 500;
}

.worker-meta dd {
  margin: 0;
  font-size: 0.875rem;
  color: #fafafa;
}

.worker-url {
  display: inline-block;
  max-width: 100%;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  color: #a3a3a3;
  background-color: #141414;
  border: 1px solid #262626;
  border-radius: 6px;
  word-break: break-all;
}

.worker-meta dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.btn-copy-url {
  margin-top: 0;
}

.worker-cron-hint {
  margin-top: 0.25rem;
  line-height: 1.5;
}

.worker-meta .status-badge {
  align-self: flex-start;
}

.worker-seconds-ago {
  margin-left: 0.35rem;
  font-size: 0.8125rem;
  color: #737373;
}

.local-worker-box {
  margin-top: 1rem;
  padding: 1.125rem 1.25rem;
  background-color: #0a0a0a;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 10px;
}

.local-worker-box__title {
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fafafa;
}

.worker-meta--compact {
  margin-top: 0;
  padding: 0;
  background: none;
  border: none;
}

.local-worker-notes {
  margin: 0.75rem 0 0;
  padding-left: 1.125rem;
  font-size: 0.8125rem;
  color: #a3a3a3;
  line-height: 1.55;
}

.local-worker-notes li + li {
  margin-top: 0.35rem;
}

.local-worker-notes strong {
  color: #fafafa;
  font-weight: 600;
}

.local-worker-notes code {
  font-size: 0.75rem;
  color: #dc2626;
}

.form-hint {
  font-size: 0.75rem;
  color: #737373;
}

.input-with-action {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.input-with-action input {
  flex: 1;
  min-width: 0;
}

.btn-toggle {
  flex-shrink: 0;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fafafa;
  background-color: #141414;
  border: 1px solid #262626;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-toggle:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.diag-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  background-color: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
}

.diag-box dt {
  color: #737373;
  font-weight: 500;
}

.diag-box dd {
  color: #a3a3a3;
  margin: 0;
}

.diag-ip-note {
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #fafafa;
  background-color: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 8px;
}

.diag-ip-note strong {
  color: #dc2626;
  font-weight: 600;
}

.section-hint {
  margin-bottom: 1rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: #dc2626;
  cursor: pointer;
}

@media (max-width: 992px) {
  .settings-split {
    grid-template-columns: 1fr;
  }

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

  .settings-table th {
    display: block;
    width: auto;
    padding: 0 0 0.35rem;
  }

  .settings-table td {
    display: block;
    padding: 0 0 0.875rem;
  }

  .settings-table__actions td {
    display: table-cell;
  }

  .btn-action {
    flex: 1 1 100%;
  }
}

@media (max-width: 992px) {
  .bot-settings-group__header,
  .bot-settings-group__body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .sidebar-menu-btn {
    display: flex;
  }

  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    cursor: pointer;
  }

  .sidebar-toggle:checked ~ .app-shell .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle:checked ~ .app-shell .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .app-main {
    margin-left: 0;
  }

  .app-main__header {
    padding: 1rem 1.25rem 0;
  }

  .app-main__content {
    padding: 1rem 1.25rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .status-cards {
    grid-template-columns: 1fr;
  }

  .status-cards--grouped .status-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-overview-card {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem;
  }

  .auth-card__title {
    font-size: 1.25rem;
  }
}

/* Dashboard / Panel */
.dashboard-balance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dashboard-root {
  animation: dashboardFadeIn 0.22s ease-out;
}

.dashboard-root--hydrating .dashboard-panel-card,
.dashboard-root--hydrating .dashboard-balance-card {
  opacity: 0.96;
}

.dashboard-live-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  color: #d4d4d4;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dashboard-root--polling .dashboard-live-strip {
  border-color: rgba(74, 222, 128, 0.16);
  background-color: rgba(255, 255, 255, 0.012);
}

.dashboard-live-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.75rem;
}

.dashboard-live-strip__item--right {
  justify-content: flex-end;
  color: #a3a3a3;
}

.dashboard-live-strip__muted {
  color: #858585;
}

.dashboard-live-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #737373;
}

.dashboard-live-dot::after {
  content: "";
  position: absolute;
  inset: -0.25rem;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0;
  animation: dashboardCalmPulse 1.8s ease-out infinite;
}

.dashboard-live-dot--active {
  color: rgba(74, 222, 128, 0.42);
  background: #4ade80;
}

.dashboard-live-dot--waiting {
  color: rgba(250, 204, 21, 0.38);
  background: #facc15;
}

.dashboard-live-dot--delayed,
.dashboard-live-dot--off {
  color: rgba(248, 113, 113, 0.34);
  background: #f87171;
}

.dashboard-scan-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.dashboard-scan-dots::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  text-align: left;
  animation: dashboardScanDots 1.25s steps(4, end) infinite;
}

.dashboard-balance-card {
  min-height: 5.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.dashboard-balance-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.13);
  background-color: rgba(255, 255, 255, 0.015);
}

.dashboard-balance-card--accent {
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.dashboard-balance-card__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.72);
}

.dashboard-balance-card__value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.dashboard-balance-card__value--profit {
  color: #4ade80;
}

.dashboard-balance-card__unit {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(250, 250, 250, 0.55);
}

.dashboard-balance-card__desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(250, 250, 250, 0.58);
}

.dashboard-value-updated {
  animation: dashboardValueUpdated 0.7s ease-out;
}

.dashboard-meta-note {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  color: rgba(250, 250, 250, 0.5);
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.dashboard-panel-card {
  padding: 1.125rem 1.25rem 1.25rem;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    #0a0a0a;
  min-width: 0;
  height: 100%;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dashboard-panel-card--profit,
.dashboard-panel-card--kasa {
  display: flex;
  flex-direction: column;
}

.dashboard-panel-card--kasa {
  padding: 1rem 1.125rem 1rem;
}

.dashboard-panel-card--kasa .dashboard-panel-card__header {
  margin-bottom: 0.75rem;
}

.dashboard-panel-card--kasa .dashboard-panel-card__subtitle {
  font-size: 0.75rem;
  line-height: 1.35;
}

.dashboard-panel-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-panel-card--kasa .dashboard-panel-card__body {
  flex: 1;
  justify-content: space-between;
}

.dashboard-alert--hidden {
  display: none;
}

.dashboard-panel-card__header {
  margin-bottom: 0.875rem;
}

.dashboard-panel-card--profit .dashboard-panel-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.dashboard-panel-card--profit .dashboard-panel-card__heading {
  flex: 1 1 12rem;
  min-width: 0;
}

.dashboard-panel-card--profit .dashboard-filter-row {
  margin-bottom: 0;
  flex: 0 1 auto;
}

.dashboard-panel-card__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fafafa;
}

.dashboard-panel-card__subtitle {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: #a3a3a3;
}

.dashboard-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.dashboard-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #d4d4d4;
  text-decoration: none;
  border: 1px solid #262626;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s, transform 0.2s ease;
}

.dashboard-filter-btn:hover {
  color: #fafafa;
  border-color: rgba(220, 38, 38, 0.35);
  background-color: rgba(220, 38, 38, 0.08);
  transform: translateY(-1px);
}

.dashboard-filter-btn--active {
  color: #fafafa;
  border-color: rgba(220, 38, 38, 0.55);
  background-color: rgba(220, 38, 38, 0.18);
  box-shadow: inset 0 -2px 0 rgba(248, 113, 113, 0.42);
}

.dashboard-profit-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 0.75rem 1.25rem;
  align-items: end;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  margin-bottom: 0.875rem;
  flex-shrink: 0;
}

.dashboard-profit-summary__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.dashboard-profit-summary__side {
  text-align: right;
  min-width: 0;
}

.dashboard-profit-summary__label {
  font-size: 0.75rem;
  color: #a3a3a3;
}

.dashboard-profit-summary__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fafafa;
  line-height: 1.15;
}

.dashboard-profit-summary__value--positive {
  color: #4ade80;
}

.dashboard-profit-summary__breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: #d4d4d4;
}

.dashboard-profit-summary__note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.6875rem;
  color: rgba(250, 250, 250, 0.5);
}

.dashboard-mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex: 1;
  min-height: 13.5rem;
  margin-top: auto;
  padding: 0.875rem 0.875rem 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent calc(25% - 1px),
      rgba(255, 255, 255, 0.04) calc(25% - 1px),
      rgba(255, 255, 255, 0.04) 25%
    );
  transition: opacity 0.18s ease, border-color 0.2s ease;
}

.dashboard-mini-chart--updating {
  opacity: 0.72;
}

.dashboard-mini-chart[data-bar-count="24"],
.dashboard-mini-chart[data-bar-count="30"] {
  gap: 0.1875rem;
  padding-inline: 0.625rem;
}

.dashboard-mini-chart[data-bar-count="24"] .dashboard-mini-chart__bar,
.dashboard-mini-chart[data-bar-count="30"] .dashboard-mini-chart__bar {
  width: 70%;
  max-width: 0.875rem;
}

.dashboard-mini-chart__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-mini-chart__item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  z-index: 5;
  display: none;
  transform: translateX(-50%);
  max-width: 12rem;
  padding: 0.375rem 0.5rem;
  color: #fafafa;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.dashboard-mini-chart__item:hover::after {
  display: block;
}

.dashboard-mini-chart__bar-wrap {
  width: 100%;
  height: 10.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dashboard-mini-chart__bar {
  width: 62%;
  max-width: 1.75rem;
  min-height: 0.375rem;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #ef4444, rgba(185, 28, 28, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: height 0.25s ease, background-color 0.2s ease;
}

.dashboard-mini-chart__bar--zero {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  min-height: 0.25rem;
  max-height: 0.375rem;
}

.dashboard-mini-chart__label {
  font-size: 0.6875rem;
  color: #a3a3a3;
  white-space: nowrap;
}

.dashboard-mini-chart[data-bar-count="24"] .dashboard-mini-chart__label,
.dashboard-mini-chart[data-bar-count="30"] .dashboard-mini-chart__label {
  font-size: 0.5625rem;
}

.dashboard-kasa-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dashboard-kasa-stat {
  padding: 0.625rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.dashboard-kasa-stats--compact {
  margin-bottom: 0.75rem;
}

.dashboard-kasa-stat__label {
  font-size: 0.6875rem;
  color: #a3a3a3;
}

.dashboard-kasa-stat__value {
  font-size: 1rem;
  font-weight: 700;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-kasa-stat__value--accent {
  color: #4ade80;
}

.dashboard-kasa-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.dashboard-kasa-action-group {
  padding-top: 0.875rem;
  border-top: 1px solid #1a1a1a;
}

.dashboard-kasa-action-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.dashboard-kasa-action-group:first-child .dashboard-kasa-action-group__title {
  margin-top: 0;
}

.dashboard-kasa-action-group__title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #d4d4d4;
}

.dashboard-kasa-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dashboard-kasa-row:focus-within {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(255, 255, 255, 0.026);
}

.dashboard-kasa-row__input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.5625rem 0.75rem;
  font-size: 0.8125rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dashboard-kasa-row__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-compact.btn-primary,
.btn-compact.btn-secondary {
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.625rem;
  font-size: 0.6875rem;
  line-height: 1.25;
  white-space: nowrap;
}

.dashboard-split--coins {
  margin-top: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
}

.dashboard-panel-card--coins {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 27.5rem;
  padding: 1rem 1.125rem 1.125rem;
  min-width: 0;
  overflow: hidden;
}

.dashboard-panel-card__header--compact {
  margin-bottom: 0.625rem;
}

.dashboard-coin-table-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 23.5rem;
  min-height: 23.5rem;
  max-height: 23.5rem;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  scrollbar-width: thin;
  scrollbar-color: rgba(220, 38, 38, 0.45) rgba(255, 255, 255, 0.05);
}

.dashboard-coin-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.dashboard-coin-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(220, 38, 38, 0.45);
  border-radius: 999px;
}

.dashboard-coin-table {
  width: max(100%, 39rem);
  min-width: 39rem;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
}

.dashboard-coin-table th,
.dashboard-coin-table td {
  box-sizing: border-box;
}

.dashboard-coin-col--asset {
  width: 4.5rem;
}

.dashboard-coin-col--status {
  width: 5.35rem;
}

.dashboard-coin-col--net {
  width: 10.35rem;
}

.dashboard-coin-col--capital {
  width: 8.6rem;
}

.dashboard-coin-col--duration {
  width: 6.45rem;
}

.dashboard-coin-col--action {
  width: 3.75rem;
}

.dashboard-coin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.5625rem 0.5rem;
  text-align: left;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.55);
  background: #101010;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-coin-table thead th.dashboard-coin-table__asset,
.dashboard-coin-table thead th.dashboard-coin-table__status-cell,
.dashboard-coin-table thead th.dashboard-coin-table__net,
.dashboard-coin-table thead th.dashboard-coin-table__capital,
.dashboard-coin-table thead th.dashboard-coin-table__duration {
  color: rgba(250, 250, 250, 0.55);
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-coin-table tbody td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e5e5e5;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dashboard-coin-row {
  position: relative;
  --dashboard-coin-row-bg: #0b0b0b;
  background: var(--dashboard-coin-row-bg);
  transition: background-color 0.2s ease;
}

.dashboard-coin-table tbody tr:nth-child(even) {
  --dashboard-coin-row-bg: #0f0f0f;
}

.dashboard-coin-table tbody tr:hover {
  --dashboard-coin-row-bg: #141414;
}

.dashboard-coin-row--enter {
  animation: dashboardRowEnter 0.42s ease-out;
}

.dashboard-coin-table__asset {
  font-weight: 700;
  color: #fafafa;
  text-align: left;
}

.dashboard-coin-table tbody .dashboard-coin-table__asset {
  position: relative;
}

.dashboard-coin-table tbody .dashboard-coin-table__asset::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  pointer-events: none;
}

.dashboard-coin-row--profit .dashboard-coin-table__asset::before {
  background: rgba(74, 222, 128, 0.72);
}

.dashboard-coin-row--loss .dashboard-coin-table__asset::before {
  background: rgba(248, 113, 113, 0.72);
}

.dashboard-coin-table__status-cell {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-coin-table__net {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-coin-table__net-text {
  display: inline-block;
  max-width: calc(100% - 1rem);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.dashboard-coin-trend {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.625rem;
  line-height: 1;
  color: #858585;
  vertical-align: middle;
}

.dashboard-coin-trend--up {
  color: #4ade80;
}

.dashboard-coin-trend--down {
  color: #f87171;
}

.dashboard-coin-net--flash-up {
  animation: dashboardNetFlashUp 0.75s ease-out;
}

.dashboard-coin-net--flash-down {
  animation: dashboardNetFlashDown 0.75s ease-out;
}

.dashboard-coin-table__capital {
  font-variant-numeric: tabular-nums;
  color: #fafafa;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-coin-table__capital-main,
.dashboard-coin-table__capital-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-coin-table__capital-sub {
  margin-top: 0.0625rem;
  color: #a3a3a3;
  font-size: 0.625rem;
}

.dashboard-coin-table__duration {
  color: #a3a3a3;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-coin-table__action {
  position: sticky;
  right: 0;
  z-index: 4;
  min-width: 3.75rem;
  width: 3.75rem;
  max-width: 3.75rem;
  padding-left: 0.375rem;
  padding-right: 0.375rem;
  text-align: right;
  white-space: nowrap;
  overflow: visible;
  background: var(--dashboard-coin-row-bg);
}

.dashboard-coin-table thead th:nth-child(6) {
  position: sticky;
  right: 0;
  z-index: 6;
  min-width: 3.75rem;
  width: 3.75rem;
  max-width: 3.75rem;
  text-align: right;
  background: #101010;
}

.dashboard-coin-sell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  min-width: 2.35rem;
  max-width: 2.35rem;
  padding: 0.21875rem 0.375rem;
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fafafa;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.dashboard-coin-sell-btn:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.28);
  border-color: rgba(248, 113, 113, 0.7);
  transform: translateY(-1px);
}

.dashboard-coin-sell-btn:disabled {
  color: #737373;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
}

.dashboard-coin-table tbody tr {
  height: 2.55rem;
}

.dashboard-coin-table__empty td {
  padding: 1.5rem 0.75rem;
  text-align: center;
  color: #737373;
}

.dashboard-coin-status {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.dashboard-coin-status--profit {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.dashboard-coin-status--loss {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.dashboard-coin-status--flat {
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-coin-net--profit {
  color: #4ade80;
}

.dashboard-coin-net--loss {
  color: #f87171;
}

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

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dashboard-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.dashboard-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.32);
  border-radius: 14px;
  background: #0a0a0a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.dashboard-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.dashboard-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #fafafa;
}

.dashboard-modal__close {
  width: 2rem;
  height: 2rem;
  color: #a3a3a3;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  cursor: pointer;
}

.dashboard-modal__note {
  margin-bottom: 0.875rem;
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: #d4d4d4;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.08);
}

.dashboard-modal__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.dashboard-modal__metrics div {
  min-width: 0;
  padding: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.dashboard-modal__metrics dt {
  margin-bottom: 0.1875rem;
  font-size: 0.6875rem;
  color: #a3a3a3;
}

.dashboard-modal__metrics dd {
  min-width: 0;
  color: #fafafa;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-modal__label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #d4d4d4;
}

.dashboard-modal__input {
  width: 100%;
  margin-bottom: 0.875rem;
  padding: 0.625rem 0.75rem;
  color: #fafafa;
  background: #141414;
  border: 1px solid #262626;
  border-radius: 10px;
  outline: none;
}

.dashboard-modal__input:focus {
  border-color: rgba(220, 38, 38, 0.65);
}

.dashboard-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.dashboard-toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 650;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.dashboard-toast {
  padding: 0.75rem 0.875rem;
  color: #fafafa;
  font-size: 0.8125rem;
  line-height: 1.35;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
  animation: dashboardToastIn 0.2s ease-out;
}

.dashboard-toast--success {
  border-left: 3px solid rgba(74, 222, 128, 0.86);
}

.dashboard-toast--error {
  border-left: 3px solid rgba(248, 113, 113, 0.86);
}

.dashboard-toast--leaving {
  animation: dashboardToastOut 0.22s ease-in forwards;
}

@media (max-width: 1280px) {
  .dashboard-split--coins {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .dashboard-balance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .dashboard-live-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-live-strip__item--right {
    justify-content: flex-start;
  }

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

  .dashboard-balance-card__value {
    font-size: 1.25rem;
  }

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

  .dashboard-profit-summary__side {
    text-align: left;
  }

  .dashboard-profit-summary__breakdown {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .dashboard-panel-card--coins {
    padding: 0.875rem 0.75rem 1rem;
  }

  .dashboard-coin-table {
    width: max(100%, 37rem);
    min-width: 37rem;
    font-size: 0.6875rem;
  }

  .dashboard-coin-col--asset {
    width: 4.15rem;
  }

  .dashboard-coin-col--status {
    width: 5.05rem;
  }

  .dashboard-coin-col--net {
    width: 9.7rem;
  }

  .dashboard-coin-col--capital {
    width: 8rem;
  }

  .dashboard-coin-col--duration {
    width: 6.45rem;
  }

  .dashboard-coin-col--action {
    width: 3.65rem;
  }

  .dashboard-coin-table thead th,
  .dashboard-coin-table tbody td {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
  }

  .dashboard-coin-table__duration {
    font-size: 0.6875rem;
  }

  .dashboard-coin-table__action,
  .dashboard-coin-table thead th:nth-child(6) {
    min-width: 3.65rem;
    width: 3.65rem;
    max-width: 3.65rem;
  }

  .dashboard-coin-sell-btn {
    width: 2.25rem;
    min-width: 2.25rem;
    max-width: 2.25rem;
    padding: 0.1875rem 0.3125rem;
  }
}

@keyframes dashboardFadeIn {
  from {
    opacity: 0.96;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboardCalmPulse {
  0% {
    opacity: 0.35;
    transform: scale(0.72);
  }
  80%,
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes dashboardScanDots {
  0% {
    width: 0;
  }
  100% {
    width: 1.25rem;
  }
}

@keyframes dashboardValueUpdated {
  0% {
    background-color: rgba(255, 255, 255, 0.08);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes dashboardNetFlashUp {
  0% {
    background-color: rgba(74, 222, 128, 0.13);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes dashboardNetFlashDown {
  0% {
    background-color: rgba(248, 113, 113, 0.13);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes dashboardRowEnter {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboardToastIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboardToastOut {
  to {
    opacity: 0;
    transform: translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-root,
  .dashboard-live-dot::after,
  .dashboard-scan-dots::after,
  .dashboard-value-updated,
  .dashboard-coin-net--flash-up,
  .dashboard-coin-net--flash-down,
  .dashboard-coin-row--enter,
  .dashboard-toast,
  .dashboard-toast--leaving {
    animation: none !important;
  }

  .dashboard-balance-card,
  .dashboard-filter-btn,
  .dashboard-mini-chart__bar,
  .dashboard-coin-table tbody td {
    transition: none !important;
  }
}
