/* RongTongYuan modern admin theme */
:root {
  --bg: #edf3f8;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --text: #0b1b33;
  --muted: #53627a;
  --line: #d8e3ef;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --green: #10a877;
  --amber: #e6a11a;
  --red: #e5485d;
  --cyan: #0ea5b7;
  --shadow: 0 16px 42px rgba(15, 35, 64, 0.11);
  --shadow-soft: 0 10px 28px rgba(15, 35, 64, 0.08);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

body,
.app-shell,
.app-shell.dashboard-shell,
.main,
.dashboard-shell .main,
.account-detail-shell .main {
  background: linear-gradient(180deg, #f6f9fc 0%, #edf3f8 52%, #e9f0f6 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 48%, #eef4fa 100%);
  border-right: 1px solid rgba(199, 211, 226, 0.72);
  box-shadow: 12px 0 34px rgba(25, 48, 78, 0.08);
}

.sidebar-head {
  min-height: 76px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(216, 227, 239, 0.9);
}

.sidebar-head strong,
.login-brand strong {
  color: #1d4ed8;
  font-weight: 900;
  text-shadow: none;
}

.brand-icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 183, 0.13));
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.brand-icon i,
.sidebar-logo i {
  color: #2563eb;
  transform: scale(1.12);
}

.nav-list {
  gap: 9px;
  padding: 14px 10px;
}

.nav-item {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-weight: 850;
  gap: 11px;
  padding: 0 12px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.nav-item:hover {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(191, 219, 254, 0.86);
  transform: translateX(2px);
}

.nav-item.active {
  color: #0f4cd2;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(232, 246, 250, 0.95));
  border-color: rgba(147, 197, 253, 0.92);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.13);
}

