:root {
  --bg: #eef3f0;
  --surface: #fbfcfb;
  --surface-soft: #f2f6f4;
  --surface-ink: #101716;
  --ink: #16211f;
  --muted: #65736f;
  --faint: #e8eee9;
  --line: #d1ddd6;
  --line-strong: #aebfb6;
  --green: #007f66;
  --green-2: #22a37f;
  --green-soft: #e2f4ed;
  --red: #ac5661;
  --red-2: #d36b72;
  --red-soft: #faecee;
  --amber: #a56d36;
  --amber-soft: #f8efe2;
  --blue: #3f6f9d;
  --blue-soft: #e7eef7;
  --shadow: 0 18px 46px rgba(16, 23, 22, 0.09);
  --shadow-soft: 0 8px 24px rgba(16, 23, 22, 0.07);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(238, 243, 240, 0.94), rgba(247, 249, 246, 0.98) 48%, rgba(235, 241, 244, 0.92)),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Inter", "Noto Sans TC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 560px);
  align-items: center;
  gap: 64px;
  padding: 56px;
  background:
    linear-gradient(115deg, rgba(10, 18, 16, 0.98), rgba(20, 38, 33, 0.95) 58%, rgba(18, 28, 39, 0.94)),
    var(--surface-ink);
  color: #f9fcfb;
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(120deg, transparent 0 58%, rgba(100, 190, 156, 0.08) 58% 59%, transparent 59% 100%);
  background-size: 92px 92px, 92px 92px, 100% 100%;
  opacity: 0.78;
  pointer-events: none;
  animation: loginGridDrift 34s linear infinite;
  will-change: background-position;
}

.login-screen::after {
  content: "";
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 46px;
  height: 1px;
  background: linear-gradient(90deg, rgba(111, 218, 179, 0.48), rgba(63, 111, 157, 0.18), transparent);
  pointer-events: none;
  animation: loginBaselinePulse 4.8s ease-in-out infinite;
}

.login-brand {
  display: grid;
  align-content: center;
  justify-items: start;
  max-width: 760px;
  gap: 22px;
  position: relative;
  z-index: 1;
}

.login-brand::before {
  content: "";
  width: 76px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #66d0aa, #3f6f9d);
  box-shadow: 0 0 28px rgba(102, 208, 170, 0.24);
  animation: loginSignalPulse 3.8s ease-in-out infinite;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(76px, 9vw, 138px);
  line-height: 0.96;
  font-weight: 900;
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  animation: loginTitleIn 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-brand p {
  margin: 0;
  max-width: 760px;
  color: #d8e6df;
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 700;
  line-height: 1.5;
  animation: loginSoftIn 760ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-line span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(141, 226, 193, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.072);
  color: #afe8d4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  animation: loginChipIn 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-line span:nth-child(2) {
  animation-delay: 90ms;
}

.brand-line span:nth-child(3) {
  animation-delay: 180ms;
}

.mark-large {
  width: 66px;
  height: 66px;
  font-size: 34px;
}

.login-card {
  width: 100%;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.072));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 20px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  animation: loginCardIn 780ms 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #66d0aa, rgba(63, 111, 157, 0.72));
  animation: loginTopLine 3.2s ease-in-out infinite;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background:
    linear-gradient(120deg, transparent 0 34%, rgba(255, 255, 255, 0.08) 46%, transparent 58% 100%);
  opacity: 0;
  transform: translateX(-36%);
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 580ms ease;
}

.login-card:hover,
.login-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(141, 226, 193, 0.26);
  box-shadow: 0 34px 86px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(102, 208, 170, 0.08);
}

.login-card:hover::after,
.login-card:focus-within::after {
  opacity: 1;
  transform: translateX(36%);
}

.login-card h2 {
  margin: 5px 0 0;
  font-size: 30px;
  line-height: 1.14;
}

.social-login-card {
  align-content: start;
  gap: 22px;
}

.social-login-actions {
  display: grid;
  gap: 12px;
}

.social-login-btn {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 850;
  letter-spacing: 0;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.social-login-btn::after {
  content: "";
}

.social-login-btn.line {
  border-color: #06c755;
  background: #06c755;
  color: #071c10;
}

.social-login-btn.google {
  border-color: rgba(255, 255, 255, 0.32);
  background: #ffffff;
  color: #202124;
}

.social-login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.social-login-btn:focus-visible {
  outline: 3px solid rgba(131, 211, 176, 0.38);
  outline-offset: 2px;
}

.social-login-btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.3);
}

