/* AegeanOil brand layer — shared by every authenticated surface. */
:root,
[data-theme="dark"] {
  --accent: #1683ff;
  --accent-2: #055cca;
  --glow-acc: rgba(22, 131, 255, .16);
  --bg: #050c1a;
  --panel: rgba(10, 25, 48, .72);
  --panel-solid: #0a1930;
  --panel-2: rgba(14, 34, 63, .62);
  --surface: rgba(23, 48, 82, .62);
  --text: #f5f9ff;
  --dim: #b7c7da;
  --faint: #8da3bd;
  --border: rgba(116, 174, 239, .13);
  --border-strong: rgba(116, 174, 239, .25);
  --glass-tint: rgba(55, 132, 219, .07);
  --glass-highlight: rgba(156, 205, 255, .11);
  --gl-color-primary: #1683ff;
  --gl-color-primary-dark: #055cca;
  --gl-color-primary-mid: #0b6ee8;
  --gl-color-bg-dark: #050c1a;
  --gl-color-bg-mid: #0a1930;
  --gl-color-bg-light: #102b4c;
  --gl-border-focus: rgba(22, 131, 255, .72);
  --gl-shadow-btn-primary: 0 8px 28px rgba(22, 131, 255, .28), 0 2px 8px rgba(0, 0, 0, .18);
  --gl-shadow-focus: 0 0 0 3px rgba(22, 131, 255, .24);
  --gl-bg-aurora-1: rgba(22, 131, 255, .24);
  --gl-bg-aurora-2: rgba(0, 190, 229, .14);
  --gl-bg-aurora-3: rgba(62, 109, 255, .18);
  --gl-bg-warm-glow: rgba(22, 131, 255, .12);
}

[data-theme="light"] {
  --accent: #076ee6;
  --accent-2: #034eaa;
  --glow-acc: rgba(7, 110, 230, .12);
  --bg: #edf5fc;
  --panel: rgba(255, 255, 255, .76);
  --panel-solid: #ffffff;
  --panel-2: rgba(242, 248, 255, .78);
  --surface: rgba(255, 255, 255, .84);
  --text: #071b35;
  --dim: #405a77;
  --faint: #637c97;
  --border: rgba(9, 67, 128, .10);
  --border-strong: rgba(9, 67, 128, .20);
  --glass-tint: rgba(7, 110, 230, .045);
  --glass-highlight: rgba(255, 255, 255, .82);
  --gl-color-primary: #076ee6;
  --gl-color-primary-dark: #034eaa;
  --gl-color-primary-mid: #0866cc;
  --gl-color-bg-dark: #edf5fc;
  --gl-color-bg-mid: #e1effa;
  --gl-color-bg-light: #ffffff;
  --gl-border-focus: rgba(7, 110, 230, .58);
  --gl-shadow-btn-primary: 0 8px 24px rgba(7, 110, 230, .20), 0 2px 8px rgba(10, 50, 95, .10);
  --gl-shadow-focus: 0 0 0 3px rgba(7, 110, 230, .18);
}

body::before { background: radial-gradient(circle, rgba(22, 131, 255, .8) 0%, transparent 70%); }
body::after { background: radial-gradient(circle, rgba(0, 188, 212, .6) 0%, transparent 70%); }
::selection { background: var(--accent); color: #fff; }

.tp-nav {
  border-bottom-color: rgba(83, 158, 239, .16);
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
}

.tp-brand-logo {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.ao-nav-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 158px; text-decoration: none; }
.tp-brand-logo--mark { flex: 0 0 42px; filter: drop-shadow(0 5px 13px rgba(22, 131, 255, .28)); }
.tp-brand-copy { display: grid; gap: 4px; line-height: 1; }
.tp-brand-copy strong { color: var(--text); font-size: 13px; font-weight: 850; letter-spacing: .075em; white-space: nowrap; }
.tp-brand-copy small { color: var(--accent); font-size: 7px; font-weight: 800; letter-spacing: .17em; white-space: nowrap; }

.tp-brand-logo--compact {
  width: 34px;
  height: 34px;
  padding: 3px;
}

.uk-button-primary,
.glass-btn--primary {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #1683ff, #075ac7) !important;
  box-shadow: 0 8px 24px rgba(22, 131, 255, .22);
}

.uk-button-primary:hover,
.glass-btn--primary:hover { background: linear-gradient(135deg, #3092ff, #0767dc) !important; }

.ao-auth-shell {
  min-height: 100vh;
  padding: 34px 18px;
  background:
    radial-gradient(circle at 12% 12%, rgba(22, 131, 255, .20), transparent 34%),
    radial-gradient(circle at 88% 86%, rgba(0, 188, 212, .13), transparent 32%);
}

.ao-auth-card { width: min(100%, 620px); padding: clamp(24px, 5vw, 44px) !important; }
.ao-auth-head { gap: 20px; }
.ao-auth-brand { display: inline-flex; align-items: center; gap: 13px; padding: 0; color: var(--text); text-decoration: none; }
.ao-auth-brand img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(22, 131, 255, .25)); }
.ao-auth-brand-copy { display: grid; gap: 6px; line-height: 1; }
.ao-auth-brand-copy strong { color: var(--text); font-size: 20px; font-weight: 850; letter-spacing: .085em; }
.ao-auth-brand-copy small { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.ao-auth-kicker { margin: 18px 0 4px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.ao-auth-subtitle { max-width: 470px; }

/* Contrast safety layer for small labels and filled accent controls. */
.uk-text-muted,
.uk-text-meta,
.tp-panel-head,
.tp-table th,
.portfolio-stat-label,
.pair-name,
.market-header-row,
.trade-info-label { color: var(--dim) !important; }

.market-view-toggle button.active,
.fx-qty-toggle button.active,
.referral-code-box button,
.adjust-mode-grid .adjust-mode.active,
.trade-history-pagination button.active,
.ov-mode-switch button.active,
.funding-card-icon.bank,
.funding-type-switch button.active,
.funding-primary-btn,
.funding-method-modal__footer .glass-modal__action--primary,
.glass-modal__action--primary,
.app-dialog__button--confirm,
.agent-compact-avatar,
.chat-fab,
.chat-bubble-user {
  color: #fff !important;
}

[data-theme="dark"] .uk-input::placeholder,
[data-theme="dark"] .uk-textarea::placeholder,
[data-theme="dark"] .funding-instructions::placeholder { color: #8da3bd !important; opacity: .9; }

@media (max-width: 720px) {
  .tp-brand-logo { width: 35px; height: 35px; }
  .tp-brand-logo--mark { flex-basis: 35px; }
  .ao-nav-brand { min-width: 139px; gap: 8px; }
  .tp-brand-copy strong { font-size: 11px; }
  .tp-brand-copy small { font-size: 6px; }
  .ao-auth-card { padding: 22px 18px !important; }
  .ao-auth-brand img { width: 48px; height: 48px; }
  .ao-auth-brand-copy strong { font-size: 15px; }
}