.nav-item .nav-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid rgba(191, 219, 254, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 6px 14px rgba(37, 99, 235, 0.08);
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

.nav-item .nav-icon::before {
  content: "";
  width: 15px;
  height: 15px;
  background: #2563eb;
  display: block;
  mask: var(--nav-mask) center / contain no-repeat;
  -webkit-mask: var(--nav-mask) center / contain no-repeat;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  background: linear-gradient(135deg, #2563eb, #0ea5b7);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.nav-item:hover .nav-icon::before,
.nav-item.active .nav-icon::before {
  background: #ffffff;
}

.nav-item[data-page="dashboard"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="accounts"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm9-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM2 20a7 7 0 0 1 14 0v1H2v-1Zm14.5 1v-1a9 9 0 0 0-2.2-5.9A6 6 0 0 1 23 19.5V21h-6.5Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="risk"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 2 22 20H2L12 2Zm-1 7v5h2V9h-2Zm0 7v2h2v-2h-2Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="copy"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 5a3 3 0 1 1 4 2.83V10h6V7.83A3 3 0 1 1 17 8v4H7V7.83A3 3 0 0 1 5 5Zm0 14a3 3 0 0 1 2-2.83V14h10v2.17A3 3 0 1 1 15 17H9a3 3 0 1 1-4 2Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="agents"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10 3h4v4h-4V3ZM4 17h4v4H4v-4Zm12 0h4v4h-4v-4ZM11 9h2v3h5v3h-2v-1H8v1H6v-3h5V9Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="finance"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M11 2v11h11A11 11 0 0 0 11 2Zm-2 2.2A10 10 0 1 0 19.8 15H9V4.2Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="notifications"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22a3 3 0 0 0 3-3H9a3 3 0 0 0 3 3Zm8-5-2-3v-4a6 6 0 0 0-12 0v4l-2 3v1h16v-1Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="orders"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 4h16v3H4V4Zm0 6h10v3H4v-3Zm0 6h8v3H4v-3Zm14.5-2.5L21 16l-5 5-3-3 2-2 1 1 2.5-3.5Z'/%3E%3C/svg%3E");
}

.nav-item[data-page="logs"] .nav-icon {
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6V2Zm8 1.5V8h4.5L14 3.5ZM8 11h8v2H8v-2Zm0 4h8v2H8v-2Z'/%3E%3C/svg%3E");
}

.logout-nav .nav-icon {
  background: #fff5f7;
  border-color: #ffd1d9;
  --nav-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 3h9v3H7v12h6v3H4V3Zm12.5 4.5L22 12l-5.5 4.5V14H10v-4h6.5V7.5Z'/%3E%3C/svg%3E");
}

.logout-nav .nav-icon::before {
  background: #e5485d;
}

.logout-nav:hover .nav-icon {
  background: linear-gradient(135deg, #e5485d, #f97386);
  border-color: rgba(229, 72, 93, 0.28);
  box-shadow: 0 8px 18px rgba(229, 72, 93, 0.2);
}

.logout-nav:hover .nav-icon::before {
  background: #ffffff;
}

.nav-count {
  min-width: 35px;
  min-height: 24px;
  background: linear-gradient(135deg, #2563eb, #0ea5b7);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.logout-nav {
  color: #e5485d;
}

.logout-nav:hover {
  color: #be123c;
  background: #fff1f4;
  border-color: #ffd1d9;
}

.topbar,
.fund-header,
.crm-header,
.panel-header,
.account-page .page-head,
.risk-header,
.strategy-header,
.notification-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
  border: 1px solid rgba(216, 227, 239, 0.78);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.topbar {
  min-height: 78px;
  margin-bottom: 22px;
}

.topbar h2,
.fund-header h3,
.crm-header h1,
.account-detail-page h1,
.logs-page h1 {
  color: #081a33;
  font-weight: 950;
  letter-spacing: 0;
}

.topbar p,
.fund-header p,
.crm-header p,
.order-log-toolbar p,
.panel p {
  color: #53627a;
}

input,
select,
.ghost-filter,
.license-search,
.search-box input,
.toolbar input {
  min-height: 44px;
  border: 1px solid #d3dfec;
  border-radius: 8px;
  background: #ffffff;
  color: #0b1b33;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:hover,
select:hover,
.ghost-filter:hover,
.license-search:hover {
  border-color: #b9cce2;
}

input:focus,
select:focus,
.ghost-filter:focus,
.license-search:focus {
  border-color: #2563eb;
  box-shadow: var(--ring);
}

button,
.primary,
.ghost,
.danger,
.warning,
.danger-light,
.icon-button,
.excel-button,
.inline-action,
.table-pagination button,
.account-bulk-bar button,
.license-actions button,
.agent-actions button,
.notification-actions button,
.risk-alert-row button,
.device-actions button {
  border-radius: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

button:hover:not(:disabled),
.primary:hover,
.ghost:hover,
.danger-light:hover,
.inline-action:hover,
.table-pagination button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary,
.login-submit,
.table-pagination button.active,
.expiry-filter-bar button.active,
.trend-tabs button.active,
.period-tabs button.active,
.status-tabs button.active {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5b7 100%);
  color: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.primary:hover,
.login-submit:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0f8fa0 100%);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.26);
}

.ghost,
.icon-button,
.account-bulk-bar button,
.license-actions button,
.agent-actions button,
.notification-actions button,
.risk-alert-row button,
.device-actions button,
.inline-action {
  background: #ffffff;
  border: 1px solid #d3dfec;
  color: #2563eb;
  box-shadow: 0 6px 16px rgba(15, 35, 64, 0.04);
}

.ghost:hover,
.icon-button:hover,
.account-bulk-bar button:hover:not(:disabled),
.license-actions button:hover,
.agent-actions button:hover,
.notification-actions button:hover,
.risk-alert-row button:hover,
.device-actions button:hover,
.inline-action:hover {
  background: #f3f8ff;
  border-color: #93b9ff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.danger,
.danger-light,
.inline-action.danger,
.account-bulk-bar button.danger {
  border-color: #ffd1d9;
  color: #e5485d;
  background: #fff5f7;
}

.danger:hover,
.danger-light:hover,
.inline-action.danger:hover,
.account-bulk-bar button.danger:hover:not(:disabled) {
  color: #be123c;
  background: #fff1f4;
  border-color: #ffafbd;
}

.fund-card,
.crm-metric,
.agent-metric-grid article,
.risk-alert-metrics article,
.notification-metric-grid article,
.command-metric-grid article,
.strategy-metric-grid article,
.fee-summary-grid article,
.metric-card,
.detail-metric,
.risk-alert-panel,
.order-log-panel,
.copy-diagnostic-panel,
.copy-health-panel,
.copy-signal-panel,
.copy-task-panel,
.strategy-panel,
.detail-panel,
.system-log-panel,
.agent-panel,
.crm-chart-card,
.finance-agent-panel,
.finance-bill-panel,
.finance-transaction-panel,
.view-card,
.modal-card {
  border: 1px solid rgba(216, 227, 239, 0.78);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 252, 255, 0.98));
  box-shadow: var(--shadow-soft);
}

.fund-card:hover,
.crm-metric:hover,
.agent-metric-grid article:hover,
.risk-alert-metrics article:hover,
.notification-metric-grid article:hover,
.command-metric-grid article:hover,
.strategy-metric-grid article:hover,
.fee-summary-grid article:hover,
.metric-card:hover,
.detail-metric:hover,
.copy-health-grid div:hover {
  transform: translate3d(0, -4px, 0);
  border-color: rgba(147, 197, 253, 0.95);
  box-shadow: 0 18px 42px rgba(15, 35, 64, 0.14);
}

.fund-card strong,
.crm-metric strong,
.agent-metric-grid strong,
.risk-alert-metrics strong,
.notification-metric-grid strong,
.command-metric-grid strong,
.strategy-metric-grid strong,
.detail-metric strong,
.metric-card strong {
  color: #0b1b33;
}

.fund-card span,
.crm-metric span,
.agent-metric-grid span,
.risk-alert-metrics span,
.notification-metric-grid span,
.command-metric-grid span,
.strategy-metric-grid span,
.detail-metric span,
.metric-card span {
  color: #52627a;
}

.fund-card.blue,
.agent-metric-grid article,
.risk-alert-metrics article,
.notification-metric-grid article,
.command-metric-grid article,
.strategy-metric-grid article,
.crm-metric.blue,
.detail-metric.blue,
.copy-health-grid div {
  border-left-color: #2563eb;
}

.fund-card.green,
.crm-metric.green,
.detail-metric.green,
.strategy-metric-grid article.success,
.notification-metric-grid article.info {
  border-left-color: #10a877;
}

.fund-card.red,
.crm-metric.red,
.detail-metric.red,
.risk-alert-metrics article.danger,
.command-metric-grid article.danger,
.notification-metric-grid article.danger {
  border-left-color: #e5485d;
}

.crm-metric.cyan,
.detail-metric.purple,
.strategy-metric-grid article.info {
  border-left-color: #0ea5b7;
}

.risk-alert-metrics article.warning,
.command-metric-grid article.warning,
.strategy-metric-grid article.warning,
.notification-metric-grid article.warning,
.detail-metric.amber {
  border-left-color: #e6a11a;
}

.fund-card i,
.detail-metric i {
  color: rgba(37, 99, 235, 0.2);
  background: rgba(239, 246, 255, 0.92);
}

.table-wrap {
  border-radius: 8px;
}

table {
  background: #ffffff;
}

thead th,
.order-log-table th,
.copy-link-table th {
  background: #f5f8fc;
  color: #64748b;
  font-weight: 950;
  border-bottom: 1px solid #dce7f3;
}

tbody td,
.order-log-table td,
.copy-link-table td {
  border-bottom-color: #e7eef6;
}

tbody tr,
.license-row,
.risk-alert-row,
.notification-row {
  transition: background 0.14s ease, box-shadow 0.14s ease;
}

tbody tr:hover,
.license-row:hover,
.risk-alert-row:hover,
.notification-row:hover {
  background: #f6faff;
}

.badge,
.log-kind,
.risk-pill,
.finance-type-pill,
.agent-level-pill,
.command-status,
.copy-health-state,
.expiry-filter-bar button,
.status-tabs button {
  border-radius: 999px;
  font-weight: 900;
}

.badge.success,
.log-kind.command,
.risk-pill.safe,
.copy-health-state {
  background: #e9fbf3;
  color: #087a55;
}

.badge.warning,
.risk-pill.warning,
.log-kind.task {
  background: #fff7df;
  color: #a45f00;
}

.badge.error,
.risk-pill.danger,
.copy-health-state.danger {
  background: #fff0f4;
  color: #be123c;
}

.log-kind.order {
  background: #eef5ff;
  color: #1d4ed8;
}

.trend-tabs,
.period-tabs,
.expiry-filter-bar,
.status-tabs {
  background: rgba(245, 248, 252, 0.92);
  border: 1px solid rgba(216, 227, 239, 0.72);
  border-radius: 8px;
  padding: 4px;
}

.trend-tabs button,
.period-tabs button,
.expiry-filter-bar button,
.status-tabs button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #52627a;
}

.login-shell {
  grid-template-columns: minmax(340px, 480px) 1fr;
  background: linear-gradient(135deg, rgba(11, 27, 51, 0.94), rgba(18, 70, 95, 0.86)), linear-gradient(180deg, #0b1b33, #123f59);
}

.login-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
  border-right: 1px solid rgba(216, 227, 239, 0.72);
  box-shadow: 22px 0 54px rgba(5, 15, 31, 0.22);
}

.login-brand {
  padding-bottom: 28px;
  border-bottom: 1px solid #e1eaf4;
}

.login-input {
  border-radius: 8px;
  background: #ffffff;
  border-color: #d3dfec;
  box-shadow: 0 8px 22px rgba(15, 35, 64, 0.05);
}

.login-input:focus-within {
  border-color: #2563eb;
  box-shadow: var(--ring), 0 10px 24px rgba(15, 35, 64, 0.06);
}

.login-submit {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 950;
}

.modal {
  background: rgba(8, 26, 51, 0.5);
  backdrop-filter: blur(8px);
  align-items: center;
  overflow-y: auto;
  padding: 18px;
}

.modal-card {
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(5, 15, 31, 0.28);
}

.modal-card .modal-head,
.modal-card .modal-actions {
  flex: 0 0 auto;
}

.modal-card .form-grid,
.modal-card .view-grid {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-right: 6px;
}

.modal-card .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #ffffff);
  border-top: 1px solid rgba(216, 227, 239, 0.9);
  padding-top: 14px;
}

.copy-health-grid div {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nav-count {
  display: none !important;
}

.brand-icon,
.sidebar-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.42) 0 12%, transparent 13%),
    linear-gradient(135deg, #2563eb 0%, #0ea5b7 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.login-brand .brand-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
}

.brand-icon i,
.sidebar-logo i {
  display: none;
}

.brand-icon::before {
  content: "";
  width: 21px;
  height: 21px;
  background: #ffffff;
  display: block;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 18h16v2H2V4h2v14Zm2-2 4-5 4 3 5-8 2 1.3-6.4 10.1-4.2-3.1-3 3.7L6 16Z'/%3E%3Ccircle fill='black' cx='10' cy='11' r='1.7'/%3E%3Ccircle fill='black' cx='14' cy='14' r='1.7'/%3E%3Ccircle fill='black' cx='19' cy='6' r='1.7'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 18h16v2H2V4h2v14Zm2-2 4-5 4 3 5-8 2 1.3-6.4 10.1-4.2-3.1-3 3.7L6 16Z'/%3E%3Ccircle fill='black' cx='10' cy='11' r='1.7'/%3E%3Ccircle fill='black' cx='14' cy='14' r='1.7'/%3E%3Ccircle fill='black' cx='19' cy='6' r='1.7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.brand-icon::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9ef6d5;
  box-shadow: 0 0 0 3px rgba(158, 246, 213, 0.22);
}

.risk-auto-box,
.notification-config-panel {
  border: 1px solid rgba(216, 227, 239, 0.86);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  margin-top: 18px;
}

.risk-auto-title,
.config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.risk-auto-title {
  margin-bottom: 14px;
}

.risk-auto-title strong {
  color: #0b1b33;
  font-size: 15px;
  font-weight: 950;
}