.social-login-mark {
  justify-self: start;
  min-width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.social-login-btn.line .social-login-mark {
  background: rgba(255, 255, 255, 0.94);
  color: #06a945;
}

.social-login-btn.google .social-login-mark {
  border: 1px solid #d9dde3;
  background: #ffffff;
  color: #4285f4;
}

.account-link-notice {
  border-left: 3px solid #66d0aa;
  background: rgba(102, 208, 170, 0.12);
  color: #e5f5ee;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
}

.field {
  display: grid;
  gap: 7px;
  color: #d7e1dc;
  font-size: 13px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 12px 14px;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.field input::placeholder {
  color: #8f9c96;
}

.field input:focus {
  border-color: #83d3b0;
  box-shadow: 0 0 0 3px rgba(53, 168, 115, 0.2);
  background: rgba(255, 255, 255, 0.13);
}

.form-error {
  min-height: 18px;
  margin: -6px 0 0;
  color: #ffb7b0;
  font-size: 13px;
}

.form-hint {
  margin: -4px 0 0;
  color: #aebbb5;
  font-size: 13px;
  line-height: 1.55;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.primary-btn {
  border: 1px solid #40c19a;
  background: #40c19a;
  color: #06261e;
  position: relative;
  overflow: hidden;
  transition:
    filter 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f9fcfb;
  transition:
    filter 180ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #dce5e1;
  padding: 4px 10px;
  font-size: 12px;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  filter: brightness(1.06);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:hover {
  box-shadow: 0 14px 32px rgba(64, 193, 154, 0.22);
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.26) 45%, transparent 56% 100%);
  transform: translateX(-120%);
  transition: transform 520ms ease;
}

.primary-btn:hover::after,
.login-card.is-authenticating .primary-btn::after {
  transform: translateX(120%);
}

.login-card.is-authenticating .primary-btn {
  filter: brightness(1.04);
  box-shadow: 0 14px 32px rgba(64, 193, 154, 0.2);
}

.login-market {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.login-market > div {
  min-height: 86px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  display: grid;
  align-content: space-between;
}

.login-market span {
  color: #aebbb5;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-market strong {
  font-size: 18px;
}

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background:
    linear-gradient(180deg, #101716, #131d1a 56%, #111827),
    var(--surface-ink);
  color: #f9fcfb;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  padding: 0 2px 8px;
}

.mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e4f5ef;
  color: #00634f;
  font-weight: 900;
  font-size: 23px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 850;
}

.brand p {
  margin: 5px 0 0;
  color: #aebbb5;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  color: #d8e0dc;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar-card {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  display: grid;
  gap: 7px;
}

.sidebar-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-card strong {
  font-size: 14px;
}

.sidebar-auto-status {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.sidebar-auto-status.on {
  background: rgba(64, 193, 154, 0.16);
  color: #9df3d7;
}

.sidebar-auto-status.off {
  background: rgba(255, 107, 107, 0.15);
  color: #ffb3ad;
}

.sidebar-card small,
.sidebar-label {
  color: #aebbb5;
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-label {
  text-transform: uppercase;
  font-weight: 800;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.settings-link {
  width: 100%;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.neutral {
  background: rgba(255, 255, 255, 0.1);
  color: #dce5e1;
}

.badge.good {
  background: var(--green-soft);
  color: var(--green);
}

.badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.bad {
  background: var(--red-soft);
  color: var(--red);
}

.main {
  min-width: 0;
  padding: 30px;
  display: grid;
  gap: 18px;
}

.view-panel {
  animation: viewIn 220ms ease-out;
}

.overview-view {
  display: grid;
  gap: 18px;
  scroll-margin-top: 18px;
}

.account-view {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 14px;
}

.topbar-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(61, 128, 108, 0.2);
  border-radius: 14px;
  background: rgba(235, 247, 241, 0.58);
  color: #2f7766;
  box-shadow: 0 14px 36px rgba(20, 39, 34, 0.12);
  backdrop-filter: blur(14px);
  place-items: center;
  gap: 5px;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.mobile-menu-btn span {
  display: block;
  width: 19px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition:
    opacity 170ms ease,
    transform 190ms ease,
    width 170ms ease;
}

.mobile-nav-close-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(142, 227, 192, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: #bcefd7;
  position: relative;
  place-items: center;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.mobile-nav-close-btn:hover {
  transform: translateY(-1px);
  background: rgba(142, 227, 192, 0.1);
  border-color: rgba(142, 227, 192, 0.4);
}

.mobile-nav-close-btn span {
  position: absolute;
  width: 18px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav-close-btn span:first-child {
  transform: rotate(45deg);
}

.mobile-nav-close-btn span:last-child {
  transform: rotate(-45deg);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  padding: 0;
  background: rgba(9, 17, 16, 0.42);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.eyebrow {
  color: var(--green);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.topbar h2 {
  margin: 5px 0 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 850;
}

.lead,
.section-copy {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.section-copy {
  margin-top: 4px;
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.current-strategy-card {
  width: 100%;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  display: grid;
  gap: 7px;
}

.current-strategy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.current-strategy-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.current-strategy-card strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.15;
}

.current-strategy-card small {
  color: #aebbb5;
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-subscription-card {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(112, 206, 174, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(112, 206, 174, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.055);
  display: grid;
  gap: 8px;
}

.sidebar-subscription-card.is-renewal-watch {
  border-color: rgba(234, 188, 105, 0.36);
  background:
    linear-gradient(135deg, rgba(234, 188, 105, 0.16), rgba(112, 206, 174, 0.09)),
    rgba(255, 255, 255, 0.055);
}

.sidebar-subscription-card.is-renewal-due {
  border-color: rgba(255, 191, 120, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 191, 120, 0.18), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.06);
}

.sidebar-subscription-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-subscription-head span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-account-line {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-account-line span {
  color: #8aa099;
  font-size: 11px;
  font-weight: 900;
}

.sidebar-account-line strong {
  min-width: 0;
  color: #d9ebe4;
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-subscription-label {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.sidebar-subscription-label.trialing,
.sidebar-subscription-label.active {
  background: rgba(64, 193, 154, 0.18);
  color: #aaf6db;
}

.sidebar-subscription-label.seven,
.sidebar-subscription-label.three,
.sidebar-subscription-label.due {
  background: rgba(255, 221, 153, 0.18);
  color: #ffe4a8;
}

.sidebar-subscription-label.expired,
.sidebar-subscription-label.admin_disabled {
  background: rgba(255, 107, 107, 0.16);
  color: #ffb7b2;
}

.sidebar-subscription-time {
  color: #ffffff;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.15;
}

.sidebar-subscription-card small {
  color: #aebbb5;
  font-size: 12px;
  line-height: 1.45;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green-2);
  box-shadow: 0 0 0 0 rgba(53, 168, 115, 0.55);
  animation: livePulse 1.8s infinite;
}

.updated {
  align-self: flex-start;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
}

.icon-btn {
  align-self: flex-start;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  font-size: 18px;
}

.icon-btn:hover {
  border-color: var(--line-strong);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.goal-panel {
  border: 1px solid rgba(151, 217, 194, 0.2);
  border-radius: 8px;
  padding: 34px 34px 32px;
  background:
    linear-gradient(135deg, rgba(12, 30, 25, 0.98) 0%, rgba(17, 47, 39, 0.96) 46%, rgba(17, 28, 39, 0.98) 100%);
  box-shadow: 0 28px 64px rgba(12, 23, 21, 0.18), inset 0 1px 0 rgba(232, 255, 246, 0.14);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.42fr);
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.goal-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(115, 221, 184, 0.95), rgba(219, 188, 108, 0.84), rgba(93, 143, 195, 0.88));
}

.goal-panel::after {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  border-radius: 6px;
  background:
    linear-gradient(rgba(180, 238, 217, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 238, 217, 0.065) 1px, transparent 1px),
    linear-gradient(120deg, transparent 0 54%, rgba(115, 221, 184, 0.1) 54% 55%, transparent 55% 100%);
  background-size: 42px 42px;
  opacity: 0.75;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5) 58%, transparent 88%);
}

.goal-panel .eyebrow {
  color: #9de2c8;
  text-shadow: 0 0 18px rgba(122, 229, 190, 0.22);
}

.goal-story {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.goal-panel h3 {
  margin: 6px 0 2px;
  font-size: 36px;
  line-height: 1.15;
  max-width: 720px;
}

.goal-title-brand {
  display: grid;
  gap: 11px;
  position: relative;
  padding-left: 20px;
}

.goal-title-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 5px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8ef0ca, rgba(224, 190, 111, 0.9), rgba(93, 143, 195, 0.86));
  box-shadow: 0 0 18px rgba(117, 227, 187, 0.36);
}

.goal-title-line {
  display: block;
  letter-spacing: 0;
}

.goal-title-line-soft {
  color: rgba(225, 245, 237, 0.78);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.28;
}

.goal-title-line-soft b {
  color: #8debc7;
  font-weight: 950;
}

.goal-title-line-strong {
  color: #f7fff9;
  font-size: 50px;
  font-weight: 950;
  line-height: 1.04;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.goal-panel p {
  margin: 2px 0 0;
  color: rgba(226, 244, 236, 0.72);
  line-height: 1.55;
  max-width: 680px;
  font-size: 16px;
}

.goal-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.goal-status-pill {
  min-height: 38px;
  width: fit-content;
  border: 1px solid rgba(142, 240, 202, 0.24);
  border-radius: 999px;
  background: rgba(142, 240, 202, 0.12);
  color: #aaf4d5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 900;
}

.goal-status-pill[data-goal-status="unset"] {
  background: rgba(228, 236, 232, 0.08);
  border-color: rgba(228, 236, 232, 0.16);
  color: rgba(232, 244, 238, 0.68);
}

.goal-status-pill[data-goal-status="active"] {
  background: rgba(142, 240, 202, 0.13);
  border-color: rgba(142, 240, 202, 0.28);
  color: #aaf4d5;
}

.goal-status-pill[data-goal-status="done"] {
  background: rgba(142, 240, 202, 0.18);
  border-color: rgba(142, 240, 202, 0.34);
  color: #ccffe7;
}

.goal-status-pill[data-goal-status="waiting"] {
  background: rgba(224, 190, 111, 0.15);
  border-color: rgba(224, 190, 111, 0.34);
  color: #f1d58d;
}

.goal-status-pill[data-goal-status="paused"] {
  background: rgba(221, 119, 130, 0.13);
  border-color: rgba(221, 119, 130, 0.28);
  color: #ffb6bd;
}

.goal-status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #66d0aa;
  box-shadow: 0 0 0 5px rgba(102, 208, 170, 0.14);
}

.goal-status-pill[data-goal-status="unset"] i {
  background: #a7b3ad;
  box-shadow: 0 0 0 5px rgba(167, 179, 173, 0.14);
}

.goal-status-pill[data-goal-status="done"] i {
  background: #2f9075;
  box-shadow: 0 0 0 5px rgba(47, 144, 117, 0.15);
}

.goal-status-pill[data-goal-status="waiting"] i {
  background: #d9a948;
  box-shadow: 0 0 0 5px rgba(217, 169, 72, 0.15);
}

.goal-status-pill[data-goal-status="paused"] i {
  background: #ac5661;
  box-shadow: 0 0 0 5px rgba(172, 86, 97, 0.14);
}

.goal-panel .secondary-action {
  border-color: rgba(232, 255, 246, 0.16);
  background: rgba(232, 255, 246, 0.08);
  color: rgba(241, 252, 247, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.goal-panel .secondary-action:hover {
  border-color: rgba(142, 240, 202, 0.38);
  background: rgba(142, 240, 202, 0.14);
  color: #f7fff9;
}

.goal-orbit {
  align-self: center;
  justify-self: end;
  width: min(100%, 204px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.goal-orbit::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 240, 202, 0.16), transparent 66%);
  filter: blur(10px);
}

.goal-ring {
  --goal-progress: 0deg;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 12px;
  background:
    conic-gradient(#8ef0ca 0 var(--goal-progress), rgba(232, 255, 246, 0.12) var(--goal-progress) 360deg);
  box-shadow: inset 0 0 0 1px rgba(142, 240, 202, 0.2), 0 22px 54px rgba(0, 0, 0, 0.32);
  position: relative;
}

.goal-ring > div {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(12, 28, 24, 0.96), rgba(18, 38, 44, 0.94));
  border: 1px solid rgba(232, 255, 246, 0.08);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
}

.goal-ring span,
.goal-ring small {
  color: rgba(226, 244, 236, 0.68);
  font-size: 12px;
  font-weight: 850;
}

.goal-ring strong {
  font-size: 31px;
  line-height: 1;
  font-weight: 950;
  color: #f7fff9;
}

.goal-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.goal-metrics span {
  min-height: 86px;
  border: 1px solid rgba(232, 255, 246, 0.12);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
  padding: 13px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  backdrop-filter: blur(6px);
}

.goal-metrics small,
.goal-progress-copy span {
  color: rgba(226, 244, 236, 0.62);
  font-size: 12px;
  font-weight: 850;
}

.goal-metrics b {
  color: #f7fff9;
  font-size: 25px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.goal-progress-line {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.goal-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.goal-progress-copy strong {
  color: #e9d294;
  font-size: 14px;
  white-space: nowrap;
}

.goal-progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(232, 255, 246, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.24);
}

.goal-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8ef0ca, #e0be6f, #5d8fc3);
  transition: width 420ms ease;
}

.goal-earnings {
  grid-column: 1 / -1;
  border: 1px solid rgba(232, 255, 246, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  padding: 13px;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(6px);
}

.goal-earnings-head,
.goal-earning-list,
.goal-earning-item {
  display: flex;
  align-items: center;
}

.goal-earnings-head {
  justify-content: space-between;
  gap: 12px;
}

.goal-earnings-head span {
  color: #f7fff9;
  font-size: 14px;
  font-weight: 950;
}

.goal-earnings-head small,
.goal-earning-list > span {
  color: rgba(226, 244, 236, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.goal-earning-list {
  gap: 8px;
  flex-wrap: wrap;
}

.goal-earning-item {
  min-height: 34px;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(142, 240, 202, 0.16);
  border-radius: 999px;
  background: rgba(142, 240, 202, 0.08);
  padding: 6px 11px;
}

.goal-earning-item small {
  color: rgba(226, 244, 236, 0.68);
  font-size: 12px;
  font-weight: 850;
}

.goal-earning-item b {
  color: #8ef0ca;
  font-size: 13px;
  font-weight: 950;
}

.metric-grid,
.performance-grid {
  display: contents;
}

.metric,
.performance-card,
.reference-panel,
.qye-panel,
.panel,
.band,
.chart-card,
.settings-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 251, 0.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 136px;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-rows: 22px 42px minmax(34px, auto);
  align-items: start;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.performance-card {
  grid-column: span 3;
}

.metric {
  grid-column: span 4;
}

.metric {
  min-height: 136px;
}

.performance-card {
  min-height: 136px;
}

.performance-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.performance-primary {
  background:
    linear-gradient(135deg, rgba(226, 244, 237, 0.94), rgba(255, 255, 255, 0.98));
}

.performance-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  align-self: start;
}

.performance-card strong {
  font-size: 27px;
  line-height: 1.1;
  font-weight: 900;
  overflow-wrap: anywhere;
  align-self: center;
}

.performance-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  align-self: end;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--line);
}

.metric-primary::before {
  background: var(--green);
}

.metric-label,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.metric-label {
  line-height: 1.2;
  font-weight: 800;
  align-self: start;
}

.metric strong {
  display: block;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 900;
  overflow-wrap: anywhere;
  align-self: center;
}

.metric-regime strong {
  font-size: 27px;
}

.metric small {
  color: var(--muted);
  align-self: end;
  line-height: 1.35;
}

.account-view .performance-card,
.overview-view .performance-card,
.account-view .metric,
.overview-view .metric {
  min-width: 0;
}

.band,
.reference-panel,
.qye-panel,
.panel,
.chart-card,
.settings-panel {
  border-radius: 8px;
  padding: 16px;
}

.reference-panel {
  display: grid;
  gap: 13px;
}

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

.reference-card {
  min-height: 96px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(242, 246, 244, 0.86), rgba(255, 255, 255, 0.96));
  display: grid;
  align-content: space-between;
  gap: 9px;
}

.reference-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.reference-card strong {
  font-size: 21px;
  line-height: 1.14;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.reference-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.trade-heat-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.heat-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.heat-label.hot {
  background: var(--green-soft);
  color: var(--green);
}

.heat-label.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.qye-panel {
  display: grid;
  gap: 13px;
  border-left: 4px solid var(--green);
}

.qye-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.qye-card {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 246, 0.78));
  display: grid;
  align-content: start;
  gap: 8px;
}

.qye-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.qye-card strong {
  font-size: 20px;
  line-height: 1.22;
  font-weight: 900;
}

.qye-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.qye-card-wide strong {
  font-size: 17px;
}

.qye-tone.hot {
  color: var(--red);
}

.qye-tone.active {
  color: var(--green);
}

.qye-tone.caution {
  color: var(--amber);
}

.qye-tone.neutral {
  color: var(--ink);
}

.qye-score-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.portfolio-band {
  border-left: 4px solid var(--green);
  display: grid;
  gap: 14px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
}

.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.portfolio-stat {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(242, 246, 244, 0.82), rgba(255, 255, 255, 0.94));
  display: grid;
  align-content: center;
  gap: 5px;
}

.portfolio-stat span,
.loan-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portfolio-stat strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.loan-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.loan-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, rgba(242, 246, 244, 0.76));
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.loan-main,
.loan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.loan-main strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.2;
}

.loan-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.loan-figures span {
  min-height: 52px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--faint);
  display: grid;
  align-content: center;
  gap: 2px;
}

.loan-figures b {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.loan-figures small,
.loan-foot {
  color: var(--muted);
  font-size: 11px;
}

.loan-progress {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--faint);
  overflow: hidden;
}

.loan-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--green-2));
}

.next-action-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(231, 238, 247, 0.52);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.next-action-panel h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}

.next-action-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.settings-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.settings-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--amber));
}

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

