/* Gekko App UI polish — clean mobile/pro override, no runtime/trading changes. */
:root {
  color-scheme: dark;
  --gekko-bg: #091522;
  --gekko-bg-soft: #0d1d2d;
  --gekko-panel: #122338;
  --gekko-panel-2: #0f1d2d;
  --gekko-border: rgba(121, 171, 230, .20);
  --gekko-border-soft: rgba(255, 255, 255, .07);
  --gekko-text: #f4f8ff;
  --gekko-muted: #b8c7d8;
  --gekko-muted-2: #8fa2b8;
  --gekko-accent: #5ee8b5;
  --gekko-accent-2: #65c7ff;
  --gekko-info: #8ab4ff;
  --gekko-warn: #ffd166;
  --gekko-bad: #ff8fa3;
}

html,
body {
  background:
    linear-gradient(180deg, rgba(6, 16, 27, .72) 0%, rgba(6, 16, 27, .84) 52%, rgba(5, 13, 23, .92) 100%),
    url('/gordon-gekko-background.jpg?v=20260927') center 18% / cover fixed no-repeat !important;
  color: var(--gekko-text) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 0%, rgba(94, 232, 181, .10), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(101, 199, 255, .11), transparent 28%);
}

.sidebar,
.topbar {
  background: rgba(8, 19, 31, .94) !important;
  border-color: rgba(121, 171, 230, .14) !important;
  backdrop-filter: blur(14px);
}

.brand-mark,
.auth-brand-mark,
.notification-button:has(+ *),
.bottom-nav a.active,
.mobile-tab-active {
  background: linear-gradient(145deg, #69e8b6, #69cfff) !important;
  color: #06131c !important;
}

.brand-mark,
.auth-brand-mark {
  box-shadow: 0 10px 26px rgba(94, 232, 181, .18) !important;
}

.widget-card,
.stat-card,
.module-card,
.panel,
.notification-card,
.auth-card {
  background: linear-gradient(180deg, rgba(18, 35, 56, .96), rgba(13, 27, 43, .96)) !important;
  border: 1px solid var(--gekko-border) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22) !important;
}

.widget-card::before,
.panel::before,
.module-card::before,
.stat-card::before {
  display: none !important;
}

.widget-card:hover,
.module-card:hover,
.stat-card:hover {
  border-color: rgba(94, 232, 181, .35) !important;
  transform: none !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .25) !important;
}

.hero h1,
.widget-card strong,
.stat-card strong,
.big,
.metric,
h1,
h2,
h3 {
  color: #f7fbff !important;
  text-shadow: none !important;
}

.hero p,
.panel p,
.widget-card p,
.module-card p,
.stat-card span,
.muted,
.sidebar-footer,
.widget-label,
small {
  color: var(--gekko-muted) !important;
}

.eyebrow,
.widget-link,
a,
.nav-link-active,
.nav-category:has(.nav-link-active) .nav-category-label {
  color: var(--gekko-accent) !important;
}

.nav-link:hover,
.nav-link-active {
  background: rgba(94, 232, 181, .09) !important;
  color: #f4fff9 !important;
}

.tone-success { box-shadow: inset 0 2px rgba(94, 232, 181, .75), 0 12px 32px rgba(0,0,0,.22) !important; }
.tone-info { box-shadow: inset 0 2px rgba(101, 199, 255, .75), 0 12px 32px rgba(0,0,0,.22) !important; }
.tone-warning { box-shadow: inset 0 2px rgba(255, 209, 102, .75), 0 12px 32px rgba(0,0,0,.22) !important; }

.overall-status,
.readonly-badge,
.availability-badge,
.tag,
.nav-item-badge,
.status-positive {
  background: rgba(94, 232, 181, .10) !important;
  border-color: rgba(94, 232, 181, .26) !important;
  color: #c7ffe8 !important;
}

.status-warning,
.update-state-warning,
.inline-warning {
  background: rgba(255, 209, 102, .10) !important;
  border-color: rgba(255, 209, 102, .25) !important;
  color: #ffe6a3 !important;
}