.risk-auto-title span {
  border-radius: 999px;
  background: #eef5ff;
  color: #2563eb;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.risk-grid.compact {
  margin-top: 12px;
}

.form-hint {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.7;
}

.notification-config-panel {
  padding: 0;
  overflow: hidden;
}

.notification-config-grid,
.notification-channel-grid {
  display: grid;
  gap: 14px;
  padding: 16px 22px 0;
}

.notification-config-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.notification-channel-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  padding-bottom: 16px;
}

.notification-config-panel .form-hint {
  padding: 0 22px 18px;
}

.risk-action-panel {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(216, 227, 239, 0.88);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-soft);
}

.risk-action-panel h3 {
  margin: 0 0 4px;
  color: #0b1b33;
  font-size: 16px;
  font-weight: 950;
}

.risk-action-panel p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.risk-action-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.risk-action-row {
  display: grid;
  grid-template-columns: 1.3fr 1.2fr 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 226, 242, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.risk-action-main,
.risk-action-account,
.risk-action-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.risk-action-main {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.risk-action-main em {
  min-width: 58px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2563eb;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.risk-action-row.pending_approval .risk-action-main em {
  background: #fff7ed;
  color: #c2410c;
}

.risk-action-row.queued .risk-action-main em {
  background: #ecfdf5;
  color: #047857;
}

.risk-action-row.rejected .risk-action-main em {
  background: #fff1f2;
  color: #e11d48;
}

.risk-action-row.blocked .risk-action-main em {
  background: #f1f5f9;
  color: #475569;
}

.risk-action-main strong,
.risk-action-account strong {
  color: #0b1b33;
  font-weight: 950;
}

.risk-action-main span,
.risk-action-account span,
.risk-action-meta span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.risk-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-action-buttons button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 7px;
  background: #ffffff;
  color: #2563eb;
  font-weight: 950;
  cursor: pointer;
}

.risk-action-buttons button:first-child {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border-color: transparent;
  color: #ffffff;
}

.risk-action-buttons button.danger {
  background: #fff7f8;
  border-color: rgba(225, 29, 72, 0.24);
  color: #e11d48;
}

.safety-note {
  width: fit-content;
  color: #b45309 !important;
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 950 !important;
}

button:disabled,
.license-actions button:disabled,
.danger-zone button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.risk-alert-empty {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
  font-weight: 900;
}

.settings-layout {
  grid-template-columns: minmax(310px, 0.86fr) minmax(420px, 1.14fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
}

.settings-layout > .panel {
  height: 100%;
}

.settings-layout > .panel:first-child {
  grid-column: 1;
  grid-row: 1;
}

.settings-layout .backup-panel {
  grid-column: 1;
  grid-row: 2;
}

.settings-layout .security-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.settings-layout .password-box {
  margin-top: 14px;
  padding-top: 14px;
}

.settings-layout .permission-list {
  gap: 10px;
}

.settings-layout .security-check-list {
  gap: 9px;
}

.settings-layout .security-check-item {
  padding: 11px 13px;
}

.settings-layout .backup-panel {
  align-content: start;
}

.login-panel {
  width: 430px;
  min-height: 468px;
  border-radius: 14px;
}

.login-brand {
  height: 152px;
  gap: 10px;
  background:
    radial-gradient(circle at 52% 18%, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.login-brand div {
  gap: 12px;
}

.login-brand strong {
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1;
}

.login-brand small {
  font-size: 14px;
  color: #334155;
}

.brand-icon,
.sidebar-logo {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 74% 20%, rgba(255, 255, 255, 0.58) 0 13%, transparent 14%),
    linear-gradient(135deg, #1d4ed8 0%, #2563eb 48%, #0ea5b7 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

.login-brand .brand-icon {
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.brand-icon i,
.sidebar-logo i {
  display: none;
}

.brand-icon::before,
.sidebar-logo::before {
  content: "";
  position: static;
  left: auto;
  top: auto;
  width: 25px;
  height: 25px;
  border: 0;
  transform: none;
  background: #ffffff;
  display: block;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 28 28' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 22h21v2H2V4h2v18Zm3-3.6 5.1-6.2 4.9 3.7 6-9.4 2.1 1.3-7.4 11.7-5.2-3.8-3.9 4.7L7 18.4Z'/%3E%3Ccircle fill='black' cx='12' cy='12' r='2'/%3E%3Ccircle fill='black' cx='17' cy='16' r='2'/%3E%3Ccircle fill='black' cx='23' cy='7' r='2'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 28 28' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 22h21v2H2V4h2v18Zm3-3.6 5.1-6.2 4.9 3.7 6-9.4 2.1 1.3-7.4 11.7-5.2-3.8-3.9 4.7L7 18.4Z'/%3E%3Ccircle fill='black' cx='12' cy='12' r='2'/%3E%3Ccircle fill='black' cx='17' cy='16' r='2'/%3E%3Ccircle fill='black' cx='23' cy='7' r='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-brand .brand-icon::before {
  width: 38px;
  height: 38px;
}

.brand-icon::after,
.sidebar-logo::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border: 0;
  transform: none;
  border-radius: 50%;
  background: #a7f3d0;
  box-shadow: 0 0 0 4px rgba(167, 243, 208, 0.22);
}

.login-brand .brand-icon::after {
  right: 11px;
  bottom: 11px;
  width: 9px;
  height: 9px;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-panel {
    border-right: 0;
  }

  .notification-config-grid,
  .notification-channel-grid {
    grid-template-columns: 1fr;
  }

  .risk-action-row {
    grid-template-columns: 1fr;
  }

  .risk-action-buttons {
    justify-content: flex-start;
  }

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

  .settings-layout > .panel:first-child,
  .settings-layout .backup-panel,
  .settings-layout .security-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

/* 2026 brand refresh: login, navigation and primary dashboard */
body {
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.login-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  align-items: center;
  gap: clamp(54px, 7vw, 112px);
  min-height: 100vh;
  padding: clamp(32px, 6vw, 96px);
  overflow: hidden;
  background:
    radial-gradient(circle at 13% 18%, rgba(56, 189, 248, 0.18), transparent 30%),
    radial-gradient(circle at 70% 82%, rgba(45, 212, 191, 0.12), transparent 34%),
    linear-gradient(135deg, #071426 0%, #0b2340 48%, #0d3850 100%);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.1);
}

.login-shell::before {
  width: 620px;
  height: 620px;
  left: -270px;
  bottom: -330px;
  box-shadow: 0 0 0 90px rgba(14, 165, 183, 0.025), 0 0 0 180px rgba(37, 99, 235, 0.02);
}

.login-shell::after {
  width: 360px;
  height: 360px;
  right: -150px;
  top: -160px;
  box-shadow: 0 0 0 70px rgba(56, 189, 248, 0.025);
}

.login-story {
  width: min(720px, 100%);
  color: #ffffff;
}

.login-story-content {
  display: grid;
  gap: 26px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.07);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.1), 0 0 16px rgba(94, 234, 212, 0.65);
}

.login-story h1 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(42px, 4vw, 68px);
  line-height: 1.16;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.login-story h1 em {
  color: #67e8f9;
  font-style: normal;
}

.login-story-content > p {
  max-width: 610px;
  margin: 0;
  color: #a9bed2;
  font-size: 17px;
  line-height: 1.8;
}

.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.login-feature-grid article {
  padding: 17px 18px;
  border: 1px solid rgba(148, 210, 233, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px);
}

.login-feature-grid strong,
.login-feature-grid span {
  display: block;
}

.login-feature-grid strong {
  margin-bottom: 7px;
  color: #e6f7ff;
  font-size: 14px;
}

.login-feature-grid span {
  color: #829bb1;
  font-size: 12px;
  line-height: 1.55;
}

.login-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 42px;
  color: #607d96;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.login-trust b {
  position: relative;
  padding-left: 15px;
  color: #7fa1b9;
  letter-spacing: 0.08em;
}

.login-trust b::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  transform: translateY(-50%);
}

.login-panel {
  width: 100%;
  min-height: 540px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(250, 252, 255, 0.97);
  box-shadow: 0 36px 90px rgba(0, 8, 22, 0.35);
  overflow: hidden;
}

.login-brand {
  height: 174px;
  padding: 30px 34px 26px;
  border-bottom-color: #e7edf5;
}

.login-brand strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.login-brand small {
  margin-top: 2px;
  color: #64748b;
}

.login-form {
  gap: 20px;
  padding: 30px 38px 24px;
}

.login-form label > span {
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.login-input {
  min-height: 52px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 35, 64, 0.04);
}

.login-input i {
  display: inline-grid;
  place-items: center;
  width: 49px;
  color: #7b8ba1;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  border-right: 1px solid #e4eaf2;
}

.login-input input {
  padding-left: 16px;
}

.login-submit {
  min-height: 52px;
  margin-top: 4px;
  border-radius: 12px;
  letter-spacing: 0.04em;
}

.login-panel footer {
  color: #94a3b8;
  font-size: 11px;
}

.sidebar {
  box-shadow: 10px 0 36px rgba(15, 35, 64, 0.06);
}

.sidebar-head {
  min-height: 86px;
}

.nav-list {
  gap: 7px;
  padding: 16px 12px;
}

.nav-item {
  min-height: 46px;
  border-radius: 11px;
}

.nav-item.active {
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.11), inset 3px 0 0 #2563eb;
}

.fund-header {
  border: 1px solid rgba(216, 227, 239, 0.82);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(15, 35, 64, 0.07);
}

.fund-card,
.fund-panel {
  border-radius: 14px;
}

.fund-card {
  overflow: hidden;
}

.fund-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -36px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.035;
}

.fund-card strong {
  letter-spacing: -0.025em;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 42px;
    padding: 42px;
  }

  .login-story h1 {
    font-size: 44px;
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
  }

  .login-feature-grid article:nth-child(3) {
    display: none;
  }
}

@media (max-width: 820px) {
  .login-shell {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 24px;
  }

  .login-story {
    display: none;
  }

  .login-panel {
    max-width: 440px;
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 14px;
  }

  .login-panel {
    min-height: 0;
    border-radius: 18px;
  }

  .login-brand {
    height: 146px;
    padding: 24px;
  }

  .login-brand .brand-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
  }

  .login-brand strong {
    font-size: 24px;
  }

  .login-form {
    padding: 26px 24px 18px;
  }
}