.api-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.api-setup-grid .settings-form {
  align-content: start;
}

.api-guide-card {
  width: 100%;
  min-height: 230px;
  border: 1px solid rgba(191, 123, 42, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.92), rgba(255, 255, 255, 0.82));
  color: var(--ink);
  padding: 10px;
  display: grid;
  gap: 8px;
  cursor: zoom-in;
  text-align: left;
}

.api-guide-card:hover {
  border-color: rgba(191, 123, 42, 0.52);
  box-shadow: 0 12px 28px rgba(16, 24, 22, 0.1);
}

.api-guide-card img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  object-position: top center;
  border-radius: 6px;
  border: 1px solid rgba(25, 31, 29, 0.12);
  background: #142638;
}

.api-guide-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}

.api-guide-warning {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.14);
  color: #b94848;
  font-size: 12px;
  font-weight: 950;
}

.setting-field {
  display: grid;
  gap: 6px;
}

.setting-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.setting-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 650;
}

.setting-field input::placeholder {
  color: rgba(91, 105, 100, 0.78);
  font-size: 13px;
  font-weight: 650;
}

.setting-field input[readonly] {
  color: var(--muted);
}

.permission-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-strip span,
.muted-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.permission-strip .muted-pill {
  background: var(--amber-soft);
  color: var(--amber);
}