.notification-button,
button,
.secondary-action-button,
.auth-primary-button,
input,
select,
textarea {
  border-color: rgba(121, 171, 230, .22) !important;
}

.auth-primary-button,
button:not(:disabled):not(.secondary-action-button) {
  background: linear-gradient(135deg, #64e5b3, #66c8ff) !important;
  color: #06131c !important;
  box-shadow: none !important;
}

.secondary-action-button,
input,
select,
textarea {
  background: rgba(7, 17, 29, .78) !important;
  color: var(--gekko-text) !important;
}

.status-dot {
  background: var(--gekko-accent) !important;
  box-shadow: 0 0 0 4px rgba(94,232,181,.13) !important;
}

/* Mobile: plus compact, moins “pavé”, texte technique moins dominant. */
@media (max-width: 760px) {
  .topbar {
    min-height: 64px !important;
    padding: 10px 14px !important;
  }

  .page-container {
    padding: 20px 14px 86px !important;
  }

  .hero {
    gap: 14px !important;
    margin-bottom: 18px !important;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 42px) !important;
    line-height: 1.04 !important;
    letter-spacing: -.045em !important;
  }

  .hero p {
    font-size: 17px !important;
    line-height: 1.55 !important;
  }

  .widget-grid,
  .stats-grid,
  .module-grid {
    gap: 12px !important;
  }

  .widget-card,
  .stat-card,
  .module-card,
  .panel,
  .notification-card {
    border-radius: 18px !important;
    padding: 18px !important;
  }

  .widget-card,
  .stat-card {
    min-height: auto !important;
  }

  .widget-label,
  .eyebrow {
    font-size: 11px !important;
    letter-spacing: .09em !important;
  }

  .widget-card strong,
  .stat-card strong,
  .big,
  .metric {
    font-size: clamp(31px, 9.5vw, 42px) !important;
    line-height: 1.04 !important;
  }

  .widget-card p,
  .module-card p,
  .panel p {
    font-size: 15.5px !important;
    line-height: 1.45 !important;
  }

  .module-card h2,
  .panel h2,
  .notification-card h2 {
    font-size: 23px !important;
    line-height: 1.12 !important;
  }

  /* Les contrats techniques restent visibles mais moins agressifs. */
  .module-card small,
  .panel small,
  .module-state,
  code,
  .mono-wrap,
  dl dd,
  dl dt {
    overflow-wrap: anywhere !important;
  }

  .module-state,
  .nav-item-badge,
  .availability-badge,
  .readonly-badge,
  .tag {
    font-size: 10px !important;
  }
}

/* Subtle Gordon-style finance backdrop. Local stylized asset, no external photo. */
body::after {
  content: "";
  position: fixed;
  right: max(-80px, -8vw);
  bottom: 72px;
  width: min(42vw, 420px);
  height: min(66vh, 620px);
  pointer-events: none;
  z-index: 0;
  opacity: .18;
  background: url('/gekko-gordon-bg.svg?v=20260925') right bottom / contain no-repeat;
  filter: saturate(1.05);
}

.app-shell, .main-area, .topbar, .page-container, .sidebar {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  body::after {
    width: 78vw;
    height: 52vh;
    right: -34vw;
    bottom: 92px;
    opacity: .105;
  }
}

/* User-selected Gordon Gekko photo background. */
body::after { display: none !important; }

/* Gordon photo visibility layer: mobile-safe fixed backdrop. */
html, body { background: #07111d !important; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0 !important;
  pointer-events: none;
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(5, 13, 23, .48), rgba(5, 13, 23, .72)),
    url('/gordon-gekko-background.jpg?v=20260927-visible') center 18% / cover no-repeat !important;
}
#root, .app-shell, .main-area, .topbar, .page-container, .sidebar, .auth-screen {
  position: relative;
  z-index: 1;
}

/* Gordon photo watermark: intentionally visible over dense mobile layouts. */
body::after {
  content: "";
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .20;
  width: auto;
  height: auto;
  background: url('/gordon-gekko-background.jpg?v=20260927-watermark') center 18% / cover no-repeat !important;
  filter: saturate(.9) contrast(1.08);
}