/* Keep inactive application surfaces out of responsive document flow. */
.hidden {
  display: none !important;
}

/* 2026 workspace refresh: accounts, risk, strategy and forms */
.page.active {
  animation: page-enter 0.28s ease both;
}

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

.crm-page {
  gap: 18px;
}

.crm-header {
  position: relative;
  min-height: 96px;
  padding: 22px 26px 22px 30px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 35, 64, 0.075);
}

.crm-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 4px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, #2563eb, #0ea5b7);
}

.crm-header::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -88px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 183, 0.07), transparent 68%);
  pointer-events: none;
}

.crm-header h2 {
  margin: 0 0 7px;
  color: #0b1b33;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.crm-header p {
  margin: 0;
  color: #6b7b90;
  font-size: 13px;
}

.crm-user b {
  background: linear-gradient(135deg, #2563eb, #0ea5b7);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.license-toolbar {
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(216, 227, 239, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px rgba(15, 35, 64, 0.045);
}

.license-search {
  border-radius: 10px;
  background: #f8fbff;
}

.license-search span {
  color: #2563eb;
  font-size: 20px;
}

.license-toolbar .ghost-filter,
.risk-alert-toolbar .ghost-filter,
.strategy-actions .ghost-filter,
.crm-header > .ghost-filter {
  border-radius: 10px;
  font-weight: 800;
}

#addAccountButton,
#saveCopyButton,
#createStrategyButton {
  color: #1d4ed8;
  border-color: rgba(147, 197, 253, 0.9);
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

#addAccountButton::before,
#createStrategyButton::before {
  content: "+";
  margin-right: 6px;
  font-size: 16px;
  font-weight: 800;
}

.expiry-filter-bar {
  width: fit-content;
  max-width: 100%;
  border-radius: 11px;
  overflow-x: auto;
}

.expiry-filter-bar button {
  padding-inline: 17px;
  white-space: nowrap;
}

.account-bulk-bar {
  padding: 13px 14px;
  border: 1px solid rgba(147, 197, 253, 0.76);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(236, 254, 255, 0.9));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.09);
}

.account-bulk-bar strong {
  color: #1e3a8a;
}

.license-panel {
  border: 1px solid rgba(216, 227, 239, 0.9);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 35, 64, 0.075);
  overflow: hidden;
}

.license-table thead th {
  height: 52px;
  padding-block: 13px;
  color: #53657b;
  background: linear-gradient(180deg, #f9fbfd, #f2f6fa);
  font-size: 11px;
  letter-spacing: 0.035em;
}

.license-table td {
  padding-block: 17px;
}

.license-table tbody tr {
  position: relative;
}

.license-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.9), rgba(248, 252, 255, 0.7));
}

.license-client strong {
  color: #12233d;
  font-size: 13px;
}

.license-client small {
  color: #7a8ba0;
}

.license-status strong {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eafaf3;
}

.license-status.locked strong,
.license-status.expired strong {
  background: #fff0f3;
}

.license-actions button {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.table-pagination {
  min-height: 62px;
  padding: 12px 18px;
  border-top: 1px solid #e7eef6;
  background: #fbfdff;
}

.table-pagination button {
  min-width: 35px;
  min-height: 35px;
  border-radius: 9px;
}

.strategy-metric-grid,
.risk-alert-metrics {
  gap: 14px;
}

.strategy-metric-grid article,
.risk-alert-metrics article {
  position: relative;
  min-height: 116px;
  padding: 21px 22px;
  border-width: 1px;
  border-left-width: 4px;
  border-radius: 14px;
  overflow: hidden;
}

.strategy-metric-grid article::after,
.risk-alert-metrics article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -37px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.035;
}

.strategy-metric-grid article.active,
.risk-alert-metrics article.active {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.13);
}

.strategy-metric-grid span,
.risk-alert-metrics span {
  font-size: 13px;
  font-weight: 750;
}

.strategy-metric-grid strong,
.risk-alert-metrics strong {
  margin-top: 9px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.strategy-panel,
.risk-alert-panel,
.risk-action-panel,
.content-grid .panel {
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 35, 64, 0.07);
}

.strategy-panel-head,
.risk-alert-toolbar,
.panel-head {
  padding: 19px 22px;
  border-bottom: 1px solid #e6edf5;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 254, 0.96));
}

.strategy-panel-head h3,
.risk-alert-toolbar h3,
.panel-head h3 {
  color: #14243c;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.strategy-panel-head p,
.risk-alert-toolbar p,
.panel-head p {
  margin-top: 5px;
  color: #748499;
}

.strategy-list {
  gap: 10px;
  padding: 16px;
}

.strategy-card {
  position: relative;
  min-height: 78px;
  padding: 15px 16px;
  border: 1px solid #dce6f1;
  border-radius: 12px;
  background: #fbfdff;
  overflow: hidden;
}

.strategy-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #c4d2e2;
}

