/* IMTRADER portal: shared controls, clear feedback and responsive layouts. */
.modal-backdrop {
  position: fixed !important;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000 !important;
  overflow: hidden;
}
.modal {
  background: #fff;
  overflow: auto;
  overscroll-behavior: contain;
  max-height: calc(100vh - 40px);
  min-width: 0;
}
.modal .form-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}
.modal .field,
.card,
.shell,
main {
  min-width: 0;
}
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  min-width: 0;
}
.modal a {
  overflow-wrap: anywhere;
}
.modal-heading {
  position: sticky;
  top: -26px;
  background: #fff;
  z-index: 1;
  padding: 8px 0;
}
.modal .dialog-actions {
  position: sticky;
  bottom: -26px;
  background: #fff;
  padding-bottom: 8px;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 18px;
}
.download-card {
  padding: 24px;
}
.download-card h2 {
  font-size: 18px;
}
.download-card p {
  font-size: 13px;
  line-height: 1.8;
}
.download-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #1459d9;
  color: white;
  padding: 12px 16px;
  border-radius: 9px;
}
.download-card small {
  display: block;
  margin-top: 12px;
  color: #64778e;
}
.card:has(> table) {
  overflow-x: auto;
}
.profile-card {
  overflow-wrap: anywhere;
}
:root {
  --ink: #172d48;
  --muted: #64778e;
  --accent: #1459d9;
  --line: #e3eaf2;
  --surface: #f5f7fb;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--surface);
}
.ui-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #5d99ef;
  outline-offset: 3px;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 3px 8px #1459d915;
}
button.primary:hover:not(:disabled) {
  background: #104bbb;
  transform: translateY(-1px);
}
input,
select,
textarea {
  border-color: #d9e3ef;
  min-height: 44px;
}
input[type="checkbox"] {
  min-height: 0;
  width: auto;
}
p {
  color: var(--muted);
}
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #657a94;
  flex-shrink: 0;
}
.language-switch > .ui-icon {
  margin: 0 6px;
  width: 17px;
}
.language-switch button {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  font-size: 12px;
  margin: 0 !important;
  border-radius: 6px;
  color: #65748a;
}
.language-switch button.selected {
  background: #edf3fe;
  color: #1459d9;
  font-weight: 600;
}
.auth-view {
  min-height: 100vh;
  background: #f7f9fc;
}
.auth-topbar {
  height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5.5%;
  background: white;
  border-bottom: 1px solid var(--line);
}
.auth-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #102d49;
}
.auth-logo span {
  color: #167b82;
}
.auth-layout {
  min-height: calc(100vh - 82px);
  grid-template-columns: 1fr 1fr;
  max-width: 1600px;
  margin: auto;
  background: transparent;
}
.auth-brand {
  min-height: calc(100vh - 82px);
  padding: 60px 11%;
  background: radial-gradient(ellipse at 95% 10%, #1b586450 0, transparent 60%),
    linear-gradient(135deg, #0b223b, #122f4d 65%, #154552);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.auth-brand:after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid #ffffff0a;
  border-radius: 50%;
  right: -230px;
  top: 26%;
  box-shadow:
    0 0 0 70px #ffffff03,
    0 0 0 140px #ffffff02;
  z-index: -1;
}
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #ffffff24;
  border-radius: 30px;
  padding: 9px 15px;
  color: #bddee0;
  font-size: 12px;
  width: fit-content;
}
.online-dot {
  width: 7px;
  height: 7px;
  background: #75e0c3;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #75e0c310;
}
.auth-brand .eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: #81c7c6;
}
.auth-brand h1 {
  font-size: clamp(36px, 3.5vw, 54px);
  line-height: 1.3;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 22px 0;
}
.auth-brand p {
  font-size: 16px;
  line-height: 1.9;
  color: #adbfce;
  max-width: 410px;
}
.auth-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 30px 0;
}
.auth-feature-grid > div {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 3px 12px;
  align-items: center;
}
.auth-feature-grid .ui-icon {
  grid-row: 1/3;
  width: 38px;
  height: 38px;
  background: #ffffff0a;
  border: 1px solid #ffffff14;
  border-radius: 10px;
  padding: 9px;
  color: #84d8c9;
}
.auth-feature-grid strong {
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.1px;
}
.auth-feature-grid small {
  font-size: 12px;
  color: #8eacbd;
}
.auth-foot {
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 20px;
  color: #7496aa;
}
.auth-panel {
  padding: 48px 8%;
  align-items: center;
}
.auth-inner {
  max-width: 440px;
}
.auth-welcome-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9f0fc;
  color: #1459d9;
  border-radius: 14px;
  margin-bottom: 24px;
}
.auth-welcome-icon .ui-icon {
  width: 25px;
  height: 25px;
}
.form-eyebrow {
  color: #6d8199;
  font-size: 10px;
  letter-spacing: 2px;
}
.auth-inner > h1 {
  margin: 10px 0 8px;
  font-size: 30px;
  letter-spacing: -0.8px;
}
.auth-inner > p {
  margin-bottom: 28px;
  font-size: 14px;
}
.auth-inner .field {
  gap: 8px;
  font-weight: 550;
  font-size: 12px;
  color: #3c506a;
}
.auth-inner input {
  font-size: 14px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 9px;
}
.auth-inner form .form-grid {
  gap: 18px;
}
.auth-submit {
  padding: 14px;
  min-height: 49px;
  border-radius: 9px;
  margin-top: 24px !important;
}
.auth-inner .text-btn {
  margin-top: 16px;
  padding: 3px;
  font-size: 13px;
}
.auth-disclaimer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 11px !important;
  color: #76889e !important;
  margin-top: 22px !important;
  margin-bottom: 0 !important;
}
.password-field {
  position: relative;
  display: flex;
}
.password-field input {
  width: 100%;
  padding-right: 50px;
}
.password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  margin: 0 !important;
  padding: 7px;
  color: #7d8da1;
}
.auth-inner .error,
.auth-inner .success {
  font-size: 13px;
  margin: 16px 0;
  padding: 11px 13px;
  border-radius: 8px;
}
.auth-inner .error {
  background: #fff0f0;
}
.auth-inner .success {
  background: #eaf8f0;
}
aside {
  background: #10263f;
  border-right: 1px solid #0d2138;
  padding: 28px 16px;
  width: 250px;
  z-index: 5;
}
.shell {
  margin-left: 250px;
}
.brand {
  gap: 10px;
}
.brand b {
  background: #76d6c5;
  color: #123d48;
}
.brand small {
  letter-spacing: 0.5px;
  font-size: 10px;
  color: #83a0b8;
}
.workspace {
  margin: 27px 5px 20px;
  border-color: #ffffff14;
  background: #ffffff03;
  border-radius: 10px;
}
.workspace strong {
  color: #dce9f2;
}
.workspace strong:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #76d6c5;
  border-radius: 50%;
  margin-right: 8px;
}
nav {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #395369 transparent;
}
nav button {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  color: #a0b2c6;
  border-radius: 9px;
  padding: 12px 14px;
  margin: 4px 0;
  gap: 13px;
  font-size: 13px;
}
nav button .ui-icon {
  width: 18px;
  height: 18px;
  color: #7e97b0;
}
nav button:hover {
  background: #1b3552;
  color: white;
}
nav button.active {
  background: #1c466c;
  color: white;
  box-shadow: inset 3px 0 #72d6c5;
}
nav button.active .ui-icon {
  color: #8ce0d0;
}
.nav-count {
  margin-left: auto;
  background: #ffffff20;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 10px;
}
.side-bottom {
  padding: 18px 8px 0;
  margin-top: 18px;
  font-size: 12px;
}
.side-bottom .avatar {
  background: #203f5d;
  color: #91dacf;
  width: 35px;
  height: 35px;
}
.side-bottom small {
  font-size: 10px;
  margin-top: 3px;
}
header {
  height: 74px;
  padding: 0 34px;
  gap: 18px;
}
.header-right {
  gap: 16px;
}
.logout-btn {
  padding: 8px 11px;
  font-size: 12px;
  border-color: transparent;
  color: #667d96;
}
.logout-btn .ui-icon {
  width: 16px;
}
main {
  padding: 30px 34px;
}
.page-title {
  margin-bottom: 26px;
}
.page-title h1 {
  font-size: 25px;
  letter-spacing: -0.5px;
}
.page-title p {
  font-size: 12px;
  color: #7f8fa3;
  max-width: 650px;
}
.page-title > button {
  font-size: 12px;
  padding: 9px 13px;
}
.page-title > button .ui-icon {
  width: 16px;
}
.card {
  border: 1px solid #e4eaf2;
  border-radius: 13px;
  box-shadow: 0 3px 12px #19365803;
}
.metric {
  padding: 22px;
}
.metric-icon {
  background: #eff5fc;
  border-radius: 10px;
  padding: 8px;
  color: #6287b2;
}
.metric-icon .ui-icon {
  width: 18px;
  height: 18px;
}
.metric label {
  font-size: 12px;
  color: #7a8ba1;
}
.metric strong {
  font-size: 29px;
  font-weight: 650;
  margin: 20px 0 10px;
}
.metric small {
  font-size: 11px;
}
.summary {
  padding: 25px;
}
.summary h2 {
  font-size: 15px;
}
.summary p + p {
  margin-top: 12px;
}
main > button.primary {
  margin-bottom: 18px;
}
th {
  font-size: 11px;
  letter-spacing: 0.15px;
  background: #f8fafc;
  padding: 14px 20px;
}
td {
  padding: 17px 20px;
  vertical-align: middle;
}
tbody tr:hover {
  background: #fbfcff;
}
td button {
  font-size: 11px;
  padding: 7px 10px;
  margin: 3px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: #edf4fa;
  color: #496f95;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
}
.status-badge:before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.empty {
  padding: 45px 20px;
  font-size: 13px;
  color: #8b9aaf;
}
.empty .ui-icon {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  color: #aabbd0;
}
.notice {
  border: 1px solid #e1eafa;
  background: #f1f6fd;
  border-radius: 10px;
  padding: 16px 18px;
  color: #617f9f;
  font-size: 12px;
  line-height: 1.9;
}
.profile-card .field + .field {
  margin-top: 18px;
}
.profile-card > p {
  margin: 14px 0;
}
.profile-card > .form-grid {
  margin: 20px 0;
}
.profile-card a {
  color: #1b63c9;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.profile-card > div:not(.form-grid):not(.dialog-actions):not(.notice) {
  margin: 10px 0;
}
.profile-card input[type="file"] {
  font-size: 12px;
}
.error {
  background: #fff0f1;
  border: 1px solid #f2d8dc;
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 13px;
  color: #ad4050;
}
.success {
  background: #ecf8f1;
  border: 1px solid #cde9d9;
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 13px;
  color: #23794f;
}
.modal-backdrop {
  background: #09203f70;
  backdrop-filter: blur(5px);
  z-index: 30;
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 590px;
  border-radius: 18px;
  box-shadow: 0 25px 90px #0f254140;
  padding: 26px 28px;
  max-height: calc(100dvh - 40px);
}
.modal-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 25px;
}
.modal-heading h2 {
  margin: 0;
  font-size: 19px;
  flex: 1;
}
.modal-symbol {
  width: 39px;
  height: 39px;
  background: #edf3fc;
  border-radius: 11px;
  color: #3266a0;
  display: grid;
  place-items: center;
}
.modal-close {
  border: 0;
  padding: 7px;
  color: #8a9aae;
  background: transparent;
}
.modal .field {
  font-size: 12px;
  color: #52667f;
}
.modal .form-grid {
  gap: 18px;
}
.modal .notice {
  margin: 0;
}
.modal .dialog-actions {
  border-top: 1px solid #edf1f6;
  padding-top: 20px;
}
.dialog-actions {
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
}
.dialog-actions a {
  padding: 9px 12px;
  background: #f1f6fc;
  border-radius: 7px;
  color: #326aab;
}
.modal [type="checkbox"] {
  accent-color: #1459d9;
}
.modal textarea {
  min-height: 100px;
}
.spinning {
  animation: spin 1.1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1100px) {
  aside {
    width: 220px;
  }
  .shell {
    margin-left: 220px;
  }
  main {
    padding: 26px 22px;
  }
  header {
    padding: 0 22px;
  }
  .auth-brand {
    padding: 48px 9%;
  }
  .auth-panel {
    padding: 40px 9%;
  }
  .auth-brand h1 {
    font-size: 39px;
  }
  .header-right > span {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 720px) {
  .auth-topbar {
    height: 68px;
    padding: 0 20px;
  }
  .auth-logo {
    font-size: 21px;
  }
  .auth-layout {
    display: block;
    min-height: calc(100vh - 68px);
  }
  .auth-brand {
    display: none;
  }
  .auth-panel {
    padding: 32px 22px 44px;
    min-height: calc(100vh - 68px);
    align-items: flex-start;
  }
  .auth-inner {
    max-width: 440px;
  }
  .auth-inner > h1 {
    font-size: 27px;
  }
  .auth-welcome-icon {
    margin-bottom: 18px;
  }
  aside {
    position: relative;
    width: 100%;
    padding: 18px 15px 10px;
  }
  .workspace,
  .side-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 5px;
    margin-top: 18px;
    padding-bottom: 7px;
  }
  nav button {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 12px;
    margin: 0;
    font-size: 12px;
    gap: 7px;
  }
  nav button .ui-icon {
    width: 16px;
    height: 16px;
  }
  nav button.active {
    box-shadow: none;
    background: #225073;
  }
  .shell {
    margin: 0;
  }
  header {
    height: 62px;
    padding: 0 16px;
    gap: 8px;
  }
  header > span {
    font-size: 11px;
    max-width: 42%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .header-right {
    gap: 6px;
  }
  .logout-btn {
    font-size: 0;
    gap: 0;
    padding: 7px;
  }
  .logout-btn .ui-icon {
    width: 18px;
  }
  .language-switch {
    padding: 3px;
  }
  .language-switch > .ui-icon {
    display: none;
  }
  .language-switch button {
    font-size: 11px;
    padding: 5px 8px;
  }
  main {
    padding: 24px 15px;
  }
  .page-title {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  .page-title h1 {
    font-size: 22px;
  }
  .page-title p {
    font-size: 11px;
  }
  .page-title > button {
    font-size: 0;
    gap: 0;
    padding: 9px;
  }
  .page-title > button .ui-icon {
    width: 18px;
    height: 18px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px 14px;
  }
  .metric-icon {
    padding: 6px;
  }
  .metric-icon .ui-icon {
    width: 15px;
    height: 15px;
  }
  .metric strong {
    font-size: 23px;
  }
  .metric label {
    font-size: 11px;
    display: block;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal {
    max-height: calc(100dvh - 20px);
    padding: 22px 20px;
    border-radius: 15px;
  }
  .modal-heading h2 {
    font-size: 17px;
  }
  .profile-card {
    padding: 22px 18px;
  }
  .summary {
    padding: 22px 18px;
  }
  .notice {
    padding: 13px 15px;
  }
  .table-toolbar {
    padding: 16px;
  }
  .dialog-actions button {
    font-size: 12px;
  }
  footer {
    font-size: 10px;
  }
  table {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
  .spinning {
    animation: none;
  }
}
.card > p {
  padding: 16px 20px;
}
.card.profile-card > p {
  padding: 0;
}
.card .table-wrap + p {
  border-top: 1px solid #edf1f6;
}
.card table + p {
  margin: 0;
  color: #74859b;
  font-size: 12px;
}
header .language-switch button[aria-pressed="true"],
.auth-topbar .language-switch button[aria-pressed="true"] {
  background: #edf3fe;
  color: #1459d9;
}

.account-toolbar,
.overview-actions,
.account-actions,
.finance-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.account-toolbar {
  padding: 20px;
}
.account-actions {
  max-width: 285px;
  gap: 6px;
}
.account-actions button {
  font-size: 12px;
  padding: 7px 9px;
}
.account-passwords {
  display: grid;
  gap: 12px;
  min-width: 210px;
}
.account-secret {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-secret code {
  font-family: monospace;
  letter-spacing: 0.5px;
}
.account-secret small {
  min-width: 58px;
}
.account-secret button {
  padding: 5px 7px;
  font-size: 11px;
}
.account-secret .ui-icon {
  width: 15px;
  height: 15px;
}
.finance-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.finance-tabs {
  margin: 22px 0 16px;
}
.finance-tabs button.selected {
  background: #164e73;
  color: #fff;
}
.finance-action-card {
  padding: 24px;
  margin-bottom: 18px;
}
.finance-action-card > p {
  padding: 0;
  line-height: 1.8;
}
.finance-action-card button {
  margin: 8px 10px 0 0;
}
.overview-actions {
  margin-bottom: 22px;
}
.account-detail-summary {
  padding: 15px;
  background: #f2f7fb;
  border-radius: 12px;
  display: grid;
  gap: 8px;
}
.modal:has(.account-detail-summary) {
  width: min(860px, calc(100vw - 40px));
}
.account-details-table {
  overflow-x: auto;
  width: 100%;
}
.account-details-table table {
  min-width: 620px;
}
.finance-tabs + section {
  margin-top: 0;
}
@media (max-width: 720px) {
  .finance-metrics {
    grid-template-columns: 1fr;
  }
  .finance-action-card {
    padding: 18px;
  }
  .account-toolbar {
    padding: 16px;
  }
  .modal:has(.account-detail-summary) {
    width: 100%;
  }
  .finance-tabs button {
    font-size: 12px;
  }
  .account-secret {
    gap: 5px;
  }
}

.account-actions {
  display: grid;
  gap: 8px;
  min-width: 245px;
}
.account-action-funds,
.account-action-settings,
.account-action-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.account-action-info button {
  width: 100%;
  background: #f4f8fd;
}
.account-action-funds button {
  background: #ecf8f5;
  border-color: #c9e9df;
  color: #187760;
}
.account-actions button {
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
  margin: 0;
}
.staff-invite {
  display: grid;
  gap: 8px;
  min-width: 155px;
}
.staff-invite code {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}
.staff-invite button {
  font-size: 11px;
  padding: 6px 8px;
}

/* 查询条件在桌面横排、移动端自动折行，筛选不影响表格的横向滚动。 */
.record-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  margin-bottom: 18px;
}
.record-filters .field {
  flex: 1 1 150px;
  margin: 0;
}
.record-filters .field:first-child {
  flex: 2 1 260px;
}
.record-filters .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.record-filters > small {
  flex-basis: 100%;
  color: var(--muted, #6b7280);
}
.modal-discard {
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid #e8c57d;
  border-radius: 10px;
  background: #fff9ec;
  color: #634619;
}
.modal-discard p {
  margin: 0 0 12px;
}

/* 找回密码提示与长邮箱在手机端正常换行。 */
.recovery-status { margin: 24px 0; line-height: 1.8; }
.recovery-email { display:block; overflow-wrap:anywhere; padding:12px 16px; background:#f1f6fc; border-radius:8px; }

/* 官网原始透明 Logo：https://www.imtraderfx.com/ 。深色侧栏仅通过 CSS 调整为白色。 */
.official-logo { display: inline-flex; align-items: center; max-width: 100%; }
.official-logo-image { display: block; width: 190px; height: auto; object-fit: contain; }
.brand .official-logo-image { width: 170px; filter: brightness(0) invert(1); }
.brand .brand-copy > small { margin-top: 8px; }
@media(max-width:600px) { .auth-logo .official-logo-image { width: 166px; } }

/* 十种语言共用入口；账号与金额保留独立书写方向，阿拉伯语镜像主框架。 */
.language-select {max-width:135px;min-width:92px;border:0;background:transparent;color:inherit;padding:6px;font:inherit;font-size:12px;}
html[dir="rtl"] aside {left:auto;right:0;}
html[dir="rtl"] .shell {margin-left:0;margin-right:250px;}
html[dir="rtl"] main,html[dir="rtl"] th {text-align:right;}
html[dir="rtl"] td {unicode-bidi:plaintext;}
html[dir="rtl"] input[type="email"],html[dir="rtl"] input[type="password"],html[dir="rtl"] input[type="number"],html[dir="rtl"] input[type="url"],html[dir="rtl"] code,html[dir="rtl"] .official-logo {direction:ltr;unicode-bidi:isolate;}
html[dir="rtl"] .account-actions,html[dir="rtl"] .dialog-actions {direction:rtl;}
html[dir="rtl"] .auth-layout {direction:rtl;}
html[dir="rtl"] .auth-form,html[dir="rtl"] .auth-story {text-align:right;}
@media(max-width:1100px){html[dir="rtl"] .shell {margin-right:220px;}}
@media(max-width:720px){html[dir="rtl"] .shell {margin-right:0;}}
@media(max-width:600px){.language-select{max-width:105px;min-width:84px;font-size:11px;}.language-switch{gap:2px;}.auth-topbar{gap:8px;}}

.trading-workspace {padding:20px}.trading-workspace .account-type-tabs{display:flex;gap:8px;margin:12px 0;flex-wrap:wrap}.trading-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.trading-summary>div{padding:18px;background:#f5f8fc;border-radius:10px}.trading-summary strong{display:block;font-size:24px;margin-top:8px}.trading-summary .negative{color:#c63745}@media(max-width:600px){.trading-summary{grid-template-columns:1fr}.trading-workspace{padding:12px}}

/* 记录时间保持完整可读，窄屏沿用表格横向滚动。 */
.record-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 刷新时先恢复会话，避免闪现登录表单；连接失败提供明确的重试入口。 */
.session-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  text-align: center;
  color: #e8f3ff;
  background: #11283e;
}
.session-loading h1 { font-size: 24px; margin: 0; }
.session-loading p { color: #b8cee0; max-width: 560px; }
.session-loading img { height: auto; }

/* Role capabilities are grouped by the actual portal menu. */
.permission-section { margin: 20px 0; padding: 16px; border: 1px solid #e0e8f2; border-radius: 12px; }
.permission-section h4 { margin: 0 0 12px; }
.permission-section .permission-grid small { display: block; line-height: 1.5; }
