:root {
  color-scheme: dark;
  --bg: #06111a;
  --bg2: #081b2a;
  --panel: rgba(12, 27, 40, 0.86);
  --panel2: rgba(15, 35, 52, 0.9);
  --line: rgba(104, 139, 170, 0.28);
  --line2: rgba(57, 143, 255, 0.45);
  --text: #f3f8ff;
  --muted: #9aaabd;
  --blue: #2f8cff;
  --blue2: #0d4a94;
  --green: #3bd978;
  --red: #ff5b64;
  --gold: #b97820;
  --purple: #7b34c7;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(52, 137, 255, 0.16), transparent 28%),
    radial-gradient(circle at 0% 28%, rgba(30, 125, 186, 0.13), transparent 34%),
    linear-gradient(180deg, #03070d 0%, #061321 40%, #07111a 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 10%, rgba(47, 140, 255, 0.2), transparent 32%),
    rgba(2, 7, 13, 0.96);
  backdrop-filter: blur(20px);
}

.login-screen.hidden {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid rgba(84, 151, 220, 0.32);
  border-radius: 10px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(14, 33, 50, 0.96), rgba(5, 15, 26, 0.96));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-logo strong {
  display: block;
  font-size: 25px;
}

.login-card label span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.login-card label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.login-card input {
  width: 100%;
  height: 44px;
}

.login-button {
  width: 100%;
  height: 44px;
  margin-top: 18px;
}

#loginError {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--red);
}

.mobile-shell {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 260px;
  grid-template-rows: 66px minmax(0, 1fr);
  min-height: 100vh;
}

.desktop-topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 250px 1fr 310px;
  align-items: center;
  border-bottom: 1px solid rgba(60, 118, 164, 0.26);
  background: rgba(3, 8, 15, 0.82);
  backdrop-filter: blur(18px);
}

.desktop-brand,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 28px;
}

.desktop-brand strong,
.mobile-brand strong {
  font-size: 22px;
  letter-spacing: 0;
}

.logo-mark {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
  background: linear-gradient(145deg, #55a7ff, #1265de);
  box-shadow: 0 0 28px rgba(47, 140, 255, 0.55);
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 4px solid rgba(2, 10, 20, 0.82);
  border-top: 0;
}

.main-nav {
  display: flex;
  height: 100%;
}

.main-nav button {
  min-width: 102px;
  border: 0;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  background: transparent;
  color: #c9d5e4;
}

.main-nav button.active {
  color: #55a7ff;
  border-color: rgba(56, 132, 255, 0.38);
  background: linear-gradient(180deg, rgba(31, 113, 215, 0.18), rgba(13, 74, 148, 0.13));
  box-shadow: inset 0 -2px 0 var(--blue);
}

.operator-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-right: 22px;
  color: #cfd9e7;
}

.logout-button {
  height: 28px;
  border: 1px solid rgba(85, 167, 255, 0.35);
  border-radius: 6px;
  background: rgba(47, 140, 255, 0.12);
  color: #b9d9ff;
}

.operator-area small {
  color: var(--muted);
  font-size: 11px;
}

.bell {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #d9e5f5;
  border-radius: 9px 9px 4px 4px;
}

.bell {
  font-size: 0;
}

.bell::before {
  content: "12";
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff3046;
  color: #fff;
  font-size: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8e7ff, #52657d);
  border: 2px solid rgba(255, 255, 255, 0.28);
}

.sidebar,
.rightbar,
.workspace {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4, 18, 31, 0.86), rgba(4, 15, 25, 0.84));
}

.side-panel,
.server-panel,
.ops-panel,
.risk-panel,
.account-board,
.command-log-panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(15, 35, 52, 0.9), rgba(7, 19, 31, 0.9));
  box-shadow: var(--shadow);
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  color: #dbe8f8;
}

.side-title button {
  border: 0;
  background: transparent;
  color: #cfe0f2;
  font-size: 22px;
}

.studio-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.studio-item {
  border: 1px solid rgba(47, 140, 255, 0.2);
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(47, 140, 255, 0.07);
  color: #dfeaff;
  text-align: left;
}

.studio-item.active {
  border-color: var(--blue);
  background: linear-gradient(90deg, rgba(28, 111, 220, 0.45), rgba(17, 51, 86, 0.28));
}

.studio-item strong,
.studio-item span {
  display: block;
}

.studio-item span,
.server-panel span,
.group-menu b {
  color: #90a5b9;
  font-size: 12px;
}

.group-menu {
  display: grid;
  padding: 2px 0 14px;
}

.group-menu button {
  display: flex;
  justify-content: space-between;
  height: 42px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #c8d4e2;
  padding: 0 16px;
}

.group-menu button.active {
  color: #76b7ff;
  border-left-color: var(--blue);
  background: rgba(47, 140, 255, 0.16);
}