.security-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.settings-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 28px;
  background: rgba(7, 12, 11, 0.78);
  display: grid;
  place-items: center;
}

.image-lightbox-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border-radius: 8px;
  background: #f8fbfa;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  padding: 16px;
}

.image-lightbox-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.image-lightbox-head h3 {
  margin: 0;
  font-size: 20px;
}

.image-lightbox-head p {
  margin: 5px 0 0;
  color: #b94848;
  font-weight: 900;
}

.image-lightbox-panel > img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.modal-open {
  overflow: hidden;
}

.goal-dialog[hidden] {
  display: none;
}

.goal-success-dialog[hidden],
.renewal-dialog[hidden] {
  display: none;
}

.goal-dialog {
  position: fixed;
  inset: 0;
  z-index: 55;
  padding: 28px;
  background: rgba(7, 12, 11, 0.72);
  display: grid;
  place-items: center;
}

.goal-success-dialog {
  position: fixed;
  inset: 0;
  z-index: 56;
  padding: 28px;
  background: rgba(12, 23, 20, 0.42);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
}

.goal-dialog-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248, 251, 250, 0.98), rgba(241, 247, 244, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.goal-success-panel {
  width: min(520px, 100%);
  border: 1px solid rgba(46, 104, 88, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(237, 249, 243, 0.98), rgba(255, 255, 255, 0.98) 58%, rgba(238, 244, 248, 0.96));
  box-shadow: 0 24px 70px rgba(13, 26, 23, 0.24);
  padding: 24px;
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.goal-success-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(48, 126, 105, 0.92), rgba(62, 104, 151, 0.82));
}

.goal-success-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(226, 244, 237, 0.92);
  border: 1px solid rgba(0, 127, 102, 0.28);
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.56);
}

.goal-success-panel h3 {
  margin: 5px 0 6px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.16;
}

.goal-success-panel p {
  margin: 0;
  max-width: 440px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.goal-success-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.goal-success-actions .secondary-action,
.goal-success-actions .primary-action {
  min-height: 44px;
  min-width: 132px;
  border-radius: 8px;
}

.renewal-panel {
  background:
    linear-gradient(145deg, rgba(255, 249, 235, 0.98), rgba(244, 252, 248, 0.98) 54%, rgba(239, 246, 251, 0.96));
}

.renewal-panel::before {
  background: linear-gradient(90deg, rgba(234, 188, 105, 0.92), rgba(48, 126, 105, 0.88), rgba(62, 104, 151, 0.76));
}

.renewal-mark {
  background: rgba(255, 244, 218, 0.96);
  border-color: rgba(209, 150, 65, 0.32);
  color: #b2772d;
}

.renewal-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 11px 12px;
  display: grid;
  gap: 4px;
}

.renewal-note span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.renewal-note small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.renewal-dialog.is-hard-lock {
  z-index: 90;
  background: rgba(8, 16, 14, 0.62);
  backdrop-filter: blur(16px) saturate(0.82);
}

.renewal-dialog.is-hard-lock .renewal-panel {
  width: min(560px, 100%);
  box-shadow: 0 30px 90px rgba(6, 18, 15, 0.34);
}

.renewal-dialog.is-hard-lock .goal-success-actions {
  justify-content: stretch;
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) minmax(180px, 1fr);
}

.renewal-dialog.is-hard-lock .goal-success-actions .secondary-action,
.renewal-dialog.is-hard-lock .goal-success-actions .primary-action {
  width: 100%;
  min-width: 0;
}

.renewal-dialog.is-hard-lock .goal-success-actions .secondary-action {
  background: rgba(255, 255, 255, 0.58);
}

body.subscription-hard-lock .mobile-menu-btn,
body.subscription-hard-lock .top-actions,
body.subscription-hard-lock .sidebar,
body.subscription-hard-lock .main {
  pointer-events: none;
}

