﻿html {
  font-size: 14px;
  overflow-y: scroll;
}

body {
  background: #f5f6f8;
  color: #1d232b;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

.app-shell {
  max-width: 1440px;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #d9dde3;
}

.topbar .app-shell {
  align-items: center;
  display: flex;
  height: 44px;
}

.topbar-actions {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  margin-left: auto;
}

.portfolio-switcher {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.portfolio-switcher label {
  color: #536071;
  font-size: 12px;
  font-weight: 700;
}

.portfolio-switcher select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #667085 50%) calc(100% - 15px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #667085 50%, transparent 50%) calc(100% - 11px) 50% / 6px 6px no-repeat,
    #f8fafc;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  font-size: 12px;
  font-weight: 700;
  height: 28px;
  min-width: 150px;
  padding: 0 28px 0 10px;
}

.brand {
  align-items: center;
  color: #1d232b;
  display: inline-flex;
  font-weight: 700;
  gap: 9px;
  margin-right: 28px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: #1d232b;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  height: 26px;
  justify-content: center;
  letter-spacing: 0;
  width: 26px;
}

main {
  background: #fff;
  border-left: 1px solid #e0e3e8;
  border-right: 1px solid #e0e3e8;
  margin-top: 20px;
  min-height: calc(100vh - 52px);
}

.portfolio-context {
  align-items: center;
  border-bottom: 1px solid #d9dde3;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 1fr) auto;
  min-height: 58px;
  padding: 10px 18px;
}

.portfolio-context span {
  color: #68707a;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}

.portfolio-context h1 {
  color: #111827;
  font-size: 20px;
  line-height: 1.1;
  margin: 0;
}

.portfolio-context dl {
  display: grid;
  gap: 0;
  grid-auto-flow: column;
  margin: 0;
}

.portfolio-context dl div {
  border-left: 1px solid #d9dde3;
  min-width: 118px;
  padding: 0 14px;
}

.portfolio-context dt {
  color: #68707a;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.portfolio-context dd {
  color: #1d232b;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.summary-strip {
  align-items: stretch;
  border-bottom: 1px solid #d9dde3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  min-height: 86px;
}

.stock-summary-regular {
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(170px, 1.35fr);
}

.stock-summary-with-extended {
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(170px, 1.35fr);
}

.option-summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(170px, 1.35fr);
}

.metric {
  border-right: 1px solid #d9dde3;
  padding: 14px 18px;
}

.metric.hidden {
  display: none;
}

.metric span {
  color: #111;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.metric strong {
  display: block;
  font-size: 21px;
  line-height: 1.1;
  white-space: nowrap;
}

.metric small {
  font-size: 16px;
}

.metric .metric-note {
  color: #667085;
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 6px;
  white-space: normal;
}

.metric [data-live-metric="athDistance"] {
  font-size: 18px;
}

.metric [data-live-metric="athDistance"] small {
  font-size: 14px;
}

.metric.meta strong {
  color: #32425a;
  font-size: 18px;
}

.portfolio-thin-strip {
  align-items: center;
  background: #fbfcfe;
  border-bottom: 1px solid #d9dde3;
  display: flex;
  gap: 0;
  min-height: 38px;
  padding: 0 18px;
}

.portfolio-thin-strip div {
  align-items: baseline;
  border-right: 1px solid #e1e5eb;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
  padding: 0 18px 0 0;
  margin-right: 18px;
}

.portfolio-thin-strip span,
.portfolio-thin-strip small {
  color: #667085;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.portfolio-thin-strip strong {
  color: #1d232b;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.portfolio-thin-strip strong.positive,
.portfolio-thin-strip strong.negative,
.portfolio-thin-strip strong .positive,
.portfolio-thin-strip strong .negative {
  font-weight: 600;
}

.portfolio-thin-strip strong small {
  font-size: 12px;
}

.historical-panel {
  padding: 20px 12px 32px;
}

.historical-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.historical-header h2 {
  color: #0f1b2d;
  font-size: 18px;
  margin: 0 0 4px;
}

.historical-header span {
  color: #5f6b7a;
  font-size: 12px;
}

.historical-tools {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.historical-range-tabs {
  align-items: center;
  border: 1px solid #c8d0dc;
  border-radius: 5px;
  display: inline-flex;
  overflow: hidden;
}

.historical-range-tabs button {
  background: #f8fafc;
  border: 0;
  border-right: 1px solid #c8d0dc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  height: 30px;
  min-width: 48px;
  padding: 0 12px;
}

.historical-range-tabs button:last-child {
  border-right: 0;
}

.historical-range-tabs button:hover,
.historical-range-tabs button.active {
  background: #596bff;
  color: #fff;
}

.historical-column-toggle {
  background: #eef1f5;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  font-size: 12px;
  font-weight: 600;
  height: 30px;
  padding: 0 12px;
}

.historical-column-toggle:hover {
  background: #e4e9f1;
}

.historical-column-panel {
  border-top: 1px solid #d9dde3;
  margin: -4px 0 12px;
}

.historical-chart-wrap {
  border: 1px solid #d7dde8;
  border-radius: 6px;
  height: 300px;
  margin-bottom: 16px;
  padding: 10px;
}

.historical-table-wrap {
  border: 1px solid #d7dde8;
  overflow: auto;
}

.historical-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.historical-table th,
.historical-table td {
  border-bottom: 1px solid #d9dde3;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}

.historical-table th {
  background: #f5f7fb;
  font-weight: 600;
}

.historical-table .num {
  text-align: right;
}

.positive {
  color: #178900 !important;
  font-weight: 700;
}

.negative {
  color: #e00000 !important;
  font-weight: 700;
}

.toolbar {
  align-items: flex-start;
  border-bottom: 1px solid #d9dde3;
  display: grid;
  gap: 16px 24px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  padding: 22px 12px 16px;
}

.toolbar-side {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: 4;
  grid-row: 1;
}

.refresh-control {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.option-add-fields {
  grid-template-columns: 110px 80px 130px 110px 105px 135px 105px 130px auto;
}

.option-portfolio-panel {
  padding: 16px 12px 32px;
}

.option-panel-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.option-panel-header h2 {
  color: #0f1b2d;
  font-size: 18px;
  margin: 0;
}

.option-panel-header span {
  color: #5f6b7a;
  font-size: 12px;
  font-weight: 700;
}

.option-table {
  border: 1px solid #d9dde3;
}

.option-table[data-grid-id="mixed-option-closed"] thead th:last-child,
.option-table[data-grid-id="mixed-option-closed"] tbody > tr:not(.option-edit-row) > td:last-child,
.option-table[data-grid-id="mixed-option-closed"] tfoot td:last-child {
  max-width: 86px;
  min-width: 76px;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
  width: 1%;
}

.empty-state {
  color: #5f6b7a;
  font-weight: 700;
  padding: 18px 12px;
  text-align: center;
}

.settings-button {
  align-items: center;
  background: #eef1f5;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
}

.settings-button:hover {
  background: #e1e7ef;
}

.logout-form {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin: 0;
}

.logout-form span {
  color: #536071;
  font-size: 12px;
  font-weight: 700;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-form button {
  align-items: center;
  background: #fff;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  height: 28px;
  justify-content: center;
  padding: 0 10px;
}

.logout-form button:hover {
  background: #f4f7fb;
}

.logout-icon {
  display: block;
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 15px;
}

.refresh-status {
  align-items: center;
  background: #f4f7fb;
  border: 1px solid #cfd6df;
  border-radius: 999px;
  color: #536071;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  white-space: nowrap;
}

.refresh-status::before {
  animation: statusSpin 1s linear infinite;
  border: 2px solid #cbd5e1;
  border-top-color: #596bff;
  border-radius: 50%;
  content: "";
  height: 12px;
  width: 12px;
}

.refresh-status.error {
  background: #fff1f1;
  border-color: #f0b9b9;
  color: #c31b1b;
  font-weight: 700;
}

.refresh-status.error::before {
  animation: none;
  background: #c31b1b;
  border: 0;
  height: 8px;
  width: 8px;
}

.refresh-button {
  align-items: center;
  background: #f4f7fb;
  border: 1px solid #cfd6df;
  border-radius: 999px;
  color: #38465c;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 28px;
}

.refresh-button:hover {
  background: #edf2fb;
  border-color: #aeb9cc;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.refresh-button:disabled span {
  animation: statusSpin 0.8s linear infinite;
}

.position-add-form {
  display: contents;
}

.toolbar > .position-add-form .position-add-search {
  align-self: start;
  grid-row: 1;
}

.toolbar > .stock-add-form .position-add-search,
.toolbar > .option-add-form:not(.option-add-inline) .position-add-search {
  grid-column: 1;
}

.toolbar > .option-add-inline .position-add-search {
  grid-column: 2;
}

.toolbar > .position-add-form .position-add-fields {
  grid-column: 1 / 4;
  grid-row: 2;
}

.toolbar > .position-add-form .position-message {
  grid-column: 1 / 4;
  grid-row: 3;
}

body.modal-open {
  overflow: hidden;
}

.settings-modal[hidden] {
  display: none;
}

.settings-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1000;
}

.settings-backdrop {
  background: rgba(15, 23, 42, 0.42);
  inset: 0;
  position: absolute;
}

.settings-panel {
  background: #fff;
  border: 1px solid #cfd6df;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
  max-width: 520px;
  position: relative;
  width: min(100%, 520px);
}

.settings-header {
  align-items: center;
  border-bottom: 1px solid #d9dde3;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.settings-header h2 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.settings-close {
  align-items: center;
  background: #fff;
  border: 1px solid #b9c1cc;
  border-radius: 50%;
  display: inline-flex;
  font-size: 18px;
  height: 26px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 26px;
}

.import-form {
  border-bottom: 1px solid #e1e5eb;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.import-form:last-child {
  border-bottom: 0;
}

.portfolio-management {
  border-bottom: 1px solid #e1e5eb;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.portfolio-management h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0;
}

.portfolio-management p {
  color: #4b5563;
  font-size: 12px;
  margin: 0;
}

.portfolio-management-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.portfolio-management-form label {
  display: grid;
  gap: 5px;
}

.portfolio-management-form label span {
  color: #68707a;
  font-size: 11px;
  font-weight: 700;
}

.portfolio-management-form input {
  border: 1px solid #c8cdd4;
  font-size: 12px;
  height: 32px;
  padding: 4px 6px;
}

.portfolio-management-form button,
.portfolio-delete-form button {
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  padding: 0 12px;
}

.portfolio-management-form button {
  background: #eef1f5;
  border: 1px solid #b8c0cc;
  color: #1d232b;
}

.portfolio-delete-form {
  display: flex;
  justify-content: flex-start;
}

.portfolio-delete-form button {
  background: #fff5f5;
  border: 1px solid #e28a8a;
  color: #b91c1c;
}

.import-form h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0;
}

.import-form p {
  color: #4b5563;
  font-size: 12px;
  margin: 0;
}

.import-form label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.import-form label span {
  color: #68707a;
  font-size: 11px;
  font-weight: 700;
}

.import-form label strong {
  color: #1d232b;
  font-size: 13px;
}

.import-form input {
  border: 1px solid #c8cdd4;
  font-size: 12px;
  height: 32px;
  padding: 4px 6px;
}

.import-form button {
  justify-self: start;
  background: #1d232b;
  border: 1px solid #1d232b;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  padding: 0 12px;
}

.position-add-search {
  align-items: center;
  display: flex;
  gap: 14px;
}

.position-add-toggle {
  align-items: center;
  background: #eef1f5;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  height: 28px;
  margin: 0;
  padding: 0 10px 0 8px;
}

.toggle-mark {
  border: 1px solid #8f99a8;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 16px;
  height: 16px;
  position: relative;
  width: 16px;
}

.toggle-mark::before,
.toggle-mark::after {
  background: #334155;
  content: "";
  height: 2px;
  left: 3px;
  position: absolute;
  top: 6px;
  width: 8px;
}

.toggle-mark::after {
  transform: rotate(90deg);
}

.position-add-form.open .toggle-mark::after {
  opacity: 0;
}

.position-add-toggle:hover {
  background: #e1e7ef;
}

.position-symbol-field {
  display: grid;
  gap: 6px;
  position: relative;
}

.position-add-fields .position-symbol-field span {
  color: #9aa1ab;
  font-size: 12px;
  font-weight: 700;
}

.position-add-fields .position-symbol-field input.symbol-valid {
  border-color: #178900;
}

.position-add-fields .position-symbol-field input.symbol-invalid {
  border-color: #d61f1f;
}

.symbol-suggestions {
  background: #fff;
  border: 1px solid #b8c0cc;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  position: absolute;
  top: 30px;
  width: 360px;
  z-index: 8;
}

.position-add-fields .symbol-suggestions {
  top: 53px;
}

.symbol-suggestion {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  color: #1d232b;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.symbol-suggestion:hover {
  background: #f4f7fb;
}

.symbol-suggestion strong {
  color: #0645ad;
  font-size: 12px;
}

.symbol-suggestion span,
.symbol-suggestion small {
  color: #68707a;
  font-size: 11px;
}

.symbol-suggestion small {
  color: #9aa2ad;
}

.symbol-suggestion.empty {
  color: #68707a;
  font-size: 12px;
}

.position-add-fields {
  align-items: end;
  display: none;
  gap: 14px;
  grid-template-columns: 115px 132px 115px 115px 115px minmax(120px, auto);
  max-width: 778px;
}

.stock-add-fields {
  grid-template-columns: 115px 132px 115px 115px 115px minmax(120px, auto);
  max-width: 778px;
}

.stock-add-fields .position-symbol-field {
  grid-column: 1 / 3;
  grid-row: 1;
}

.stock-add-fields > label,
.stock-add-fields > .position-submit {
  grid-row: 2;
}

.position-add-form.open .position-add-fields {
  display: grid;
}

.position-add-fields label {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.position-add-fields label span {
  color: #9aa1ab;
  font-size: 12px;
  font-weight: 700;
}

.position-add-fields input,
.position-add-fields select,
.position-add-fields .position-symbol-field input {
  border: 1px solid #c8cdd4;
  box-sizing: border-box;
  color: #1d232b;
  height: 25px;
  min-width: 0;
  padding: 0 7px;
  width: 100%;
}

.position-submit {
  align-items: center;
  background: #eef1f5;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  height: 28px;
  justify-content: center;
  padding: 0 10px;
}

.position-submit:hover {
  background: #e1e7ef;
}

.position-submit:disabled {
  background: #f4f6f8;
  border-color: #d5dae1;
  color: #9aa1ab;
  cursor: not-allowed;
  opacity: 0.45;
}

.submit-icon {
  color: currentColor;
  font-size: 15px;
  line-height: 1;
}

.position-message {
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  justify-self: start;
  line-height: 1.35;
  max-width: 760px;
  overflow: hidden;
  padding: 10px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: min(100%, 760px);
}

.position-message.success {
  background: #e9f9ef;
  color: #168500;
}

.position-message.error {
  background: #fff1f1;
  color: #c31b1b;
}

.auth-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 130px);
  padding: 28px 16px;
}

.auth-panel {
  background: #fff;
  border: 1px solid #d9dde3;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  max-width: 380px;
  padding: 28px;
  width: 100%;
}

.auth-brand {
  margin: 0 0 22px;
}

.auth-panel h1 {
  color: #111827;
  font-size: 22px;
  margin: 0 0 10px;
}

.auth-panel p {
  color: #536071;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.auth-warning {
  background: #fff7db;
  border: 1px solid #f0d98b;
  border-radius: 6px;
  color: #755800;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.google-login-button,
.auth-link {
  align-items: center;
  background: #1d232b;
  border: 1px solid #1d232b;
  border-radius: 5px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
  width: 100%;
}

.google-login-button:disabled {
  background: #eef1f5;
  border-color: #d5dae1;
  color: #8a94a3;
  cursor: not-allowed;
}

.accent-button {
  background: #f4a340;
  border: 0;
  border-radius: 4px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  padding: 0 16px;
}

.tabs {
  border-bottom: 3px solid #d9dde3;
  display: flex;
  gap: 0;
  padding-left: 8px;
}

.tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  padding: 12px 10px 14px;
}

.tab.active {
  border-bottom-color: #596bff;
  color: #4152ed;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.table-actions {
  align-items: center;
  border-bottom: 1px solid #aeb5bd;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
}

.table-actions button {
  background: transparent;
  border: 0;
  color: #1d232b;
  font-weight: 700;
}

.mobile-table-switch {
  display: none;
}

.column-panel {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #d9dde3;
  display: none;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 10px 14px;
}

.column-panel.open {
  display: flex;
}

.column-panel label {
  align-items: center;
  color: #374151;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  margin: 0;
}

.column-panel input {
  accent-color: #4357e8;
}

.table-wrap {
  overflow-x: auto;
}

.portfolio-table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 1080px;
  width: 100%;
}

.portfolio-table th {
  border-bottom: 2px solid #b7bcc4;
  color: #111;
  font-weight: 700;
  padding: 9px 8px;
  white-space: nowrap;
}

.portfolio-table th.sortable {
  cursor: pointer;
  padding-right: 20px;
  position: relative;
  user-select: none;
}

.portfolio-table th.sortable::after {
  color: #9aa2ad;
  content: "\2195";
  font-size: 10px;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.portfolio-table th.sort-active {
  color: #2437d8;
}

.portfolio-table th.sort-active::after {
  color: #2437d8;
  content: "\2191";
}

.portfolio-table th.sort-active.sort-desc::after {
  content: "\2193";
}

.portfolio-table td {
  border-bottom: 1px solid #d9dde3;
  padding: 5px 8px;
  white-space: nowrap;
}

.portfolio-table td.live-updated {
  animation: liveFlash 900ms ease-out;
}

.portfolio-table .data-row {
  cursor: pointer;
}

.portfolio-table .data-row:hover {
  background: #f5f8fc;
}

.symbol {
  color: #0645ad;
  font-weight: 700;
}

.symbol-link {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.symbol-link:hover {
  text-decoration: underline;
}

.num {
  text-align: right;
}

.chevron {
  color: #6f7782;
  font-size: 16px;
  text-align: center;
  width: 28px;
}

.expand-cell {
  text-align: center;
  width: 36px;
}

.expand-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid #b9c1cc;
  border-radius: 50%;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  padding: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: 22px;
}

.expand-toggle span {
  display: block;
  height: 12px;
  position: relative;
  width: 12px;
}

.expand-toggle span::before,
.expand-toggle span::after {
  background: #334155;
  border-radius: 2px;
  content: "";
  left: 1px;
  position: absolute;
  top: 5px;
  transition: opacity 160ms ease, transform 160ms ease;
  width: 10px;
  height: 2px;
}

.expand-toggle span::after {
  transform: rotate(90deg);
}

.data-row:hover .expand-toggle {
  border-color: #4357e8;
  box-shadow: 0 0 0 3px rgba(67, 87, 232, 0.12);
}

.expanded .expand-toggle {
  transform: rotate(180deg);
}

.expanded .expand-toggle span::after {
  opacity: 0;
  transform: rotate(90deg) scaleX(0.2);
}

.detail-row {
  display: none;
}

.detail-row.open {
  display: table-row;
}

.filtered-out {
  display: none !important;
}

.column-hidden {
  display: none;
}

.detail-row > td {
  background: #f8fafc;
  padding: 12px 16px 16px;
}

.trade-detail {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.trade-detail.single {
  display: block;
}

.trade-detail h3 {
  background: #eef2f7;
  border: 1px solid #d4dbe5;
  border-left: 3px solid #596bff;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  padding: 8px 10px;
}

.trade-detail table {
  background: #fff;
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.trade-detail th,
.trade-detail td {
  box-sizing: border-box;
}

.open-section col.open-lot-date {
  width: 17%;
}

.open-section col.open-lot-quantity {
  width: 12%;
}

.open-section col.open-lot-open-price {
  width: 15%;
}

.open-section col.open-lot-current-price {
  width: 16%;
}

.open-section col.open-lot-fee {
  width: 12%;
}

.open-section col.open-lot-profit {
  width: 17%;
}

.open-section col.open-lot-sell {
  width: 4%;
}

.open-section col.open-lot-edit {
  width: 7%;
}

.trade-detail.single col.closed-detail-date {
  width: calc((100% - 66px) * 0.125);
}

.trade-detail.single col.closed-detail-quantity {
  width: calc((100% - 66px) * 0.10);
}

.trade-detail.single col.closed-detail-price {
  width: calc((100% - 66px) * 0.13);
}

.trade-detail.single col.closed-detail-gain {
  width: calc((100% - 66px) * 0.12);
}

.trade-detail.single col.closed-detail-fee {
  width: calc((100% - 66px) * 0.11);
}

.trade-detail.single col.closed-detail-profit {
  width: calc((100% - 66px) * 0.16);
}

.trade-detail.single col.closed-detail-action {
  width: 66px;
}

.closed-section col.closed-lot-date {
  width: calc((100% - 66px) * 0.14);
}

.closed-section col.closed-lot-quantity {
  width: calc((100% - 66px) * 0.10);
}

.closed-section col.closed-lot-price {
  width: calc((100% - 66px) * 0.14);
}

.closed-section col.closed-lot-fee {
  width: calc((100% - 66px) * 0.12);
}

.closed-section col.closed-lot-profit {
  width: calc((100% - 66px) * 0.22);
}

.closed-section col.closed-lot-action {
  width: 66px;
}

.trade-detail table tbody tr:hover {
  background: #f5f8fc;
}

.trade-section.closed-section {
  background: #f4f6f9;
  border: 1px solid #dfe4ec;
  padding: 0;
}

.trade-section.closed-section table {
  background: #f7f9fc;
}

.trade-section.closed-section h3 {
  background: #e9edf4;
  border-left-color: #8b97aa;
}

.open-section table > thead > tr > th:nth-last-child(-n+2),
.open-section table > tbody > tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-last-child(-n+2),
.open-section table > tfoot > tr > td:nth-last-child(-n+2) {
  max-width: 72px;
  min-width: 58px;
  text-align: left;
  width: 1%;
}

.closed-section table > thead > tr > th:last-child,
.closed-section table > tbody > tr > td:last-child,
.closed-section table > tfoot > tr > td:last-child,
.trade-detail.single table > thead > tr > th:last-child,
.trade-detail.single table > tbody > tr > td:last-child,
.trade-detail.single table > tfoot > tr > td:last-child {
  max-width: 66px;
  min-width: 66px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
  width: 66px;
}

.open-section table > thead > tr > th:nth-last-child(2),
.open-section table > tbody > tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-last-child(2),
.open-section table > tfoot > tr > td:nth-last-child(2) {
  max-width: 54px;
  min-width: 52px;
}

.open-section table > thead > tr > th:last-child,
.open-section table > tbody > tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:last-child,
.open-section table > tfoot > tr > td:last-child {
  max-width: 74px;
  min-width: 72px;
}

.closed-section table > thead > tr > th:last-child,
.closed-section table > tbody > tr > td:last-child,
.closed-section table > tfoot > tr > td:last-child,
.trade-detail.single table > thead > tr > th:last-child,
.trade-detail.single table > tbody > tr > td:last-child,
.trade-detail.single table > tfoot > tr > td:last-child {
  max-width: 66px;
  min-width: 66px;
}

.lot-sell-toggle,
.lot-edit-toggle,
.option-sell-toggle,
.option-edit-toggle,
.option-convert-toggle {
  background: #eef1f5;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  font-size: 11px;
  font-weight: 700;
  height: 24px;
  min-width: 38px;
  padding: 0 8px;
}

.lot-sell-toggle:hover,
.lot-sell-toggle.active,
.lot-edit-toggle:hover,
.lot-edit-toggle.active,
.option-sell-toggle:hover,
.option-sell-toggle.active,
.option-edit-toggle:hover,
.option-edit-toggle.active,
.option-convert-toggle:hover,
.option-convert-toggle.active {
  background: #e1e7ef;
}

.lot-edit-toggle,
.option-edit-toggle,
.option-convert-toggle {
  min-width: 58px;
}

.lot-sell-row,
.lot-edit-row,
.option-sell-row,
.option-edit-row,
.option-convert-row {
  display: none;
}

.lot-sell-row.open,
.lot-edit-row.open,
.option-sell-row.open,
.option-edit-row.open,
.option-convert-row.open {
  display: table-row;
}

.lot-sell-row > td,
.lot-edit-row > td,
.option-sell-row > td,
.option-edit-row > td,
.option-convert-row > td {
  background: #f6f8fb;
  border-top: 0;
  padding: 8px 10px;
}

.lot-edit-row > td,
.option-edit-row > td {
  background: #f8faf6;
}

.lot-sell-form,
.lot-edit-form,
.option-sell-form,
.option-edit-form,
.option-convert-form {
  align-items: end;
  display: grid;
  gap: 8px;
}

.lot-edit-form,
.option-edit-form {
  gap: 0;
}

.lot-sell-form {
  grid-template-columns: 72px 110px repeat(4, minmax(90px, 1fr)) 72px;
}

.option-sell-form {
  grid-template-columns: 120px 140px 120px 140px 80px;
}

.lot-edit-form {
  grid-template-columns: 17% 12% 15% 16% 12% 17% 4% 7%;
}

.option-edit-form {
  grid-template-columns: repeat(11, minmax(70px, 1fr)) 72px;
}

.option-convert-form {
  grid-template-columns: 120px 170px 90px 120px 140px 72px;
}

.lot-sell-form strong,
.lot-edit-form strong,
.option-sell-form strong,
.option-edit-form strong,
.option-convert-form strong {
  color: #0645ad;
  font-size: 12px;
}

.lot-sell-form > span,
.lot-edit-static,
.option-convert-form > span,
.lot-sell-form label span,
.option-sell-form label span,
.lot-edit-form label span,
.option-edit-form label span,
.option-convert-form label span {
  color: #68707a;
  font-size: 11px;
  font-weight: 700;
}

.lot-edit-static {
  align-items: center;
  display: flex;
  min-height: 24px;
  padding-top: 16px;
}

.lot-sell-form label,
.lot-edit-form label,
.option-sell-form label,
.option-edit-form label,
.option-convert-form label {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-right: 8px;
}

.lot-edit-form label:last-of-type,
.option-edit-form label:last-of-type {
  padding-right: 8px;
}

.lot-sell-form input,
.option-sell-form input,
.lot-edit-form input,
.option-edit-form input,
.option-edit-form select,
.option-convert-form input,
.option-convert-form select {
  border: 1px solid #c8cdd4;
  box-sizing: border-box;
  font-size: 11px;
  height: 24px;
  min-width: 0;
  padding: 0 5px;
  width: 100%;
}

.lot-edit-form .num-input,
.option-sell-form .num-input,
.option-edit-form .num-input,
.option-convert-form .num-input {
  text-align: right;
}

.lot-edit-form label:has(.num-input) span,
.option-sell-form label:has(.num-input) span,
.option-edit-form label:has(.num-input) span,
.option-convert-form label:has(.num-input) span {
  text-align: right;
}

.lot-sell-form button,
.lot-edit-form button,
.option-sell-form button,
.option-edit-form button,
.option-convert-form button {
  background: #eef1f5;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  font-size: 11px;
  font-weight: 700;
  height: 24px;
}

.undo-trade-form {
  margin: 0;
}

.trade-action-stack {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.undo-trade-button {
  background: #fff7ed;
  border: 1px solid #f0b36b;
  border-radius: 4px;
  color: #8a4b00;
  font-size: 11px;
  font-weight: 700;
  height: 24px;
  line-height: 22px;
  min-width: 50px;
  padding: 0 5px;
  white-space: nowrap;
}

.undo-trade-button:hover {
  background: #ffedd5;
}

.trade-detail th,
.trade-detail td {
  border: 1px solid #dfe3e8;
  padding: 5px 7px;
}

.trade-detail tfoot td {
  background: #f1f4f8;
  border-top: 2px solid #b9c1cc;
  font-weight: 700;
}

.subtotal-row td:first-child {
  color: #374151;
}

.mixed-option-section {
  margin-top: 16px;
}

.section-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
}

.section-title-row h2 {
  font-size: 16px;
  margin: 0;
}

.section-title-row span {
  color: #536070;
  font-size: 12px;
}

.filters {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #d9dde3;
  display: flex;
  gap: 18px;
  padding: 12px 14px;
}

.filters label {
  align-items: center;
  color: #374151;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  white-space: nowrap;
}

.filters select {
  -webkit-appearance: none;
  appearance: none;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #172033;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  min-width: 130px;
  padding: 0 30px 0 10px;
}

.filters label:first-child select {
  min-width: 370px;
}

.filters select:hover {
  background-color: #fdfefe;
  border-color: #8d97a6;
}

.filters select:focus {
  border-color: #596bff;
  box-shadow: 0 0 0 2px rgba(89, 107, 255, 0.14);
  outline: none;
}

.filters strong {
  background: #ffffff;
  border: 1px solid #d9dde3;
  border-radius: 4px;
  color: #172033;
  font-size: 12px;
  padding: 7px 10px;
  margin-left: auto;
}

.analytics-shell {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  padding: 20px;
}

.allocation-panel,
.chart-panel {
  background: #ffffff;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-width: 0;
  padding: 18px;
}

.panel-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title-row h2,
.chart-panel h2 {
  color: #172033;
  font-size: 16px;
  margin: 0;
}

.allocation-mode {
  background: #eef3ff;
  border: 1px solid #cbd7ff;
  border-radius: 4px;
  display: inline-flex;
  overflow: hidden;
}

.allocation-mode button {
  background: transparent;
  border: 0;
  color: #3550b9;
  font-size: 11px;
  font-weight: 700;
  min-width: 62px;
  padding: 6px 10px;
}

.allocation-mode button.active {
  background: #596bff;
  color: #ffffff;
}

.allocation-body {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 260px minmax(0, 1fr);
}

.allocation-donut-wrap {
  display: grid;
  height: 240px;
  place-items: center;
  position: relative;
  width: 240px;
}

#allocationChart {
  display: block;
  height: 240px;
  width: 240px;
}

.allocation-total {
  display: grid;
  gap: 4px;
  left: 50%;
  place-items: center;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
}

.allocation-total span {
  color: #7a8290;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.allocation-total strong {
  color: #172033;
  font-size: 18px;
}

.allocation-list {
  display: grid;
  gap: 4px;
  max-height: 330px;
  min-width: 0;
  overflow: auto;
  padding-right: 4px;
}

.allocation-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: inherit;
  display: grid;
  gap: 8px;
  grid-template-columns: 10px minmax(54px, 1fr) minmax(86px, auto) 54px;
  min-height: 26px;
  padding: 2px 4px;
  text-align: left;
  width: 100%;
}

.allocation-item:hover,
.allocation-item:focus-visible {
  background: #f2f5fa;
  outline: 0;
}

.allocation-swatch {
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.allocation-item strong {
  color: #243044;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.allocation-item span,
.allocation-item em {
  color: #536071;
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.chart-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chart-subtitle {
  color: #687386;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chart-controls select {
  background: #fff;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  color: #1d232b;
  font-size: 12px;
  font-weight: 700;
  min-width: 120px;
  padding: 6px 8px;
}

.chart-summary {
  align-items: center;
  background: #f4f7fb;
  border: 1px solid #d9dde3;
  border-radius: 5px;
  display: grid;
  gap: 6px 14px;
  grid-template-columns: max-content minmax(90px, auto) max-content minmax(120px, 1fr);
  margin-bottom: 12px;
  padding: 10px 12px;
}

.chart-summary span {
  color: #68707a;
  font-size: 12px;
  font-weight: 700;
}

.chart-summary strong {
  color: #1d232b;
  font-size: 13px;
}

.chart-canvas-wrap {
  height: 360px;
  position: relative;
}

#profitChart {
  border: 1px solid #d9dde3;
  border-radius: 5px;
  display: block;
  width: 100%;
}

@media (max-width: 1050px) {
  .analytics-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .analytics-shell {
    padding: 12px;
  }

  .allocation-body {
    grid-template-columns: 1fr;
  }

  .chart-header {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-controls {
    justify-content: stretch;
  }

  .chart-controls select {
    flex: 1 1 140px;
  }

  .chart-summary {
    grid-template-columns: 1fr 1fr;
  }

  .historical-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .historical-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .historical-range-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .historical-range-tabs button {
    min-width: 0;
    padding: 0 8px;
  }

  .historical-column-toggle {
    width: 100%;
  }
}

.stats-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  padding: 20px;
}

.stats-grid div {
  background: #f4f6f8;
  padding: 16px;
}

.stats-grid span {
  color: #69717d;
  display: block;
  font-size: 12px;
}

.stats-grid strong {
  display: block;
  font-size: 24px;
  margin-top: 6px;
}

.performance-summary {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  padding-top: 0;
}

.performance-summary strong {
  font-size: 20px;
}

.stats-panels {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 20px 20px;
}

.stats-panel {
  border: 1px solid #d9dde5;
  min-width: 0;
}

.stats-panel h3 {
  background: #eef2f7;
  border-bottom: 1px solid #d9dde5;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  padding: 9px 10px;
}

.stats-table-wrap {
  overflow: auto;
}

.stats-table {
  border-collapse: collapse;
  width: 100%;
}

.stats-table th,
.stats-table td {
  border-bottom: 1px solid #dfe3e8;
  font-size: 11px;
  padding: 7px 6px;
  white-space: nowrap;
}

.stats-table th {
  background: #fbfcfe;
  font-weight: 600;
  text-align: left;
}

.stats-table tbody tr:hover {
  background: #f5f8fc;
}

.stats-table td:nth-child(2) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 20px 20px;
}

.audit-panel {
  border: 1px solid #d9dde5;
  min-width: 0;
}

.audit-panel h3 {
  background: #eef2f7;
  border-bottom: 1px solid #d9dde5;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  padding: 9px 10px;
}

.audit-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
}

.audit-table {
  border-collapse: collapse;
  width: 100%;
}

.audit-table th,
.audit-table td {
  border-bottom: 1px solid #dfe3e8;
  font-size: 11px;
  padding: 7px 6px;
  white-space: nowrap;
}

.audit-table th {
  background: #fbfcfe;
  font-weight: 600;
  text-align: left;
}

.audit-table tbody tr:hover {
  background: #f5f8fc;
}

@media (max-width: 980px) {
  .stats-panels,
  .audit-grid {
    grid-template-columns: 1fr;
  }

  .performance-summary {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

footer {
  display: none;
}

@keyframes liveFlash {
  0% {
    background: #fff3c4;
  }
  100% {
    background: transparent;
  }
}

@keyframes statusSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .portfolio-context {
    grid-template-columns: 1fr;
  }

  .portfolio-context dl {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portfolio-context dl div {
    border-left: 0;
    padding: 0;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .position-add-fields {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
    max-width: 100%;
  }

  .trade-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    background: #eef0f3;
  }

  .app-shell {
    box-sizing: border-box;
    max-width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }

  .topbar .app-shell {
    align-items: center;
    gap: 6px;
    height: auto;
    min-height: 50px;
    padding-bottom: 8px;
    padding-top: 8px;
  }

  .brand {
    flex: 0 1 118px;
    gap: 7px;
    margin-right: 0;
    min-width: 0;
  }

  .brand span:last-child {
    font-size: 14px;
    line-height: 1.1;
    max-width: 94px;
    white-space: normal;
  }

  .brand-mark {
    flex: 0 0 24px;
    height: 24px;
    width: 24px;
  }

  .topbar-actions {
    flex: 1 1 auto;
    gap: 5px;
    justify-content: flex-end;
    margin-left: 0;
    min-width: 0;
  }

  .portfolio-switcher {
    gap: 5px;
    min-width: 0;
  }

  .portfolio-switcher label {
    font-size: 11px;
  }

  .portfolio-switcher select {
    height: 28px;
    min-width: 0;
    width: 116px;
  }

  .settings-button {
    flex: 0 0 32px;
    gap: 0;
    justify-content: center;
    padding: 0;
    width: 32px;
  }

  .settings-label {
    display: none;
  }

  .logout-form {
    gap: 5px;
  }

  .logout-form .user-name {
    max-width: 44px;
  }

  .logout-form button {
    flex: 0 0 32px;
    gap: 0;
    padding: 0;
    width: 32px;
  }

  .logout-label {
    display: none;
  }

  main {
    border-left: 1px solid #d8dde5;
    border-right: 1px solid #d8dde5;
    margin-top: 8px;
    min-height: calc(100vh - 66px);
    overflow-x: clip;
    overflow-y: visible;
  }

  .portfolio-context {
    gap: 12px;
    min-height: 0;
    padding: 12px 16px;
  }

  .portfolio-context h1 {
    font-size: 19px;
  }

  .portfolio-context dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .metric {
    min-width: 0;
    padding: 13px 16px;
  }

  .metric span {
    font-size: 11px;
    margin-bottom: 7px;
  }

  .metric strong {
    font-size: 20px;
    white-space: normal;
    word-break: keep-all;
  }

  .metric small {
    display: inline;
    font-size: 14px;
  }

  .metric.meta strong {
    font-size: 18px;
  }

  .portfolio-thin-strip {
    align-items: stretch;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    padding: 0;
  }

  .portfolio-thin-strip div {
    align-items: flex-start;
    border-bottom: 1px solid #e1e5eb;
    border-right: 1px solid #e1e5eb;
    display: grid;
    gap: 4px;
    margin: 0;
    min-width: 0;
    padding: 10px 14px;
  }

  .portfolio-thin-strip div:nth-child(2n) {
    border-right: 0;
  }

  .portfolio-thin-strip span,
  .portfolio-thin-strip small {
    white-space: normal;
  }

  .portfolio-thin-strip strong {
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
    word-break: keep-all;
  }

  .portfolio-thin-strip strong small {
    display: inline;
    font-size: 12px;
  }

  .toolbar {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .toolbar > .position-add-form .position-add-search,
  .toolbar > .position-add-form .position-add-fields,
  .toolbar > .position-add-form .position-message {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  .toolbar-side {
    align-items: stretch;
    grid-column: 1;
    grid-row: auto;
  }

  .refresh-status {
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .position-add-search {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .position-add-toggle {
    justify-content: center;
    width: 100%;
  }

  .position-add-form.open .position-symbol-field input {
    height: 32px;
    width: 100%;
  }

  .symbol-suggestions {
    max-height: 220px;
    width: min(100%, 360px);
  }

  .position-add-fields,
  .position-add-form.open .position-add-fields {
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    width: 100%;
  }

  .position-submit {
    grid-column: 1 / -1;
    height: 34px;
  }

  .tabs {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-width: 76px;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
  }

  .table-actions {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    padding: 10px 8px;
  }

  .table-actions button {
    width: auto;
  }

  .mobile-table-switch {
    flex: 1 1 auto;
    min-width: 168px;
  }

  .table-actions > #columnPanelToggle {
    flex: 0 1 auto;
    min-width: 142px;
  }

  .column-panel {
    grid-template-columns: 1fr;
    margin: 0 8px 10px;
  }

  .table-wrap {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
    overflow-y: visible;
  }

  .portfolio-table,
  .portfolio-table thead,
  .portfolio-table tbody,
  .portfolio-table tfoot,
  .portfolio-table tr,
  .portfolio-table td,
  .trade-detail table,
  .trade-detail thead,
  .trade-detail tbody,
  .trade-detail tfoot,
  .trade-detail tr,
  .trade-detail td,
  .audit-table,
  .audit-table thead,
  .audit-table tbody,
  .audit-table tr,
  .audit-table td {
    display: block;
    width: 100%;
  }

  .portfolio-table,
  .trade-detail table,
  .audit-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    min-width: 0;
  }

  .portfolio-table thead,
  .trade-detail thead,
  .audit-table thead {
    display: none;
  }

  .portfolio-table tbody,
  .audit-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .portfolio-table .data-row,
  .trade-detail tbody tr,
  .trade-detail tfoot tr,
  .audit-table tbody tr {
    background: #fff;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    display: grid;
    gap: 8px;
    overflow: hidden;
    padding: 10px;
  }

  .portfolio-table td,
  .trade-detail td,
  .audit-table td {
    align-items: start;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 48px;
    padding: 7px 8px;
    text-align: left;
    white-space: normal;
    word-break: break-word;
  }

  .trade-detail tfoot td:empty {
    display: none;
  }

  .portfolio-table td:last-child,
  .trade-detail td:last-child,
  .audit-table td:last-child {
    border-bottom: 1px solid #edf0f4;
  }

  .portfolio-table td::before,
  .trade-detail td::before,
  .audit-table td::before {
    color: #68707a;
    content: attr(data-label) ":";
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
  }

  .portfolio-table .data-row,
  .trade-detail tbody tr,
  .trade-detail tfoot tr,
  .audit-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-table .data-row > td[data-column="symbol"],
  .portfolio-table .data-row > td[data-sort-key="symbol"] {
    background: #fff;
    border: 0;
    grid-column: 1;
    min-height: auto;
    padding: 0;
  }

  .portfolio-table .data-row > td[data-column="name"],
  .portfolio-table .data-row > td[data-sort-key="name"] {
    background: #fff;
    border: 0;
    grid-column: 2;
    min-height: auto;
    padding: 0;
    text-align: right;
  }

  .portfolio-table .data-row > td[data-column="symbol"]::before,
  .portfolio-table .data-row > td[data-sort-key="symbol"]::before,
  .portfolio-table .data-row > td[data-column="name"]::before,
  .portfolio-table .data-row > td[data-sort-key="name"]::before {
    content: none;
  }

  .portfolio-table .num,
  .trade-detail .num,
  .audit-table .num {
    text-align: left;
  }

  .portfolio-table .detail-row {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: none;
    padding: 0;
  }

  .portfolio-table .detail-row.open {
    display: block;
  }

  .portfolio-table .detail-row > td {
    border: 0;
    display: block;
    padding: 0;
  }

  .portfolio-table .detail-row > td::before,
  .lot-sell-row > td::before,
  .lot-edit-row > td::before,
  .option-convert-row > td::before {
    content: none;
  }

  .expand-cell {
    justify-items: end;
    width: 32px;
  }

  .trade-detail {
    gap: 10px;
    padding: 10px;
  }

  .trade-detail table {
    min-width: 0;
  }

  .trade-detail tbody,
  .trade-detail tfoot {
    display: grid;
    gap: 8px;
  }

  .trade-section {
    min-width: 0;
  }

  .trade-section h3 {
    padding: 8px 0;
  }

  .lot-sell-row,
  .lot-edit-row,
  .option-convert-row {
    border: 0 !important;
    display: block !important;
    grid-column: 1 / -1;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .lot-sell-row > td,
  .lot-edit-row > td,
  .option-convert-row > td {
    background: transparent;
    border: 0;
    box-sizing: border-box;
    display: block !important;
    grid-column: 1 / -1;
    padding: 8px 0 0;
    width: 100%;
  }

  .lot-sell-form,
  .lot-edit-form,
  .option-convert-form {
    align-items: stretch;
    background: #f8fafc;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    box-sizing: border-box;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
    max-width: none;
    width: 100% !important;
  }

  .lot-sell-form strong,
  .lot-sell-form > span,
  .lot-edit-form strong,
  .lot-edit-static,
  .option-convert-form strong,
  .option-convert-form > span {
    align-items: center;
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 5px;
    box-sizing: border-box;
    display: flex;
    min-height: 40px;
    padding: 6px 8px;
    word-break: normal;
  }

  .lot-sell-form strong,
  .lot-edit-form strong,
  .option-convert-form strong {
    grid-column: auto;
  }

  .lot-sell-form > span,
  .lot-edit-static,
  .option-convert-form > span {
    grid-column: auto;
  }

  .lot-sell-form strong,
  .lot-edit-form strong,
  .option-convert-form strong {
    font-size: 13px;
  }

  .lot-sell-form label,
  .lot-edit-form label {
    box-sizing: border-box;
    gap: 4px;
    min-width: 0;
    padding-right: 0;
  }

  .lot-sell-form label span,
  .lot-edit-form label span {
    line-height: 1.2;
    white-space: nowrap;
  }

  .lot-sell-form input,
  .lot-edit-form input {
    font-size: 12px;
    height: 32px;
    width: 100%;
  }

  .lot-sell-form button,
  .lot-edit-form button {
    height: 32px;
    width: 100%;
  }

  .lot-sell-form > button,
  .lot-edit-form > button {
    grid-column: 1 / -1;
  }

  .lot-edit-static {
    color: #68707a;
    font-size: 11px;
    font-weight: 700;
    min-width: 0;
    padding-top: 6px;
    white-space: normal;
  }

  .lot-edit-form label:empty,
  .lot-edit-form .lot-edit-static:empty {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .stats-grid div {
    padding: 12px;
  }

  .stats-grid strong {
    font-size: 21px;
  }

  .audit-grid {
    gap: 10px;
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .audit-table-wrap {
    overflow-x: visible;
  }

  .audit-table {
    min-width: 0;
  }

  .audit-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-table td:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(3)::before {
    content: "Son Alım:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(4)::before {
    content: "Portföy Oranı:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(5)::before {
    content: "Miktar:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(6)::before {
    content: "Ort. Fiyat:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(7)::before {
    content: "Mevcut:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(8)::before {
    content: "Uzatılmış:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(9)::before {
    content: "Piyasa Değ.:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(10)::before {
    content: "Günlük %:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(11)::before {
    content: "Günlük K/Z:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(12)::before {
    content: "Net %:";
  }

  .portfolio-table[data-grid-id="holdings"] > tbody > tr.data-row > td:nth-child(13)::before {
    content: "Net K/Z:";
  }

  .portfolio-table[data-grid-id="closed"] > tbody > tr.data-row > td:nth-child(3)::before {
    content: "Son Alım:";
  }

  .portfolio-table[data-grid-id="closed"] > tbody > tr.data-row > td:nth-child(4)::before {
    content: "Son Kapanış:";
  }

  .portfolio-table[data-grid-id="closed"] > tbody > tr.data-row > td:nth-child(5)::before {
    content: "İşlem:";
  }

  .portfolio-table[data-grid-id="closed"] > tbody > tr.data-row > td:nth-child(6)::before {
    content: "Miktar:";
  }

  .portfolio-table[data-grid-id="closed"] > tbody > tr.data-row > td:nth-child(7)::before {
    content: "Kazanç %:";
  }

  .portfolio-table[data-grid-id="closed"] > tbody > tr.data-row > td:nth-child(8)::before {
    content: "Net K/Z:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(1)::before,
  .audit-panel:first-child .audit-table tbody tr > td:nth-child(1)::before {
    content: "Tarih:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(2)::before,
  .closed-section table tbody tr > td:nth-child(3)::before,
  .trade-detail.single table tbody tr > td:nth-child(2)::before {
    content: "Miktar:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(3)::before,
  .closed-section table tbody tr > td:nth-child(4)::before,
  .trade-detail.single table tbody tr > td:nth-child(3)::before {
    content: "Açılış F.:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(4)::before {
    content: "Mevcut F.:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(5)::before,
  .closed-section table tbody tr > td:nth-child(6)::before,
  .trade-detail.single table tbody tr > td:nth-child(7)::before {
    content: "Masraf:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(6)::before,
  .closed-section table tbody tr > td:nth-child(7)::before,
  .trade-detail.single table tbody tr > td:nth-child(8)::before {
    content: "Net K/Z:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(7)::before {
    content: "Sat:";
  }

  .open-section table tbody tr:not(.lot-sell-row):not(.lot-edit-row):not(.option-convert-row) > td:nth-child(8)::before {
    content: "Düzenle:";
  }

  .closed-section table tbody tr > td:nth-child(1)::before,
  .trade-detail.single table tbody tr > td:nth-child(1)::before {
    content: "Açılış:";
  }

  .closed-section table tbody tr > td:nth-child(2)::before,
  .trade-detail.single table tbody tr > td:nth-child(4)::before {
    content: "Kapanış:";
  }

  .closed-section table tbody tr > td:nth-child(5)::before,
  .trade-detail.single table tbody tr > td:nth-child(5)::before {
    content: "Kapanış F.:";
  }

  .trade-detail.single table tbody tr > td:nth-child(6)::before {
    content: "Kazanç %:";
  }

  .closed-section table tbody tr > td:nth-child(8)::before,
  .trade-detail.single table tbody tr > td:nth-child(9)::before {
    content: "İşlem:";
  }

  .audit-panel:first-child .audit-table tbody tr > td:nth-child(2)::before,
  .audit-panel:nth-child(2) .audit-table tbody tr > td:nth-child(1)::before {
    content: "Sembol:";
  }

  .audit-panel:first-child .audit-table tbody tr > td:nth-child(3)::before {
    content: "Yön:";
  }

  .audit-panel:first-child .audit-table tbody tr > td:nth-child(4)::before,
  .audit-panel:nth-child(2) .audit-table tbody tr > td:nth-child(2)::before {
    content: "Adet:";
  }

  .audit-panel:first-child .audit-table tbody tr > td:nth-child(5)::before {
    content: "Fiyat:";
  }

  .audit-panel:first-child .audit-table tbody tr > td:nth-child(6)::before {
    content: "Masraf:";
  }

  .audit-panel:first-child .audit-table tbody tr > td:nth-child(7)::before {
    content: "Ref:";
  }

  .audit-panel:nth-child(2) .audit-table tbody tr > td:nth-child(3)::before {
    content: "Alış:";
  }

  .audit-panel:nth-child(2) .audit-table tbody tr > td:nth-child(4)::before {
    content: "Satış:";
  }

  .audit-panel:nth-child(2) .audit-table tbody tr > td:nth-child(5)::before {
    content: "Alış M.:";
  }

  .audit-panel:nth-child(2) .audit-table tbody tr > td:nth-child(6)::before {
    content: "Satış M.:";
  }

  .audit-panel:nth-child(2) .audit-table tbody tr > td:nth-child(7)::before {
    content: "Net K/Z:";
  }

  .trade-detail tbody tr,
  .trade-detail tfoot tr,
  .audit-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .trade-detail td,
  .audit-table td {
    min-height: 38px;
    padding: 6px 7px;
  }
}

@media (max-width: 430px) {
  .metric {
    padding: 12px 14px;
  }

  .metric strong {
    font-size: 19px;
  }

  .portfolio-thin-strip {
    grid-template-columns: 1fr;
  }

  .portfolio-thin-strip div {
    border-right: 0;
  }

  .portfolio-table {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .mobile-table-switch {
    background: #eef1f5;
    border: 1px solid #c8ced8;
    border-radius: 6px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    width: 100%;
  }

  .mobile-table-switch button {
    border: 0;
    border-right: 1px solid #c8ced8;
    font-size: 12px;
    height: 32px;
  }

  .mobile-table-switch button:last-child {
    border-right: 0;
  }

  .mobile-table-switch button[aria-pressed="true"] {
    background: #fff;
    color: #2437d8;
  }

  html.mobile-table-mode-scroll .table-wrap {
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  html.mobile-table-mode-scroll .portfolio-table,
  html.mobile-table-mode-scroll .portfolio-table thead,
  html.mobile-table-mode-scroll .portfolio-table tbody,
  html.mobile-table-mode-scroll .portfolio-table tfoot,
  html.mobile-table-mode-scroll .portfolio-table tr {
    display: revert;
    width: revert;
  }

  html.mobile-table-mode-scroll .portfolio-table td,
  html.mobile-table-mode-scroll .portfolio-table th {
    background: transparent;
    border-radius: 0;
    display: table-cell;
    min-height: 0;
    text-align: inherit;
    white-space: nowrap;
    width: auto;
  }

  html.mobile-table-mode-scroll .portfolio-table td::before,
  html.mobile-table-mode-scroll .portfolio-table th::before {
    content: none !important;
  }

  html.mobile-table-mode-scroll .portfolio-table thead {
    display: table-header-group;
  }

  html.mobile-table-mode-scroll .portfolio-table tbody {
    display: table-row-group;
    padding: 0;
  }

  html.mobile-table-mode-scroll .portfolio-table tr {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: table-row;
    padding: 0;
  }

  html.mobile-table-mode-scroll .portfolio-table {
    border-collapse: collapse;
    min-width: 1080px;
  }

  html.mobile-table-mode-scroll .portfolio-table .detail-row {
    display: none !important;
  }

  html.mobile-table-mode-scroll .portfolio-table .detail-row.open {
    display: table-row !important;
  }

  html.mobile-table-mode-scroll .portfolio-table .detail-row > td {
    display: table-cell;
    padding: 0;
  }
}

@media (max-width: 680px) {
  html.mobile-table-mode-compact .table-wrap {
    overflow-x: visible;
  }

  html.mobile-table-mode-compact .customizable-table,
  html.mobile-table-mode-compact .customizable-table thead,
  html.mobile-table-mode-compact .customizable-table tbody,
  html.mobile-table-mode-compact .customizable-table tfoot,
  html.mobile-table-mode-compact .customizable-table tr {
    width: revert !important;
  }

  html.mobile-table-mode-compact .customizable-table {
    border-collapse: collapse;
    display: table !important;
    font-size: 12px !important;
    min-width: 0;
    table-layout: fixed;
    width: 100%;
  }

  html.mobile-table-mode-compact .customizable-table thead {
    display: table-header-group !important;
  }

  html.mobile-table-mode-compact .customizable-table tbody {
    display: table-row-group !important;
    padding: 0;
  }

  html.mobile-table-mode-compact .customizable-table tr {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: table-row !important;
    gap: 0;
    padding: 0 !important;
  }

  html.mobile-table-mode-compact .customizable-table th,
  html.mobile-table-mode-compact .customizable-table td {
    background: transparent;
    border-bottom: 1px solid #d9dde3;
    border-right: 0;
    border-radius: 0;
    box-sizing: border-box;
    display: table-cell !important;
    flex-direction: initial;
    font-size: 12px !important;
    gap: 0;
    min-height: 0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    word-break: normal;
  }

  html.mobile-table-mode-compact .customizable-table th {
    padding: 9px 8px;
  }

  html.mobile-table-mode-compact .customizable-table td {
    padding: 5px 8px;
  }

  html.mobile-table-mode-compact .customizable-table th.sortable {
    padding-right: 16px;
  }

  html.mobile-table-mode-compact .customizable-table th.sortable::after {
    right: 4px;
  }

  html.mobile-table-mode-compact .customizable-table th:last-child,
  html.mobile-table-mode-compact .customizable-table td:last-child {
    border-right: 0;
  }

  html.mobile-table-mode-compact .customizable-table th {
    border-right: 0;
  }

  html.mobile-table-mode-compact .customizable-table th::before,
  html.mobile-table-mode-compact .customizable-table td::before {
    content: none !important;
  }

  html.mobile-table-mode-compact .customizable-table [data-column] {
    display: none !important;
  }

  html.mobile-table-mode-compact .customizable-table [data-column="symbol"],
  html.mobile-table-mode-compact .customizable-table [data-column="quantity"],
  html.mobile-table-mode-compact .customizable-table [data-column="daily-percent"],
  html.mobile-table-mode-compact .customizable-table [data-column="net-percent"],
  html.mobile-table-mode-compact .customizable-table [data-column="expand"] {
    display: table-cell !important;
  }

  html.mobile-table-mode-compact .customizable-table [data-column="symbol"] {
    color: #0645ad;
    font-size: 12px;
    font-weight: 700;
    width: 22%;
  }

  html.mobile-table-mode-compact .customizable-table td.symbol {
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  html.mobile-table-mode-compact .customizable-table td[data-column="symbol"].symbol {
    background: transparent !important;
    border-bottom: 1px solid #d9dde3 !important;
    color: #0645ad !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    padding: 5px 8px !important;
    text-align: left !important;
  }

  html.mobile-table-mode-compact .customizable-table [data-column="name"] {
    display: none !important;
    font-size: 12px !important;
  }

  html.mobile-table-mode-compact .customizable-table [data-column="quantity"],
  html.mobile-table-mode-compact .customizable-table [data-column="daily-percent"],
  html.mobile-table-mode-compact .customizable-table [data-column="net-percent"] {
    text-align: right;
    width: 24%;
  }

  html.mobile-table-mode-compact .customizable-table [data-column="expand"] {
    background: transparent !important;
    border-bottom: 1px solid #d9dde3 !important;
    border-right: 0 !important;
    display: table-cell !important;
    line-height: 1 !important;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
    vertical-align: middle !important;
    width: 6%;
  }

  html.mobile-table-mode-compact .customizable-table [data-column="expand"] .expand-toggle {
    display: inline-flex;
    height: 22px;
    margin: 0;
    vertical-align: middle;
    width: 22px;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row {
    display: none !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row.open {
    display: table-row !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row > td {
    display: table-cell;
    padding: 0;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row > td::before {
    content: none !important;
  }

  html.mobile-table-mode-scroll .table-wrap {
    overflow-x: auto;
  }

  html.mobile-table-mode-scroll .customizable-table {
    border-collapse: collapse;
    font-size: 12px !important;
    min-width: 1080px;
    table-layout: auto;
    width: 100%;
  }

  html.mobile-table-mode-scroll .customizable-table [data-column] {
    display: table-cell !important;
  }

  html.mobile-table-mode-scroll .customizable-table th,
  html.mobile-table-mode-scroll .customizable-table td {
    background: transparent !important;
    border-bottom: 1px solid #d9dde3 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    min-height: 0 !important;
    white-space: nowrap !important;
    word-break: normal !important;
  }

  html.mobile-table-mode-scroll .customizable-table th {
    padding: 9px 8px !important;
  }

  html.mobile-table-mode-scroll .customizable-table th.sortable {
    padding-right: 20px !important;
  }

  html.mobile-table-mode-scroll .customizable-table th.sortable::after {
    right: 7px !important;
  }

  html.mobile-table-mode-scroll .customizable-table td {
    padding: 5px 8px !important;
  }

  html.mobile-table-mode-scroll .customizable-table [data-column="symbol"],
  html.mobile-table-mode-scroll .customizable-table [data-column="name"] {
    background: transparent !important;
    border-bottom: 1px solid #d9dde3 !important;
    border-right: 0 !important;
    color: inherit;
    font-size: 12px !important;
    font-weight: 700;
    grid-column: auto !important;
    min-height: 0 !important;
    padding: 5px 8px !important;
    text-align: left !important;
  }

  html.mobile-table-mode-scroll .customizable-table td.symbol {
    color: #0645ad;
    font-size: 12px !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row > td,
  html.mobile-table-mode-scroll .customizable-table .detail-row > td {
    box-sizing: border-box;
    display: block !important;
    max-width: calc(100vw - 34px);
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(460px, 1fr));
    min-width: 940px;
    padding: 12px;
    width: max-content;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail.single,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail.single {
    grid-template-columns: 1fr;
    min-width: 860px;
    width: max-content;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail table,
  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail thead,
  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail tbody,
  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail tfoot,
  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail tr,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail table,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail thead,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail tbody,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail tfoot,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail tr {
    display: revert !important;
    width: revert !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail table,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail table {
    border-collapse: collapse;
    display: table !important;
    min-width: 100%;
    table-layout: fixed;
    width: 100%;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail thead,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail thead {
    display: table-header-group !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail tbody,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail tbody {
    display: table-row-group !important;
    padding: 0;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail tfoot,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail tfoot {
    display: table-footer-group !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail tr,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail tr {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: table-row !important;
    padding: 0 !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail th,
  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail td,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail th,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail td {
    background: transparent;
    border-bottom: 1px solid #dfe3e8;
    border-radius: 0;
    display: table-cell !important;
    font-size: 12px !important;
    min-height: 0;
    padding: 7px 8px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    word-break: normal;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail td::before,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail td::before {
    content: none !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .trade-detail .num,
  html.mobile-table-mode-scroll .customizable-table .detail-row .trade-detail .num {
    text-align: right;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .lot-sell-row,
  html.mobile-table-mode-compact .customizable-table .detail-row .lot-edit-row,
  html.mobile-table-mode-compact .customizable-table .detail-row .option-convert-row,
  html.mobile-table-mode-scroll .customizable-table .detail-row .lot-sell-row,
  html.mobile-table-mode-scroll .customizable-table .detail-row .lot-edit-row,
  html.mobile-table-mode-scroll .customizable-table .detail-row .option-convert-row {
    display: none !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .lot-sell-row.open,
  html.mobile-table-mode-compact .customizable-table .detail-row .lot-edit-row.open,
  html.mobile-table-mode-compact .customizable-table .detail-row .option-convert-row.open,
  html.mobile-table-mode-scroll .customizable-table .detail-row .lot-sell-row.open,
  html.mobile-table-mode-scroll .customizable-table .detail-row .lot-edit-row.open,
  html.mobile-table-mode-scroll .customizable-table .detail-row .option-convert-row.open {
    display: table-row !important;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .lot-sell-form,
  html.mobile-table-mode-scroll .customizable-table .detail-row .lot-sell-form {
    grid-template-columns: 72px 110px repeat(4, minmax(90px, 1fr)) 72px;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .lot-edit-form,
  html.mobile-table-mode-scroll .customizable-table .detail-row .lot-edit-form {
    grid-template-columns: 17% 12% 15% 16% 12% 17% 4% 7%;
  }

  html.mobile-table-mode-compact .customizable-table .detail-row .option-convert-form,
  html.mobile-table-mode-scroll .customizable-table .detail-row .option-convert-form {
    grid-template-columns: 120px 170px 120px 140px 72px;
  }

  html.mobile-table-mode-compact .customizable-table th,
  html.mobile-table-mode-compact .customizable-table td,
  html.mobile-table-mode-scroll .customizable-table th,
  html.mobile-table-mode-scroll .customizable-table td {
    background: transparent !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  html.mobile-table-mode-compact .customizable-table tr,
  html.mobile-table-mode-scroll .customizable-table tr {
    background: transparent !important;
  }
}