.strategy-card:hover,
.strategy-card.active {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.strategy-card.active::before {
  background: linear-gradient(180deg, #2563eb, #0ea5b7);
}

.strategy-primary {
  min-height: 42px;
  padding-inline: 16px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5b7);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
  font-weight: 900;
}

.strategy-param-grid {
  gap: 14px;
  padding: 20px 22px;
}

.strategy-param-grid label,
.risk-grid label,
.mapping-list label {
  gap: 7px;
}

.strategy-param-grid label > span,
.risk-grid label > span,
.mapping-list label > span {
  color: #52647a;
  font-size: 12px;
  font-weight: 850;
}

.strategy-param-grid input,
.strategy-param-grid select,
.risk-grid input,
.mapping-list input {
  border-radius: 10px;
  background: #fbfdff;
}

.strategy-switches,
.switch-grid {
  gap: 10px;
}

.strategy-switches {
  padding: 0 22px 22px;
}

.switchline {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #e1e9f2;
  border-radius: 11px;
  background: #f9fbfd;
}

.switchline:hover {
  border-color: #bfdbfe;
  background: #f4f9ff;
}

.table-wrap {
  border: 1px solid #e1e9f2;
  border-radius: 12px;
  overflow: auto;
}

.strategy-bind-table th {
  height: 49px;
  background: #f4f7fb;
}

.strategy-bind-table td {
  padding-block: 14px;
}

.copy-matrix,
.mapping-list {
  padding: 18px 20px 22px;
}

.risk-alert-list {
  padding: 8px 14px 14px;
}

.risk-alert-row {
  position: relative;
  margin-top: 8px;
  padding: 15px 16px 15px 19px;
  border: 1px solid #e2eaf3;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.risk-alert-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #94a3b8;
}

.risk-alert-row.danger::before { background: #e5485d; }
.risk-alert-row.warning::before { background: #e6a11a; }
.risk-alert-row.offline::before { background: #64748b; }
.risk-alert-row.expiry::before { background: #0ea5b7; }

.risk-alert-row:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 9px 22px rgba(15, 35, 64, 0.07);
}

.risk-auto-box {
  margin: 18px 22px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f9ff, #f3fbfb);
}

.emergency {
  border-color: rgba(254, 202, 202, 0.92) !important;
  background: linear-gradient(180deg, #fffdfd, #fff6f7) !important;
}

.emergency .panel-head {
  background: linear-gradient(180deg, #fffafa, #fff4f5);
}

.emergency > button {
  min-height: 48px;
  margin-inline: 18px;
  width: calc(100% - 36px);
  border-radius: 11px;
}

.emergency > button:last-child {
  margin-bottom: 18px;
}

.modal {
  padding: 28px;
  background: rgba(5, 18, 39, 0.62);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(940px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow: 0 32px 90px rgba(2, 12, 28, 0.36);
}

.modal-head {
  min-height: 88px;
  padding: 21px 24px;
  background: linear-gradient(135deg, #fbfdff, #f2f8ff);
}

.modal-head h3 {
  color: #10233e;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.modal-head p {
  margin-top: 6px;
  color: #6c7d92;
}

.modal-head .icon-button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #64748b;
}

.modal-card .form-grid {
  gap: 15px;
  padding: 22px 24px 26px;
  background: #ffffff;
}

.modal-card .form-grid label {
  gap: 7px;
}

.modal-card .form-grid label > span {
  color: #465970;
  font-size: 12px;
  font-weight: 850;
}

.modal-card .form-grid input,
.modal-card .form-grid select {
  min-height: 46px;
  border-radius: 10px;
  background: #f9fbfd;
}

.modal-card .form-grid input:focus,
.modal-card .form-grid select:focus {
  background: #ffffff;
}

.modal-actions {
  min-height: 74px;
  padding: 14px 24px;
  border-top: 1px solid #e4ebf3;
  background: #f8fafc;
}

.modal-actions button {
  min-height: 42px;
  border-radius: 10px;
  padding-inline: 17px;
  font-weight: 850;
}

.toast {
  border: 1px solid rgba(147, 197, 253, 0.7);
  border-radius: 12px;
  background: rgba(15, 35, 64, 0.94);
  box-shadow: 0 18px 48px rgba(2, 12, 28, 0.3);
  backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
  .crm-header {
    min-height: 84px;
    padding: 18px 20px 18px 24px;
  }

  .license-toolbar {
    padding: 10px;
  }

  .license-toolbar .license-search {
    width: 100%;
  }

  .license-panel,
  .strategy-panel,
  .risk-alert-panel,
  .risk-action-panel,
  .content-grid .panel {
    border-radius: 14px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    border-radius: 16px;
  }
}

@media (max-width: 620px) {
  .crm-header h2 {
    font-size: 20px;
  }

  .license-toolbar .ghost-filter {
    flex: 1 1 calc(50% - 6px);
  }

  .expiry-filter-bar {
    width: 100%;
  }

  .expiry-filter-bar button {
    flex: 1 0 auto;
  }

  .strategy-metric-grid article,
  .risk-alert-metrics article {
    min-height: 98px;
    padding: 17px;
  }

  .strategy-metric-grid strong,
  .risk-alert-metrics strong {
    font-size: 25px;
  }

  .strategy-panel-head,
  .risk-alert-toolbar,
  .panel-head {
    padding: 16px;
  }

  .strategy-param-grid {
    padding: 17px;
  }

  .strategy-switches {
    padding: 0 17px 17px;
  }

  .risk-alert-row {
    padding: 14px 13px 14px 16px;
  }

  .risk-auto-box {
    margin: 14px;
  }

  .modal-head {
    min-height: 76px;
    padding: 17px;
  }

  .modal-card .form-grid {
    padding: 17px;
  }

  .modal-actions {
    padding: 12px 17px;
  }
}

.api-key-reveal-card {
  width: min(620px, calc(100vw - 32px));
  border: 1px solid rgba(79, 209, 197, 0.3);
  background:
    radial-gradient(circle at 90% 0%, rgba(79, 209, 197, 0.12), transparent 38%),
    var(--surface-strong, #101827);
}

.api-key-reveal-card .modal-head small {
  color: #4fd1c5;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.api-key-secret-box {
  margin: 22px 0 14px;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid rgba(79, 209, 197, 0.3);
  border-radius: 14px;
  background: rgba(4, 11, 20, 0.75);
}

.api-key-secret-box code {
  display: block;
  color: #a7f3d0;
  font-size: clamp(13px, 2.4vw, 16px);
  line-height: 1.7;
  letter-spacing: 0.045em;
  white-space: nowrap;
  user-select: all;
}

.api-key-security-note {
  padding: 12px 14px;
  border-radius: 12px;
  color: #b8c4d6;
  background: rgba(79, 209, 197, 0.08);
  font-size: 13px;
  line-height: 1.65;
}

/* 2026 midnight fintech direction: unmistakable visual identity */
:root {
  --navy-950: #061321;
  --navy-900: #0a1d31;
  --navy-850: #0d2941;
  --electric-blue: #3b82f6;
  --aqua: #22d3ee;
}

.sidebar {
  color: #d8e8f6;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.1), transparent 28%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 48%, #071827 100%);
  border-right-color: rgba(125, 211, 252, 0.1);
  box-shadow: 14px 0 38px rgba(2, 12, 28, 0.16);
}

.sidebar-head {
  min-height: 90px;
  border-bottom-color: rgba(148, 210, 233, 0.11);
}

.sidebar-head strong {
  color: #f2f9ff;
  font-size: 17px;
  letter-spacing: 0.015em;
}

.sidebar-logo {
  border-color: rgba(125, 211, 252, 0.32);
  background: linear-gradient(135deg, #2563eb 0%, #0ea5b7 100%);
  box-shadow: 0 12px 26px rgba(14, 165, 183, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.nav-list {
  padding: 18px 12px;
}

.nav-item {
  color: #91a9bd;
  border-color: transparent;
  background: transparent;
}

.nav-item .nav-icon {
  color: transparent;
  border-color: rgba(148, 210, 233, 0.13);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nav-item .nav-icon::before {
  background: #83a4bd;
}

.nav-item:hover {
  color: #ecf8ff;
  border-color: rgba(125, 211, 252, 0.12);
  background: rgba(125, 211, 252, 0.07);
  transform: translateX(3px);
}

.nav-item:hover .nav-icon {
  border-color: rgba(103, 232, 249, 0.25);
  background: rgba(34, 211, 238, 0.09);
}

.nav-item:hover .nav-icon::before {
  background: #67e8f9;
}

.nav-item.active {
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.24);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.78), rgba(14, 165, 183, 0.68));
  box-shadow: 0 14px 28px rgba(2, 12, 28, 0.3), inset 3px 0 0 #67e8f9;
}

.nav-item.active .nav-icon {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.nav-item.active .nav-icon::before {
  background: #ffffff;
}

.logout-nav {
  margin-top: 8px;
  color: #e79ba6;
  border-top-color: rgba(248, 113, 113, 0.08);
}

.logout-nav .nav-icon {
  border-color: rgba(248, 113, 113, 0.13);
  background: rgba(248, 113, 113, 0.055);
}

.logout-nav .nav-icon::before {
  background: #e79ba6;
}

.logout-nav:hover {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.18);
  background: rgba(244, 63, 94, 0.08);
}

.main,
.dashboard-shell .main,
.account-detail-shell .main {
  background:
    radial-gradient(circle at 84% 4%, rgba(59, 130, 246, 0.065), transparent 22%),
    linear-gradient(180deg, #f6f9fc 0%, #edf3f8 52%, #eaf0f6 100%);
}

.fund-dashboard {
  gap: 18px;
}

.fund-header {
  position: relative;
  min-height: 122px;
  padding: 24px 28px;
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 20%, rgba(34, 211, 238, 0.16), transparent 26%),
    radial-gradient(circle at 94% 100%, rgba(59, 130, 246, 0.24), transparent 34%),
    linear-gradient(125deg, #071827 0%, #0b2b45 56%, #0d4860 100%);
  box-shadow: 0 22px 52px rgba(8, 31, 51, 0.2);
  overflow: hidden;
}

.fund-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #60a5fa, #22d3ee);
}

.fund-header::after {
  content: "";
  position: absolute;
  right: 170px;
  top: -95px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(125, 211, 252, 0.075);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(125, 211, 252, 0.02), 0 0 0 96px rgba(125, 211, 252, 0.014);
  pointer-events: none;
}

.dashboard-kicker {
  display: block;
  margin-bottom: 7px;
  color: #67e8f9;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.19em;
}

.fund-header h3 {
  margin: 0 0 7px;
  color: #ffffff;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.fund-header p {
  color: #9db6ca;
}

.dashboard-live {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 12px;
  color: #c9f7f0;
  border: 1px solid rgba(94, 234, 212, 0.19);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.1), 0 0 14px rgba(94, 234, 212, 0.6);
}

.fund-user {
  position: relative;
  z-index: 1;
  padding-left: 20px;
  border-left: 1px solid rgba(148, 210, 233, 0.16);
}

.fund-user strong {
  color: #ffffff;
}

.fund-user span {
  color: #8fa8bd;
}

.fund-user b {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #2563eb, #0ea5b7);
  box-shadow: 0 10px 24px rgba(2, 12, 28, 0.3);
}

.fund-card-grid {
  gap: 14px;
}

.fund-card {
  min-height: 126px;
  padding: 22px 21px;
  border: 1px solid rgba(216, 227, 239, 0.92);
  border-left-width: 4px;
  border-radius: 16px;
  box-shadow: 0 15px 36px rgba(15, 35, 64, 0.075);
}

.fund-card.blue {
  background: linear-gradient(145deg, #ffffff 0%, #f1f6ff 100%);
}

.fund-card.green {
  background: linear-gradient(145deg, #ffffff 0%, #effaf6 100%);
}

.fund-card.red {
  background: linear-gradient(145deg, #ffffff 0%, #fff3f5 100%);
}

.fund-card span {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 850;
}

.fund-card strong {
  font-size: clamp(22px, 2vw, 28px);
}

.fund-card i {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.fund-card.blue i { background: #e8f0ff; color: #3b82f6; }
.fund-card.green i { background: #e6f8f1; color: #10a877; }
.fund-card.red i { background: #ffeaee; color: #e5485d; }

.fund-layout {
  gap: 16px;
}

.fund-panel {
  border: 1px solid rgba(216, 227, 239, 0.92);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 35, 64, 0.08);
  overflow: hidden;
}

.fund-panel-head,
.warning-head {
  min-height: 64px;
  padding: 17px 20px;
  border-bottom: 1px solid #e5edf5;
  background: linear-gradient(180deg, #ffffff, #fafcff);
}

.trend-title h3,
.warning-head h3 {
  color: #14243b;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.warning-panel {
  background: linear-gradient(180deg, #ffffff, #fffdfd);
}

.warning-head {
  border-top: 3px solid #ef7180;
}

.warning-row:not(.warning-row-head) {
  border-radius: 9px;
  transition: background 0.16s ease, transform 0.16s ease;
}

.warning-row:not(.warning-row-head):hover {
  background: #fff6f7;
  transform: translateX(2px);
}

.topbar {
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 35, 64, 0.065);
}

@media (max-width: 900px) {
  .sidebar {
    background:
      radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.1), transparent 28%),
      linear-gradient(180deg, var(--navy-950), var(--navy-900));
  }

  .fund-header {
    min-height: 0;
    padding: 20px;
  }

  .dashboard-live {
    margin-left: 0;
  }

  .fund-user {
    padding-left: 14px;
  }
}

@media (max-width: 620px) {
  .fund-header {
    align-items: flex-start;
    gap: 15px;
  }

  .fund-header h3 {
    font-size: 21px;
  }

  .dashboard-live {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .fund-user {
    margin-left: auto;
  }

  .fund-card {
    min-height: 112px;
    padding: 18px;
  }
}

/* 2026 operations suite: client detail, finance, notifications and settings */
.account-detail-page {
  display: grid;
  gap: 16px;
}

.account-detail-top {
  min-height: 46px;
  padding: 0 4px;
}

.back-list-button {
  min-height: 40px;
  padding: 0 14px;
  color: #2457b8;
  border: 1px solid #cbdcf0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(15, 35, 64, 0.06);
  font-weight: 850;
}

.back-list-button:hover {
  border-color: #93c5fd;
  background: #f2f7ff;
}

.ea-online-badge {
  padding: 8px 12px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  color: #087a55;
  background: #e9fbf3;
  box-shadow: 0 7px 18px rgba(16, 168, 119, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.account-detail-title {
  position: relative;
  min-height: 106px;
  padding: 25px 28px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 84% 30%, rgba(34, 211, 238, 0.17), transparent 26%),
    linear-gradient(125deg, #071827, #0d3450 62%, #0d4b61);
  box-shadow: 0 20px 48px rgba(8, 31, 51, 0.18);
  overflow: hidden;
}

.account-detail-title::before {
  content: "CLIENT WORKSPACE";
  position: absolute;
  left: 28px;
  top: 18px;
  color: #67e8f9;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.account-detail-title h1 {
  margin-top: 15px;
  color: #ffffff;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.account-detail-title > span {
  position: relative;
  z-index: 1;
  padding: 7px 11px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 999px;
  color: #c8e9f7;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.detail-metrics {
  gap: 13px;
}

.detail-metric {
  position: relative;
  min-height: 122px;
  padding: 20px;
  border-radius: 15px;
  overflow: hidden;
}

.detail-metric::after {
  content: "";
  position: absolute;
  right: -27px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.032;
}

.detail-metric span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.detail-metric strong {
  margin-top: 11px;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.detail-metric i {
  width: 45px;
  height: 45px;
  border-radius: 13px;
}

.detail-panel-grid {
  gap: 16px;
}

.detail-panel {
  border: 1px solid rgba(216, 227, 239, 0.92);
  border-radius: 17px;
  box-shadow: 0 17px 42px rgba(15, 35, 64, 0.075);
  overflow: hidden;
}

.detail-panel > h3 {
  min-height: 62px;
  margin: 0;
  padding: 20px 22px;
  border-bottom: 1px solid #e4ecf4;
  color: #152840;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  font-size: 15px;
}

.detail-info-grid {
  gap: 11px;
  padding: 18px;
}

.detail-info-card,
.detail-info-grid .detail-api-key {
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid #e0e8f1;
  border-radius: 11px;
  background: #f9fbfd;
}

.detail-info-card.primary {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
}

.detail-api-key {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
}

#copyApiKeyButton {
  border-radius: 8px;
}

.ea-diagnostic-block,
.device-block,
.ea-test-block,
.position-detail-block,
.command-history {
  margin: 0 18px 18px;
  border: 1px solid #e0e8f1;
  border-radius: 13px;
  background: #fbfdff;
}

.ea-test-grid {
  border-radius: 10px;
  background: #f4f8fc;
}

.position-table-wrap {
  border-radius: 10px;
  border-color: #e1e9f2;
}

.danger-zone {
  position: relative;
  margin: 0 18px 18px;
  padding: 18px;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  background:
    radial-gradient(circle at 95% 0%, rgba(244, 63, 94, 0.08), transparent 28%),
    linear-gradient(180deg, #fffafb, #fff5f6);
}

.danger-zone > strong {
  color: #9f1239;
  font-size: 13px;
}

.danger-actions {
  gap: 8px;
  margin-top: 13px;
}

.danger-actions button {
  min-height: 39px;
  border-radius: 9px;
  font-weight: 850;
}

.finance-header {
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.13);
  background:
    radial-gradient(circle at 75% 20%, rgba(45, 212, 191, 0.16), transparent 27%),
    linear-gradient(125deg, #071827, #0b3548 60%, #0f554f);
  box-shadow: 0 20px 48px rgba(8, 31, 51, 0.17);
}

.finance-header::before {
  background: linear-gradient(180deg, #34d399, #22d3ee);
}

.finance-header h2,
.finance-header p {
  color: #ffffff;
}

.finance-header p {
  color: #9fc4c6;
}

.finance-header .period-tabs {
  border-color: rgba(167, 243, 208, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.finance-header .period-tabs button {
  color: #a8c6c8;
}

.finance-header .period-tabs button.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #10a877, #0ea5b7);
  box-shadow: 0 9px 22px rgba(2, 12, 28, 0.24);
}

.finance-header .excel-button {
  color: #d9fff5;
  border-color: rgba(94, 234, 212, 0.24);
  background: rgba(16, 185, 129, 0.13);
}

.crm-metric-grid {
  gap: 14px;
}

.crm-metric {
  position: relative;
  min-height: 124px;
  padding: 21px;
  border-radius: 15px;
  overflow: hidden;
}

.crm-metric::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -50px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.035;
}

.crm-metric span {
  font-size: 12px;
  font-weight: 850;
}

.crm-metric strong {
  margin-top: 11px;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.04em;
}

.crm-chart-grid,
.finance-extra-grid {
  gap: 16px;
}

.crm-chart-card,
.crm-table-panel {
  border: 1px solid rgba(216, 227, 239, 0.92);
  border-radius: 16px;
  box-shadow: 0 17px 42px rgba(15, 35, 64, 0.075);
  overflow: hidden;
}

.crm-chart-card h3,
.crm-table-head {
  min-height: 62px;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #e5edf5;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.crm-chart-card h3,
.crm-table-head h3 {
  color: #15273f;
  font-size: 15px;
  font-weight: 900;
}

.crm-chart {
  padding: 10px 14px 16px;
}

.fee-summary-grid {
  gap: 9px;
  padding: 15px;
}

.fee-summary-grid article {
  border-radius: 11px;
  background: #f7fafc;
}

.crm-audit-table th {
  height: 49px;
  color: #5e7085;
  background: #f3f7fa;
}

.crm-audit-table td {
  padding-block: 14px;
}

.notification-metric-grid {
  gap: 14px;
}

.notification-metric-grid article {
  position: relative;
  min-height: 112px;
  padding: 20px;
  border-radius: 15px;
  overflow: hidden;
}

.notification-metric-grid article::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -41px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.035;
}

.notification-metric-grid span {
  font-weight: 850;
}

.notification-metric-grid strong {
  margin-top: 9px;
  font-size: 29px;
}

.notification-config-panel,
.notification-panel {
  border: 1px solid rgba(216, 227, 239, 0.92);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 17px 42px rgba(15, 35, 64, 0.075);
  overflow: hidden;
}

.notification-toolbar {
  min-height: 70px;
  padding: 18px 21px;
  border-bottom: 1px solid #e5edf5;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.notification-toolbar h3 {
  color: #15273f;
  font-size: 16px;
}

.notification-config-grid {
  gap: 10px;
  padding: 18px 20px 8px;
}

.notification-channel-grid {
  gap: 13px;
  padding: 12px 20px 20px;
}

.notification-channel-grid label {
  gap: 7px;
}

.notification-channel-grid label > span {
  color: #53667c;
  font-size: 12px;
  font-weight: 850;
}

.notification-channel-grid input {
  border-radius: 10px;
  background: #f9fbfd;
}

.notification-list {
  display: grid;
  gap: 9px;
  padding: 13px;
}

.notification-row {
  position: relative;
  padding: 15px 16px 15px 19px;
  border: 1px solid #e1e9f2;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.notification-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #94a3b8;
}

.notification-row.danger::before { background: #e5485d; }
.notification-row.warning::before { background: #e6a11a; }
.notification-row.success::before { background: #10a877; }

.notification-row.unread {
  border-color: #bfdbfe;
  background: linear-gradient(90deg, #f1f7ff, #ffffff);
}

.settings-layout > .panel {
  border: 1px solid rgba(216, 227, 239, 0.92);
  border-radius: 16px;
  box-shadow: 0 17px 42px rgba(15, 35, 64, 0.075);
  overflow: hidden;
}

.settings-layout .permission-list {
  gap: 9px;
  padding: 17px 18px 8px;
}

.settings-layout .password-box {
  margin: 10px 18px 18px;
  padding: 16px;
  border: 1px solid #dce6f1;
  border-radius: 13px;
  background: linear-gradient(135deg, #f7faff, #f5fbfb);
}

.settings-layout .password-box label {
  gap: 7px;
}

.settings-layout .password-box label > span {
  color: #53667c;
  font-size: 12px;
  font-weight: 850;
}

.security-summary {
  margin: 18px;
  padding: 21px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 14px;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.15), transparent 28%),
    linear-gradient(125deg, #071827, #0d3c53);
  box-shadow: 0 14px 32px rgba(8, 31, 51, 0.15);
}

.security-summary strong {
  color: #ffffff;
  font-size: 24px;
}

.security-summary span {
  color: #9eb7c9;
}

.security-check-list,
.backup-list {
  gap: 9px;
  padding: 0 18px 18px;
}

.security-check-item,
.backup-row {
  min-height: 59px;
  padding: 13px 14px;
  border: 1px solid #e0e8f1;
  border-radius: 11px;
  background: #f9fbfd;
}

.security-check-item.ok {
  border-color: #bcebd8;
  background: #f2fbf7;
}

.security-check-item.warn {
  border-color: #fde1a4;
  background: #fffbf0;
}

.backup-panel > .form-hint {
  margin: 0 18px 18px;
  padding: 12px 14px;
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  background: #f7fafc;
}

.logs-page > h1 {
  margin: 0;
  padding: 22px 25px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(125deg, #071827, #0d3c53);
  box-shadow: 0 17px 42px rgba(8, 31, 51, 0.15);
  font-size: 21px;
}

.system-log-panel {
  border-radius: 16px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .account-detail-title {
    min-height: 92px;
    padding: 22px;
  }

  .account-detail-title::before {
    left: 22px;
    top: 16px;
  }

  .finance-header .period-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .crm-chart-card,
  .crm-table-panel,
  .notification-config-panel,
  .notification-panel,
  .settings-layout > .panel {
    border-radius: 14px;
  }
}

@media (max-width: 620px) {
  .account-detail-title {
    align-items: flex-end;
  }

  .account-detail-title h1 {
    font-size: 21px;
  }

  .detail-metric,
  .crm-metric,
  .notification-metric-grid article {
    min-height: 104px;
    padding: 17px;
  }

  .detail-panel > h3,
  .crm-chart-card h3,
  .crm-table-head,
  .notification-toolbar {
    padding: 16px;
  }

  .detail-info-grid {
    padding: 14px;
  }

  .ea-diagnostic-block,
  .device-block,
  .ea-test-block,
  .position-detail-block,
  .command-history,
  .danger-zone {
    margin: 0 14px 14px;
  }

  .notification-config-grid,
  .notification-channel-grid {
    padding-inline: 15px;
  }

  .security-summary {
    margin: 14px;
  }

  .security-check-list,
  .backup-list {
    padding: 0 14px 14px;
  }
}

/* Production safety and EA system diagnostics */
.settings-layout {
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
  grid-template-rows: auto auto;
  align-items: start;
}

.settings-layout > .panel:first-child {
  grid-column: 1;
  grid-row: 1;
}

.settings-layout .backup-panel {
  grid-column: 1;
  grid-row: 2;
}

.settings-layout .security-panel {
  grid-column: 2;
  grid-row: 1;
}

.settings-layout .diagnostics-panel {
  grid-column: 2;
  grid-row: 2;
}

.diagnostics-panel {
  min-width: 0;
}

.diagnostics-overview {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 13px;
  padding: 17px 18px 14px;
}

.diagnostics-score {
  display: grid;
  place-content: center;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(94, 234, 212, 0.16);
  border-radius: 14px;
  text-align: center;
  background:
    radial-gradient(circle at 70% 10%, rgba(34, 211, 238, 0.15), transparent 32%),
    linear-gradient(145deg, #071827, #0d3d50);
  box-shadow: 0 14px 32px rgba(8, 31, 51, 0.15);
}

.diagnostics-score strong,
.diagnostics-score span {
  display: block;
}

.diagnostics-score strong {
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.diagnostics-score strong::after {
  content: " / 100";
  color: #6f8da2;
  font-size: 9px;
  letter-spacing: 0;
}

.diagnostics-score span {
  margin-top: 10px;
  color: #7cf0dd;
  font-size: 11px;
  font-weight: 900;
}

.diagnostics-score.warn {
  border-color: rgba(251, 191, 36, 0.2);
  background: linear-gradient(145deg, #241b0b, #59400e);
}

.diagnostics-score.warn span {
  color: #fde68a;
}

.diagnostics-score.danger {
  border-color: rgba(251, 113, 133, 0.22);
  background: linear-gradient(145deg, #281019, #5d1828);
}

.diagnostics-score.danger span {
  color: #fda4af;
}

.diagnostics-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.diagnostics-metrics > div {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid #e0e8f1;
  border-radius: 11px;
  background: #f8fbfd;
}

.diagnostics-metrics span,
.diagnostics-metrics strong {
  display: block;
}

.diagnostics-metrics span {
  color: #728398;
  font-size: 10px;
  font-weight: 850;
}

.diagnostics-metrics strong {
  margin-top: 5px;
  color: #14263e;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.system-diagnostic-list {
  display: grid;
  gap: 8px;
  padding: 0 18px 14px;
}

.system-diagnostic-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 13px 11px 16px;
  border: 1px solid #e0e8f1;
  border-radius: 11px;
  background: #fbfdff;
  overflow: hidden;
}

.system-diagnostic-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #10a877;
}

.system-diagnostic-item.warn::before { background: #e6a11a; }
.system-diagnostic-item.danger::before { background: #e5485d; }

.system-diagnostic-item > em {
  padding: 5px 7px;
  border-radius: 999px;
  color: #087a55;
  background: #e7f9f1;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.system-diagnostic-item.warn > em {
  color: #9a5b00;
  background: #fff4d6;
}

.system-diagnostic-item.danger > em {
  color: #be123c;
  background: #ffedf1;
}

.system-diagnostic-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.system-diagnostic-item > div strong {
  color: #13263e;
  font-size: 12px;
}

.system-diagnostic-item > div span {
  color: #728398;
  font-size: 11px;
  line-height: 1.45;
}

.system-diagnostic-item > b {
  max-width: 170px;
  color: #36516b;
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

.diagnostics-updated {
  margin: 0 18px 17px;
  padding-top: 11px;
  border-top: 1px solid #e7eef5;
  color: #8291a3;
  font-size: 10px;
  text-align: right;
}

.security-check-item.danger {
  border-color: #fecdd3;
  background: #fff5f7;
}

.security-check-item.danger em {
  color: #be123c;
  background: #ffe4e9;
}

@media (max-width: 1000px) {
  .settings-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .settings-layout > .panel:first-child,
  .settings-layout .backup-panel,
  .settings-layout .security-panel,
  .settings-layout .diagnostics-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .diagnostics-overview {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .diagnostics-score {
    min-height: 100px;
  }

  .system-diagnostic-list {
    padding: 0 14px 12px;
  }

  .system-diagnostic-item {
    grid-template-columns: 45px minmax(0, 1fr);
  }

  .system-diagnostic-item > b {
    grid-column: 2;
    max-width: none;
    text-align: left;
  }

  .diagnostics-updated {
    margin-inline: 14px;
  }
}

/* Real-money command safety confirmation */
.safety-confirm-modal {
  z-index: 1200;
  background: rgba(3, 11, 25, 0.74);
  backdrop-filter: blur(14px);
}

.safety-confirm-card {
  width: min(620px, 100%);
  border: 1px solid rgba(254, 202, 202, 0.7);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 38px 110px rgba(2, 8, 23, 0.48);
  overflow: hidden;
}

.safety-confirm-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid #f7cfd6;
  background:
    radial-gradient(circle at 90% 10%, rgba(244, 63, 94, 0.08), transparent 28%),
    linear-gradient(135deg, #fff8f9, #fff1f3);
}

.safety-alert-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid #fda4af;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #fb7185);
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.24);
  font-size: 25px;
  font-weight: 950;
}

.safety-confirm-head small {
  display: block;
  margin-bottom: 5px;
  color: #e11d48;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.safety-confirm-head h3 {
  margin: 0;
  color: #4c0d1e;
  font-size: 20px;
}

.safety-confirm-head p {
  margin: 5px 0 0;
  color: #8e4456;
  font-size: 12px;
  line-height: 1.5;
}

.safety-impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 20px 22px 12px;
}

.safety-impact-grid > div {
  min-height: 69px;
  padding: 12px 13px;
  border: 1px solid #e3eaf2;
  border-radius: 11px;
  background: #f9fbfd;
}

.safety-impact-grid span,
.safety-impact-grid strong {
  display: block;
}

.safety-impact-grid span {
  color: #7c8b9d;
  font-size: 10px;
  font-weight: 850;
}

.safety-impact-grid strong {
  margin-top: 7px;
  color: #23364d;
  font-size: 12px;
  line-height: 1.4;
}

.safety-backup-notice {
  margin: 0 22px 13px;
  padding: 10px 13px;
  border: 1px solid #bae6d4;
  border-radius: 10px;
  color: #087a55;
  background: #effbf6;
  font-size: 11px;
  font-weight: 850;
}

.safety-backup-notice::before {
  content: "✓";
  margin-right: 8px;
}

.safety-confirm-input {
  display: grid;
  gap: 8px;
  padding: 0 22px 20px;
}

.safety-confirm-input > span {
  color: #5d3340;
  font-size: 12px;
  font-weight: 900;
}

.safety-confirm-input input {
  min-height: 50px;
  border: 1px solid #f3b8c2;
  border-radius: 11px;
  color: #4c0d1e;
  background: #fffafb;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.safety-confirm-input input:focus {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.11);
}

.safety-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 22px;
  border-top: 1px solid #e7edf4;
  background: #f8fafc;
}

.safety-confirm-actions button {
  min-height: 43px;
  min-width: 116px;
  border-radius: 10px;
  font-weight: 900;
}

.safety-confirm-actions .danger:not(:disabled) {
  color: #ffffff;
  border-color: #e11d48;
  background: linear-gradient(135deg, #be123c, #e11d48);
  box-shadow: 0 10px 24px rgba(190, 18, 60, 0.22);
}

.command-status.expired,
.command-status.cancelled {
  color: #be123c;
  background: #ffedf1;
}

@media (max-width: 620px) {
  .safety-confirm-head {
    padding: 19px;
  }

  .safety-impact-grid {
    grid-template-columns: 1fr;
    padding: 16px 17px 10px;
  }

  .safety-impact-grid > div {
    min-height: 60px;
  }

  .safety-backup-notice {
    margin-inline: 17px;
  }

  .safety-confirm-input {
    padding: 0 17px 17px;
  }

  .safety-confirm-actions {
    padding: 13px 17px;
  }

  .safety-confirm-actions button {
    flex: 1;
    min-width: 0;
  }
}