.server-panel {
  padding: 14px;
}

.server-panel strong {
  display: block;
  margin-bottom: 12px;
}

.server-panel p {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.server-panel b {
  color: var(--green);
}

.workspace {
  padding: 16px;
  overflow: auto;
}

.mobile-metrics-title {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

input,
select {
  height: 36px;
  border: 1px solid rgba(91, 132, 168, 0.32);
  border-radius: 6px;
  background: rgba(4, 14, 24, 0.82);
  color: var(--text);
  padding: 0 12px;
  outline: 0;
}

select option {
  background: #071827;
}

.button {
  height: 38px;
  border: 1px solid rgba(85, 167, 255, 0.45);
  border-radius: 7px;
  padding: 0 14px;
  color: #eaf4ff;
  background: linear-gradient(180deg, rgba(24, 102, 208, 0.76), rgba(9, 54, 112, 0.76));
  white-space: nowrap;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.button.primary {
  border-color: rgba(55, 217, 120, 0.38);
  background: linear-gradient(180deg, rgba(22, 124, 78, 0.82), rgba(10, 66, 46, 0.82));
}

.button.danger {
  color: #59aaff;
  background: rgba(16, 57, 104, 0.28);
}

.button.small {
  height: 29px;
  padding: 0 12px;
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric-card {
  position: relative;
  min-height: 124px;
  padding: 20px 18px 12px 68px;
  overflow: hidden;
}

.metric-card::before {
  position: absolute;
  top: 27px;
  left: 24px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  font-size: 25px;
  font-weight: 700;
}

.icon-users::before {
  content: "♟";
  color: var(--blue);
}

.icon-wallet::before {
  content: "▣";
  color: #47d498;
}

.icon-chart::before {
  content: "⌁";
  border: 1px solid var(--blue);
}

.icon-profit::before {
  content: "$";
  border: 3px solid rgba(59, 217, 120, 0.56);
  border-radius: 50%;
  color: var(--green);
}

.metric-card span {
  color: #c8d4e1;
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: #a9b5c5;
}

.sparkline {
  position: absolute;
  right: 16px;
  bottom: 12px;
  left: 16px;
  width: calc(100% - 32px);
  height: 34px;
  opacity: 0.92;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.mobile-group-tabs {
  display: none;
}

.desk-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 12px 14px;
  background: rgba(9, 25, 39, 0.84);
}

h2 {
  margin: 0;
  font-size: 16px;
}

.tool-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 260px;
  padding-right: 34px;
}

.search-box span {
  position: absolute;
  right: 10px;
  top: 7px;
  color: #b6c6d8;
}

.view-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #a9bdd3;
}

.view-toggle.active {
  color: var(--blue);
  background: rgba(47, 140, 255, 0.18);
}

.account-board {
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(95, 128, 158, 0.18);
  text-align: left;
}

th {
  color: #9fb0c3;
  font-size: 12px;
  font-weight: 500;
  background: rgba(35, 60, 83, 0.42);
}

td {
  color: #dce7f4;
  font-size: 13px;
}

td strong {
  display: inline-block;
  margin-left: 10px;
  font-size: 15px;
  font-weight: 600;
}

td small {
  display: block;
  margin-left: 58px;
  color: #8292a5;
  font-size: 11px;
}

.platform-tag {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 26px;
  border: 1px solid rgba(72, 213, 123, 0.62);
  border-radius: 6px;
  color: #76de92;
  background: rgba(33, 165, 89, 0.12);
  font-weight: 700;
}

.platform-tag.mt5 {
  border-color: rgba(47, 140, 255, 0.7);
  color: #7eb7ff;
  background: rgba(47, 140, 255, 0.12);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: #637180;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 14px rgba(59, 217, 120, 0.58);
}

.status-dot.offline {
  background: var(--red);
}

.account-cards {
  display: none;
}

.command-log-panel,
.admin-panel {
  margin-top: 12px;
  overflow: hidden;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(15, 35, 52, 0.9), rgba(7, 19, 31, 0.9));
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head a {
  color: #4da2ff;
  text-decoration: none;
  font-size: 13px;
}

.panel-head span {
  color: #78baff;
  font-size: 13px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
}

.admin-stats article,
.admin-form,
.admin-row {
  border: 1px solid rgba(92, 132, 168, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-stats article {
  padding: 12px;
}

.admin-stats span,
.admin-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 0 16px 14px;
}

.admin-form {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.admin-form h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.admin-form input,
.admin-form select {
  width: 100%;
}

.admin-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.admin-row.compact {
  grid-template-columns: 1.2fr 0.8fr 1fr;
}

.admin-section-title {
  margin-top: 10px;
  padding: 10px 2px 2px;
  color: #78baff;
  font-weight: 700;
}

.row-actions,
.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.manage-actions {
  justify-content: stretch;
}

.manage-actions .button {
  flex: 1;
}

.admin-row code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #76b7ff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-log {
  display: grid;
}

.log-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(95, 128, 158, 0.18);
}

.log-item strong {
  display: block;
  color: #dbe7f6;
}

.log-item span,
.log-item b {
  display: block;
  margin-top: 5px;
  color: #9badc1;
  font-size: 12px;
  font-weight: 500;
}

.empty {
  padding: 28px;
  color: #8fa0b3;
  text-align: center;
}

.rightbar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px 12px 16px 0;
}

.ops-panel,
.risk-panel {
  padding: 14px;
}

.ops-panel h2,
.risk-panel h2 {
  margin-bottom: 14px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  margin-top: 12px;
  border-radius: 7px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.action-card span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: 14px;
  font-size: 24px;
}

.action-card.blue {
  background: linear-gradient(135deg, #1a72d7, #0d4088);
}

.action-card.gold {
  background: linear-gradient(135deg, #a66a22, #6f4210);
}

.action-card.purple {
  background: linear-gradient(135deg, #7b35ce, #3d196d);
}

.gauge {
  position: relative;
  display: grid;
  place-items: center;
  height: 170px;
}

.gauge-ring {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background:
    conic-gradient(from 235deg, #74e48d 0 36%, #4c98ff 36% 68%, rgba(77, 100, 125, 0.28) 68% 100%);
  mask: radial-gradient(circle, transparent 54%, #000 56%);
}

.gauge strong {
  margin-top: 28px;
  font-size: 38px;
}

.gauge span {
  margin-top: -24px;
  color: #80e99a;
}

.risk-list {
  display: grid;
  gap: 6px;
}

.risk-list p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(95, 128, 158, 0.16);
  color: #9fb0c4;
  font-size: 13px;
}

.risk-list b {
  color: #87e799;
}

.mobile-action-bar {
  display: none;
}

.sub-head {
  border-top: 1px solid var(--line);
}

.login-record-list {
  padding: 16px;
}

#pageSubTitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(15, 35, 52, 0.9), rgba(7, 19, 31, 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(95, 128, 158, 0.18);
}

.gold-button {
  border-color: rgba(255, 184, 75, 0.45);
  background: linear-gradient(180deg, rgba(173, 105, 28, 0.82), rgba(94, 57, 14, 0.82));
}

.purple-button {
  border-color: rgba(164, 103, 255, 0.45);
  background: linear-gradient(180deg, rgba(121, 54, 199, 0.82), rgba(66, 26, 111, 0.82));
}

.manage-grid,
.risk-cards,
.report-cards,
.ea-access-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.manage-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.manage-card,
.risk-card,
.report-card,
.ea-access-card {
  border: 1px solid rgba(92, 132, 168, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.manage-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.manage-card > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manage-card strong {
  display: block;
  font-size: 18px;
}

.manage-card small,
.ea-access-card small {
  color: var(--muted);
}

.manage-card p,
.report-card p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  color: #a9b9ca;
}

.manage-card b,
.report-card b {
  color: #edf6ff;
}

.command-badge,
.status-pill {
  display: inline-grid;
  place-items: center;
  min-width: 68px;
  height: 26px;
  border-radius: 6px;
  font-size: 12px;
}

.command-badge {
  border: 1px solid rgba(47, 140, 255, 0.5);
  color: #7eb7ff;
  background: rgba(47, 140, 255, 0.14);
}

.status-pill.pending {
  color: #ffd076;
  background: rgba(255, 184, 75, 0.13);
}

.status-pill.success {
  color: #66e895;
  background: rgba(59, 217, 120, 0.13);
}

.status-pill.failed {
  color: #ff727a;
  background: rgba(255, 91, 100, 0.13);
}

.risk-cards,
.report-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.risk-card,
.report-card {
  padding: 16px;
}

.risk-card h3,
.report-card h3,
.ea-access-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.risk-card strong {
  display: block;
  font-size: 34px;
}

.risk-card span {
  display: block;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.risk-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-card em {
  border: 1px solid rgba(85, 167, 255, 0.25);
  border-radius: 999px;
  padding: 4px 8px;
  color: #9ccaff;
  background: rgba(47, 140, 255, 0.08);
  font-style: normal;
  font-size: 12px;
}

.ea-access-card {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 14px;
  padding: 16px;
}

.ea-access-card code {
  color: #7eb7ff;
  word-break: break-all;
}

.endpoint-list {
  display: grid;
  gap: 8px;
}

.endpoint-list p {
  margin: 0;
  padding: 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.endpoint-list span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

body.card-view .table-wrap {
  display: none;
}

body.card-view .account-cards {
  display: grid;
  gap: 10px;
  padding: 12px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .rightbar {
    display: none;
  }

  .desktop-topbar {
    grid-template-columns: 220px 1fr 220px;
  }

  .main-nav button {
    min-width: 88px;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(47, 140, 255, 0.17), transparent 30%),
      linear-gradient(180deg, #03080e 0%, #061827 100%);
  }

  .desktop-topbar,
  .sidebar,
  .rightbar,
  .desk-tools {
    display: none;
  }

  .mobile-shell {
    display: block;
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(60, 118, 164, 0.24);
    background: rgba(2, 8, 14, 0.9);
    backdrop-filter: blur(18px);
  }

  .mobile-top {
    display: grid;
    grid-template-columns: 42px 1fr auto 42px;
    align-items: center;
    min-height: 64px;
    padding: 0 12px;
  }

  .icon-button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
  }

  .mobile-brand {
    justify-content: center;
    padding-left: 0;
  }

  .mobile-brand .logo-mark {
    width: 30px;
    height: 30px;
  }

  .mobile-state {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #79e892;
    font-size: 14px;
  }

  .mobile-state span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #43da78;
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .workspace {
    padding: 12px;
    padding-bottom: 88px;
    overflow: visible;
  }

  .mobile-metrics-title {
    margin-top: 4px;
  }

  .mobile-metrics-title input {
    flex: 1;
    min-width: 0;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric-card {
    min-height: 126px;
    padding: 18px 12px 10px;
  }

  .metric-card::before {
    position: static;
    margin-bottom: 8px;
  }

  .metric-card strong {
    font-size: 23px;
  }

  .sparkline {
    height: 26px;
  }

  .mobile-group-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 12px 0;
    border: 1px solid rgba(75, 125, 163, 0.34);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(10, 25, 38, 0.86);
  }

  .mobile-group-tabs button {
    height: 58px;
    border: 0;
    border-right: 1px solid rgba(75, 125, 163, 0.34);
    background: transparent;
    color: #d9e5f4;
    font-size: 17px;
  }

  .mobile-group-tabs button.active {
    color: #fff;
    border: 1px solid var(--blue);
    background: linear-gradient(100deg, rgba(23, 93, 174, 0.52), rgba(13, 48, 80, 0.68));
  }

  .mobile-group-tabs b {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-left: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5ab0ff, #176bd4);
    font-size: 14px;
  }

  .account-board {
    border-radius: 8px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .table-wrap {
    display: none;
  }

  .account-cards {
    display: grid;
    gap: 8px;
  }

  .account-card {
    border: 1px solid rgba(111, 145, 172, 0.34);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(13, 33, 50, 0.92), rgba(6, 18, 28, 0.94));
    overflow: hidden;
  }

  .card-head {
    display: grid;
    grid-template-columns: 34px 66px 1fr 72px 124px;
    align-items: center;
    min-height: 86px;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid rgba(90, 125, 154, 0.2);
  }

  .card-head input {
    width: 28px;
    height: 28px;
    accent-color: var(--blue);
  }

  .card-head strong {
    display: block;
    font-size: 23px;
  }

  .card-head small {
    color: #b5c1cf;
    font-size: 15px;
  }

  .card-head em {
    color: #dfe9f8;
    font-style: normal;
    font-size: 17px;
  }

  .card-head em::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: currentColor;
  }

  .platform-tag {
    min-width: 58px;
    height: 42px;
    font-size: 20px;
  }

  .card-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 18px 22px;
  }

  .card-metrics span {
    color: #aeb9c7;
    font-size: 15px;
  }

  .card-metrics strong {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: 18px;
  }

  .card-foot {
    display: none;
  }

  .button.small {
    height: 44px;
    color: #45a4ff;
    border-color: rgba(47, 140, 255, 0.68);
    background: rgba(13, 60, 123, 0.22);
    font-size: 17px;
  }

  .command-log-panel {
    margin-top: 12px;
  }

  .panel-head {
    padding: 10px 16px;
  }

  .command-log {
    max-height: 132px;
    overflow: auto;
  }

  .log-item {
    grid-template-columns: 1fr 1fr;
    padding: 8px 16px;
  }

  .mobile-action-bar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 22;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .mobile-action-bar .button {
    height: 54px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
  }

  .mobile-blue {
    background: linear-gradient(135deg, #1c78df, #0d4b96);
  }

  .mobile-gold {
    background: linear-gradient(135deg, #a86a24, #6e430f);
  }

  .mobile-purple {
    background: linear-gradient(135deg, #7a35cb, #451978);
  }

  .admin-stats,
  .admin-grid,
  .admin-row,
  .risk-cards,
  .report-cards,
  .ea-access-card {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    margin-top: 12px;
  }

  .manage-grid,
  .risk-cards,
  .report-cards,
  .ea-access-list {
    padding: 12px;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .panel-card {
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .card-head {
    grid-template-columns: 34px 58px 1fr 58px;
  }

  .card-head .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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