.goal-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.goal-dialog-head h3 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.15;
}

.goal-dialog-head p,
.goal-dialog-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.goal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.goal-field {
  display: grid;
  gap: 7px;
}

.goal-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.goal-field input,
.goal-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.goal-field input:focus,
.goal-field select:focus {
  border-color: rgba(0, 127, 102, 0.48);
  box-shadow: 0 0 0 3px rgba(0, 127, 102, 0.09);
}

.goal-field select:disabled {
  background: rgba(226, 244, 237, 0.5);
  color: var(--ink);
  cursor: default;
  opacity: 1;
}

.goal-style-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.goal-style-picker label {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.goal-style-picker input {
  accent-color: var(--green);
}

.goal-style-picker label:has(input:checked) {
  border-color: rgba(0, 127, 102, 0.34);
  background: var(--green-soft);
  color: var(--green);
}

.goal-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-action {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 7px 11px;
  font-weight: 850;
}

.secondary-action.danger {
  background: var(--red-soft);
  border-color: rgba(172, 86, 97, 0.22);
  color: var(--red);
}

.settings-foot .api-save-btn {
  min-height: 50px;
  min-width: 184px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 950;
  border-color: rgba(0, 127, 102, 0.36);
  background: var(--green-soft);
  color: var(--green);
}

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

.mode-row {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 246, 244, 0.72);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.mode-row.active {
  border-color: rgba(0, 127, 102, 0.38);
  background: linear-gradient(90deg, rgba(226, 244, 237, 0.88), rgba(231, 238, 247, 0.72));
}

.mode-row.saved {
  box-shadow: inset 3px 0 0 rgba(0, 127, 102, 0.52);
}

.mode-row:hover {
  border-color: rgba(0, 127, 102, 0.28);
}

.mode-row b {
  font-size: 14px;
  line-height: 1.25;
}

.mode-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.strategy-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.auto-power-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(152, 164, 158, 0.36);
  border-radius: 8px;
  background: rgba(242, 246, 244, 0.78);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.auto-power-btn:hover,
.auto-power-btn.on {
  border-color: rgba(0, 127, 102, 0.42);
  background: linear-gradient(90deg, rgba(213, 242, 231, 0.98), rgba(231, 248, 242, 0.92));
  color: var(--green);
}

.auto-power-btn.on:hover {
  border-color: rgba(185, 72, 72, 0.36);
  background: linear-gradient(90deg, rgba(255, 234, 232, 0.98), rgba(251, 244, 242, 0.92));
  color: #b94848;
}

.auto-power-btn:hover {
  transform: translateY(-1px);
}

.auto-power-btn.on .power-dot,
.auto-power-btn:hover .power-dot {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(0, 127, 102, 0.12);
}

.auto-power-btn.on:hover .power-dot {
  background: #b94848;
  box-shadow: 0 0 0 5px rgba(185, 72, 72, 0.12);
}

.power-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a7b4ae;
}

.auto-lending-panel {
  grid-column: 1 / -1;
}

.auto-lending-form {
  display: grid;
  gap: 12px;
}

.auto-save-row,
.auto-power-area {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.auto-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.auto-save-row b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.auto-save-row small {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.auto-power-area {
  display: grid;
  gap: 8px;
}

.auto-power-area .auto-power-btn {
  justify-self: start;
  min-width: 220px;
}

.switch-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 246, 244, 0.72);
}

.switch-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.switch-row b {
  display: block;
  font-size: 14px;
}

.switch-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.risk-row {
  border-color: rgba(191, 123, 42, 0.24);
  background: rgba(255, 248, 230, 0.72);
}

.period-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.period-picker label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.period-picker input {
  accent-color: var(--green);
}

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

.primary-action {
  min-height: 36px;
  border: 1px solid rgba(0, 127, 102, 0.36);
  border-radius: 8px;
  border-color: rgba(0, 127, 102, 0.36);
  background: var(--green-soft);
  color: var(--green);
  padding: 7px 11px;
  font-weight: 900;
  cursor: pointer;
}

.goal-dialog-actions .secondary-action,
.goal-dialog-actions .primary-action {
  min-width: 132px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 14px;
}

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

.chart-card {
  position: relative;
  overflow: hidden;
}

.chart-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 0 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 127, 102, 0.45), transparent);
  transform: translateX(-70%);
  animation: chartSweep 4.8s infinite;
}

.chart-stat {
  text-align: right;
  display: grid;
  gap: 3px;
}

.chart-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-stat strong {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
}

.chart-canvas {
  display: block;
  width: 100%;
  height: 260px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(242, 246, 244, 0.72), rgba(255, 255, 255, 0.96));
  cursor: crosshair;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.account-earnings-panel {
  margin-top: 14px;
}

.earning-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.earning-month-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.earning-month-field input {
  width: 130px;
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.earning-month-field input:focus {
  outline: none;
}

.account-earnings-wrap {
  -webkit-overflow-scrolling: touch;
}

.account-earnings-wrap table {
  min-width: 620px;
  table-layout: auto;
}

.account-earnings-wrap th,
.account-earnings-wrap td {
  font-size: 13px;
}

.account-earnings-wrap td:nth-child(3),
.account-earnings-wrap td:nth-child(5) {
  font-weight: 850;
}

.funding-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 15px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 250, 0.88)),
    rgba(251, 252, 251, 0.94);
  display: grid;
  grid-template-columns: 48px minmax(88px, 0.72fr) 58px minmax(185px, 1.35fr) minmax(96px, 0.78fr) minmax(116px, 0.92fr) minmax(112px, 0.95fr);
  align-items: center;
  gap: 11px;
  min-height: 64px;
  box-shadow: 0 8px 22px rgba(19, 35, 31, 0.045);
}

.funding-row + .funding-row {
  margin-top: 8px;
}

.funding-cell {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funding-currency,
.funding-principal,
.funding-rate {
  color: var(--ink);
}

.funding-currency {
  font-size: 14px;
  font-weight: 900;
}

.funding-principal {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
}

.funding-rate {
  font-size: 13px;
  font-weight: 900;
}

.funding-layer,
.funding-state {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(104, 187, 152, 0.15);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.pending-row .funding-layer {
  background: rgba(75, 119, 158, 0.13);
  color: var(--blue);
}

.pending-row .funding-state {
  background: rgba(75, 119, 158, 0.1);
  color: var(--blue);
}

.credit-row .funding-state {
  background: rgba(104, 187, 152, 0.16);
  color: var(--green);
}

.funding-time,
.funding-return,
.funding-remaining {
  color: var(--ink);
  text-align: right;
}

.credit-row {
  border-left: 4px solid var(--green);
}

.pending-row {
  border-left: 4px solid var(--blue);
}

.panel-green {
  border-top: 3px solid var(--green);
}

.panel-red {
  border-top: 3px solid var(--red);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 800;
  background: var(--surface-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.rate-cell {
  position: relative;
  font-weight: 850;
}

.rate-cell::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

.bid .rate-cell::before {
  background: var(--green);
}

.offer .rate-cell::before {
  background: var(--red);
}

.depth-bar {
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--faint);
  overflow: hidden;
}

.depth-bar > span {
  display: block;
  height: 100%;
}

.bid .depth-bar > span {
  background: var(--green-2);
}

.offer .depth-bar > span {
  background: var(--red-2);
}

.action-list,
.list,
.timeline {
  display: grid;
  gap: 10px;
}

.qye-history-list {
  display: grid;
  gap: 10px;
}

.strategy-record-view {
  display: grid;
  gap: 14px;
}

.strategy-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.strategy-status-card {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.strategy-status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.strategy-status-card b {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.strategy-status-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.qye-history-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
  display: grid;
  gap: 11px;
}

.qye-history-top,
.qye-history-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.qye-history-top > div {
  display: grid;
  gap: 4px;
}

.qye-history-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.qye-history-top strong {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.qye-history-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.qye-history-main span {
  min-height: 64px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  align-content: center;
  gap: 3px;
}

.qye-history-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.qye-history-main b {
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.qye-history-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.qye-history-foot {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 12px;
}

.strategy-log-subsection {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.auto-execution-row {
  border-left: 4px solid var(--line);
}

.auto-execution-row.good {
  border-left-color: var(--green);
}

.auto-execution-row.bad {
  border-left-color: var(--red);
}

.auto-execution-row.neutral {
  border-left-color: var(--blue);
}

.auto-execution-row .timeline-top small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.auto-execution-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.auto-execution-main span {
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  align-content: center;
  gap: 3px;
}

.auto-execution-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.auto-execution-main b {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.auto-execution-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.brainlog-view {
  display: grid;
  gap: 20px;
}

.brainlog-hero {
  min-height: 176px;
  border: 1px solid rgba(44, 91, 78, 0.2);
  border-radius: 8px;
  padding: 34px 36px;
  background:
    linear-gradient(135deg, rgba(12, 30, 25, 0.98), rgba(17, 47, 39, 0.96) 52%, rgba(17, 28, 39, 0.98)),
    linear-gradient(rgba(180, 238, 217, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 238, 217, 0.06) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  color: #f7fff9;
  box-shadow: 0 28px 64px rgba(12, 23, 21, 0.18);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.brainlog-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(115, 221, 184, 0.95), rgba(219, 188, 108, 0.84), rgba(93, 143, 195, 0.88));
}

.brainlog-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -150px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(142, 240, 202, 0.16);
  background: radial-gradient(circle, rgba(142, 240, 202, 0.16), transparent 68%);
  pointer-events: none;
}

.brainlog-hero > * {
  position: relative;
  z-index: 1;
}

.brainlog-hero > div {
  display: grid;
  gap: 14px;
}

.brainlog-hero .eyebrow {
  color: #9de2c8;
  width: fit-content;
}

.brainlog-hero h3 {
  margin: 0;
  max-width: 840px;
  color: #f7fff9;
  font-size: 34px;
  line-height: 1.16;
}

.brainlog-hero p {
  margin: 0;
  max-width: 780px;
  color: rgba(226, 244, 236, 0.72);
  font-size: 16px;
  line-height: 1.68;
}

.brainlog-hero-status {
  min-height: 150px;
  border: 1px solid rgba(232, 255, 246, 0.12);
  border-radius: 8px;
  padding: 16px;
  background: rgba(232, 255, 246, 0.075);
  display: grid;
  align-content: center;
  gap: 6px;
}

.brainlog-hero-status span,
.brainlog-hero-status small {
  color: rgba(226, 244, 236, 0.68);
  font-size: 12px;
  font-weight: 850;
}

.brainlog-hero-status strong {
  color: #f7fff9;
  font-size: 42px;
  line-height: 1;
}

.brainlog-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brainlog-summary-card {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 250, 0.95));
  box-shadow: var(--shadow-soft);
  display: grid;
  align-content: space-between;
  gap: 9px;
  position: relative;
  overflow: hidden;
}

.brainlog-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.brainlog-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.brainlog-summary-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.05;
  font-weight: 950;
}

.brainlog-summary-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.brainlog-timeline-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.brainlog-timeline-panel .section-head {
  align-items: flex-start;
  gap: 18px;
}

.brainlog-timeline-panel .section-head h3 {
  margin-bottom: 8px;
}

.brainlog-timeline-panel .section-copy {
  max-width: 520px;
}

.brainlog-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 2px;
}

.brainlog-filter {
  min-width: 62px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.brainlog-filter[data-brainlog-filter="attention"] {
  min-width: 92px;
}

.brainlog-filter.active,
.brainlog-filter:hover {
  border-color: rgba(0, 127, 102, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.brainlog-filter:focus-visible {
  outline: 2px solid rgba(0, 127, 102, 0.24);
  outline-offset: 3px;
}

.brainlog-timeline {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 640px;
}

.brainlog-entry {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.brainlog-entry::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 34px;
  bottom: -12px;
  width: 1px;
  background: rgba(204, 218, 209, 0.9);
}

.brainlog-entry:last-child::before {
  display: none;
}

.brainlog-entry-mark {
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(0, 127, 102, 0.1);
  position: relative;
  z-index: 1;
}

.brainlog-entry.warn .brainlog-entry-mark,
.brainlog-entry.waiting .brainlog-entry-mark {
  background: #d6a447;
  box-shadow: 0 0 0 5px rgba(214, 164, 71, 0.12);
}

.brainlog-entry.bad .brainlog-entry-mark {
  background: #b94848;
  box-shadow: 0 0 0 5px rgba(185, 72, 72, 0.12);
}

.brainlog-entry.neutral .brainlog-entry-mark {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(63, 111, 157, 0.1);
}

.brainlog-entry-body {
  display: grid;
  gap: 8px;
}

.brainlog-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.brainlog-entry-top b {
  width: fit-content;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 3px 8px;
  font-size: 11px;
}

.brainlog-entry h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.32;
}

.brainlog-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.brainlog-entry small {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.action,
.list-row,
.timeline-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 5px;
  background: #fbfcfb;
}

.position-row {
  gap: 10px;
}

.position-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.position-metrics span {
  min-height: 58px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 2px;
}

.position-metrics b {
  font-size: 14px;
  overflow-wrap: anywhere;
}

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

.action {
  border-left: 4px solid var(--green);
}

.action-top,
.list-row-top,
.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-title,
.list-title {
  font-weight: 850;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
}

.admin-view {
  display: grid;
  gap: 14px;
}

.admin-hero {
  min-height: 150px;
  border: 1px solid rgba(44, 91, 78, 0.22);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(14, 30, 26, 0.98), rgba(28, 48, 43, 0.95) 62%, rgba(27, 40, 54, 0.95));
  color: #f7fbf9;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow);
}

.admin-kicker {
  color: #8edfc2;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-hero h3 {
  margin: 8px 0 8px;
  font-size: 34px;
  line-height: 1;
}

.admin-hero p {
  margin: 0;
  max-width: 680px;
  color: #d8e6df;
  font-size: 15px;
  line-height: 1.55;
}

.admin-hero-status {
  min-width: 230px;
  padding: 14px;
  border: 1px solid rgba(178, 228, 207, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  display: grid;
  gap: 5px;
}

.admin-hero-status strong {
  font-size: 19px;
}

.admin-hero-status small {
  color: #c2d4cd;
}

.admin-status-dot {
  width: max-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d8e6df;
  font-size: 12px;
  font-weight: 900;
}

.admin-status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.admin-status-dot.good::before {
  background: #66d0aa;
}

.admin-status-dot.bad::before {
  background: #ff9b9b;
}

.admin-status-dot.idle::before {
  background: #d3c3a0;
}

.admin-grid {
  display: grid;
  gap: 12px;
}

.admin-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-card {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 250, 0.95));
  box-shadow: var(--shadow-soft);
  display: grid;
  align-content: space-between;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.admin-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.admin-card span,
.admin-decision span,
.admin-market-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-card strong {
  font-size: 25px;
  line-height: 1.1;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.admin-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.admin-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-decision {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface-soft);
  display: grid;
  align-content: center;
  gap: 7px;
}

.admin-decision strong {
  font-size: 21px;
  line-height: 1.25;
}

.admin-decision small {
  color: var(--muted);
  line-height: 1.45;
}

.admin-score-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-score-row {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
  display: grid;
  align-content: center;
  gap: 3px;
}

.admin-score-row b {
  font-size: 21px;
}

.admin-score-row small {
  color: var(--muted);
  font-size: 11px;
}

.admin-market-list,
.admin-history-list {
  display: grid;
  gap: 9px;
}

.admin-market-row,
.admin-history-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  display: grid;
  gap: 5px;
}

.admin-market-row b {
  font-size: 19px;
}

.admin-market-row small,
.admin-history-row small,
.admin-history-row span {
  color: var(--muted);
  font-size: 12px;
}

.admin-history-row strong {
  font-size: 16px;
}

.admin-customer-list {
  display: grid;
  gap: 12px;
}

.admin-customer-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 15px;
  display: grid;
  gap: 12px;
}

.admin-customer-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-customer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-customer-main strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.admin-customer-main small {
  color: var(--muted);
  font-size: 12px;
}

.admin-customer-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 9px;
}

.admin-customer-metrics span {
  border: 1px solid rgba(210, 222, 215, 0.9);
  border-radius: 8px;
  padding: 10px;
  background: rgba(246, 249, 246, 0.85);
  min-width: 0;
}

.admin-customer-metrics b,
.admin-customer-metrics small {
  display: block;
}

.admin-customer-metrics b {
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
}

.admin-customer-metrics small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.good {
  background: #dff3ea;
  color: #2f8064;
}

.status-pill.bad {
  background: #f5dfdf;
  color: #9e555c;
}

.muted-row {
  color: var(--muted);
  font-size: 13px;
}

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

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

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface-ink);
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 14px;
}

@keyframes loginGridDrift {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 184px 92px, 92px 184px, 0 0;
  }
}

@keyframes loginBaselinePulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(0.985);
  }
}

@keyframes loginSignalPulse {
  0%,
  100% {
    transform: scaleX(1);
    box-shadow: 0 0 24px rgba(102, 208, 170, 0.18);
  }
  50% {
    transform: scaleX(1.16);
    box-shadow: 0 0 34px rgba(102, 208, 170, 0.32);
  }
}

@keyframes loginTitleIn {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

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

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

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loginTopLine {
  0%,
  100% {
    opacity: 0.76;
    filter: saturate(1);
  }
  50% {
    opacity: 1;
    filter: saturate(1.24);
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(53, 168, 115, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(53, 168, 115, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(53, 168, 115, 0);
  }
}

@keyframes chartSweep {
  0% {
    transform: translateX(-75%);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: translateX(75%);
    opacity: 0;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .performance-card {
    grid-column: span 3;
  }

  .metric {
    grid-column: span 4;
  }

  .loan-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .login-screen {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 34px;
  }

  .login-brand h1 {
    font-size: clamp(64px, 16vw, 104px);
  }

  .login-brand p {
    font-size: clamp(21px, 4.6vw, 28px);
  }

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

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    left: -320px;
    z-index: 80;
    width: min(84vw, 304px);
    height: 100dvh;
    transform: none !important;
    transition: left 220ms ease;
    overflow-y: auto;
    box-shadow: 22px 0 48px rgba(12, 20, 18, 0.24);
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .sidebar,
  .sidebar.is-open {
    left: 0;
    transform: none !important;
  }

  .mobile-menu-btn {
    display: inline-grid;
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 14px;
    z-index: 95;
    width: 46px;
    height: 46px;
    border-color: rgba(157, 232, 204, 0.36);
    border-radius: 16px;
    background:
      linear-gradient(145deg, rgba(14, 31, 27, 0.94), rgba(34, 72, 62, 0.86)),
      rgba(16, 29, 26, 0.9);
    color: #d9fff1;
    box-shadow:
      0 16px 36px rgba(12, 24, 21, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
  }

  .mobile-menu-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(157, 232, 204, 0.58);
    background:
      linear-gradient(145deg, rgba(20, 44, 38, 0.96), rgba(47, 128, 100, 0.86)),
      rgba(16, 29, 26, 0.92);
    box-shadow:
      0 18px 42px rgba(12, 24, 21, 0.3),
      0 0 0 3px rgba(82, 193, 151, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  body.mobile-nav-open .mobile-menu-btn {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-menu-btn span {
    height: 2px;
    background: currentColor;
    box-shadow: 0 0 10px rgba(161, 244, 214, 0.28);
  }

  .mobile-menu-btn span:nth-child(2) {
    width: 14px;
  }

  .mobile-menu-btn span:nth-child(3) {
    width: 22px;
  }

  .brand {
    position: relative;
    align-items: flex-start;
    justify-content: space-between;
    padding-right: 48px;
  }

  .mobile-nav-close-btn {
    display: inline-grid;
    position: absolute;
    top: -2px;
    right: 0;
  }

  .mobile-nav-overlay {
    left: min(84vw, 304px);
  }

  .topbar-heading {
    position: relative;
    padding-left: 58px;
  }

  .trade-heat-wrap::-webkit-scrollbar,
  .qye-score-wrap::-webkit-scrollbar {
    height: 8px;
  }

  .trade-heat-wrap::-webkit-scrollbar-track,
  .qye-score-wrap::-webkit-scrollbar-track {
    background: rgba(204, 218, 209, 0.38);
    border-radius: 999px;
  }

  .trade-heat-wrap::-webkit-scrollbar-thumb,
  .qye-score-wrap::-webkit-scrollbar-thumb {
    background: rgba(72, 133, 112, 0.46);
    border-radius: 999px;
  }

  .market-grid,
  .chart-grid,
  .reference-grid,
  .qye-summary-grid,
  .brainlog-hero,
  .brainlog-summary-grid,
  .account-grid,
  .config-grid,
  .strategy-status-grid {
    grid-template-columns: 1fr;
  }

  .qye-history-main,
  .auto-execution-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-hero-status {
    min-width: 0;
  }

  .admin-grid-four,
  .admin-split {
    grid-template-columns: 1fr 1fr;
  }

  .admin-customer-metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .period-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .performance-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .funding-row {
    grid-template-columns: 48px minmax(82px, 0.74fr) 54px minmax(172px, 1.2fr) minmax(92px, 0.8fr) minmax(108px, 0.9fr) minmax(104px, 0.9fr);
    gap: 9px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .trade-heat-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .trade-heat-wrap table {
    min-width: 560px;
    table-layout: auto;
  }

  .trade-heat-wrap th,
  .trade-heat-wrap td {
    padding: 9px 8px;
    font-size: 12px;
  }

  .trade-heat-wrap th:first-child,
  .trade-heat-wrap td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 54px;
    background: rgba(249, 252, 250, 0.96);
    box-shadow: 10px 0 16px rgba(16, 31, 27, 0.08);
  }

  .trade-heat-wrap th:first-child {
    z-index: 3;
    background: var(--surface-soft);
  }

  .trade-heat-wrap .heat-label {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 11px;
  }

  .qye-score-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .qye-score-wrap table {
    min-width: 680px;
    table-layout: auto;
  }

  .qye-score-wrap th,
  .qye-score-wrap td {
    padding: 9px 10px;
    font-size: 12px;
  }

  .qye-score-wrap th:first-child,
  .qye-score-wrap td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 58px;
    background: rgba(249, 252, 250, 0.96);
    box-shadow: 10px 0 16px rgba(16, 31, 27, 0.08);
  }

  .qye-score-wrap th:first-child {
    z-index: 3;
    background: var(--surface-soft);
  }

  .qye-score-wrap th:nth-child(2),
  .qye-score-wrap td:nth-child(2) {
    min-width: 78px;
    text-align: center;
  }

  .qye-score-wrap th:nth-child(4),
  .qye-score-wrap td:nth-child(4) {
    min-width: 156px;
  }

  .qye-score-wrap th:nth-child(6),
  .qye-score-wrap td:nth-child(6) {
    min-width: 86px;
  }

  .qye-score-wrap .heat-label {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .login-screen {
    padding: 18px;
  }

  .login-screen::after {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }

  .login-brand {
    gap: 16px;
  }

  .login-brand h1 {
    font-size: 58px;
  }

  .login-card {
    padding: 24px;
  }

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

  .main {
    padding: 14px 12px 22px;
    gap: 12px;
    overflow-x: clip;
  }

  .main > *,
  .view-panel,
  .account-view,
  .account-grid,
  .panel,
  .list {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .topbar,
  .action-top,
  .list-row-top,
  .timeline-top,
  .section-head,
  .next-action-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 12px;
    padding: 8px 0 0;
  }

  .topbar-heading {
    padding-left: 54px;
  }

  .topbar h2 {
    font-size: 28px;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .live-pill,
  .updated {
    min-height: 36px;
  }

  .metric-grid {
    display: contents;
  }

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

  .goal-panel {
    grid-template-columns: 1fr;
    padding: 26px 22px;
    gap: 24px;
  }

  .goal-story {
    gap: 16px;
  }

  .goal-panel h3 {
    font-size: 28px;
    margin-top: 4px;
  }

  .goal-title-brand {
    gap: 9px;
    padding-left: 16px;
  }

  .goal-title-line-soft {
    font-size: 18px;
    line-height: 1.3;
  }

  .goal-title-line-strong {
    font-size: 34px;
    line-height: 1.08;
  }

  .goal-orbit {
    justify-self: start;
    width: 148px;
  }

  .goal-status-line,
  .goal-progress-copy,
  .goal-dialog-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .brainlog-hero {
    min-height: 0;
    padding: 26px 22px;
  }

  .brainlog-hero > div {
    gap: 12px;
  }

  .brainlog-hero h3 {
    font-size: 28px;
    line-height: 1.18;
  }

  .brainlog-hero p {
    font-size: 15px;
    line-height: 1.62;
  }

  .brainlog-hero-status {
    min-height: 118px;
  }

  .brainlog-filters {
    justify-content: flex-start;
  }

  .brainlog-timeline-panel {
    padding: 18px;
  }

  .brainlog-timeline {
    min-height: 560px;
  }

  .brainlog-entry {
    grid-template-columns: 16px minmax(0, 1fr);
    padding: 15px;
  }

  .goal-metrics,
  .goal-form-grid,
  .goal-style-picker {
    grid-template-columns: 1fr;
  }

  .goal-dialog {
    padding: 18px;
  }

  .goal-success-dialog {
    padding: 18px;
  }

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

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

  .strategy-status-grid,
  .qye-history-main,
  .auto-execution-main {
    grid-template-columns: 1fr;
  }

  .admin-grid-four,
  .admin-split,
  .admin-score-list {
    grid-template-columns: 1fr;
  }

  .admin-customer-main {
    flex-direction: column;
  }

  .admin-customer-metrics {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    padding: 18px;
  }

  .admin-hero h3 {
    font-size: 28px;
  }

  .performance-card,
  .metric {
    grid-column: span 1;
  }

  .current-strategy-card {
    width: 100%;
  }

  .chart-canvas {
    height: 230px;
  }

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

  .portfolio-summary,
  .loan-figures,
  .qye-history-main {
    grid-template-columns: 1fr;
  }

  .funding-row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px 12px;
    min-height: 126px;
    padding: 16px;
    overflow: visible;
  }

  .funding-cell {
    font-size: 14px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .funding-currency {
    grid-column: auto;
    align-self: start;
    min-width: 42px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0;
  }

  .funding-principal {
    grid-column: 2 / 3;
    font-size: 24px;
    line-height: 1.05;
  }

  .funding-period {
    grid-column: 3 / 4;
    justify-self: end;
    align-self: start;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
  }

  .funding-rate {
    grid-column: 1 / -1;
    font-size: 15px;
    line-height: 1.45;
    white-space: normal;
  }

  .funding-layer,
  .funding-state {
    grid-column: auto;
    min-height: 28px;
    padding: 6px 10px;
  }

  .funding-time,
  .funding-return,
  .funding-remaining {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
  }

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

  .api-setup-grid {
    grid-template-columns: 1fr;
  }

  .api-guide-card img {
    max-height: 160px;
  }

  .settings-foot {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .auto-save-row {
    grid-template-columns: 1fr;
  }

  .auto-power-area .auto-power-btn {
    width: 100%;
  }

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

@media (max-width: 860px) {
  body.mobile-nav-open #sidebar.sidebar,
  #sidebar.sidebar.is-open {
    left: 0;
    transform: none !important;
  }
}
