/* =========================================================================
   ForexBrokerReview — Page Management Platform
   Design system: refined enterprise dark UI. Bricolage Grotesque + Manrope.
   ========================================================================= */

:root {
  /* base — deep ink */
  --bg:        #07080b;
  --bg-2:      #0b0d12;
  --surface:   #101319;
  --surface-2: #151922;
  --elevated:  #1a1f2b;
  --line:      #232a37;
  --line-2:    #2e3646;

  /* text */
  --text:   #eef1f6;
  --text-2: #aab3c2;
  --text-3: #6f7a8c;

  /* accent — emerald */
  --acc:     #10b981;
  --acc-2:   #34d8a0;
  --acc-dim: rgba(16, 185, 129, .12);
  --acc-line: rgba(16, 185, 129, .32);

  /* facebook brand (only for the official connect button) */
  --fb: #1877f2;

  /* semantic */
  --ok:     #34d399;
  --warn:   #fbbf24;
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, .12);

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 1px 0 rgba(255,255,255,.03) inset, 0 20px 40px -24px rgba(0,0,0,.8);
  --shadow-lg: 0 40px 80px -32px rgba(0,0,0,.85);

  --font-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* atmospheric backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(16,185,129,.10), transparent 60%),
    radial-gradient(1100px 700px at 110% 10%, rgba(52,120,242,.08), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}

a { color: var(--acc-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--acc); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: .86em; }

/* ---------- brand mark ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--text); }
.logo .glyph {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--acc), #0e9e73);
  box-shadow: 0 6px 18px -6px var(--acc-line), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.logo .glyph svg { width: 18px; height: 18px; display: block; }
.logo b { color: var(--acc-2); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
  color: #04140d; background: linear-gradient(180deg, var(--acc-2), var(--acc));
  box-shadow: 0 8px 22px -10px var(--acc-line);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px var(--acc-line); }
.btn:active { transform: translateY(0); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--text-3); background: rgba(255,255,255,.03); }
.btn.fb { background: var(--fb); color: #fff; box-shadow: 0 8px 22px -10px rgba(24,119,242,.6); }
.btn.fb:hover { background: #2a85f5; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(248,113,113,.3); box-shadow: none; }
.btn.danger:hover { background: var(--danger-dim); }

/* ---------- forms ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 0 7px; letter-spacing: .01em; }
.field { margin-bottom: 16px; }
input, textarea, select {
  width: 100%; font-family: var(--font-body); font-size: 14.5px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--acc-line); background: var(--surface);
  box-shadow: 0 0 0 4px var(--acc-dim);
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236f7a8c' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }

/* ---------- cards / panels ---------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card > .card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.card h2 { font-size: 16px; }
.card .sub { color: var(--text-3); font-size: 13px; margin-top: 3px; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.pill.on { color: var(--ok); border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.08); }
.pill.off { color: var(--text-3); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ---------- notice ---------- */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; border: 1px solid; display: flex; gap: 9px; align-items: center; }
.notice.ok { color: var(--ok); border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.07); }
.notice.err { color: var(--danger); border-color: rgba(248,113,113,.3); background: var(--danger-dim); }

/* =========================================================================
   AUTH (login) — split layout
   ========================================================================= */
.auth-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-brand {
  position: relative; padding: 48px 56px; display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(16,185,129,.10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  overflow: hidden;
}
.auth-brand .headline { font-size: clamp(34px, 4vw, 52px); line-height: 1.02; margin: auto 0 0; max-width: 12ch; }
.auth-brand .headline .accent { color: var(--acc-2); }
.auth-brand .lede { color: var(--text-2); font-size: 16px; margin: 20px 0 34px; max-width: 46ch; }
.auth-brand .features { list-style: none; padding: 0; margin: 0 0 auto; display: grid; gap: 14px; }
.auth-brand .features li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 14.5px; }
.auth-brand .features .ic { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--acc-dim); border: 1px solid var(--acc-line); color: var(--acc-2); }
.auth-brand .stats { display: flex; gap: 40px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.auth-brand .stats .n { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--acc-2); letter-spacing: -.02em; }
.auth-brand .stats .l { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }

.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 30px; margin-bottom: 6px; }
.auth-card .muted { color: var(--text-3); margin: 0 0 28px; }
.auth-foot { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-3); text-align: center; }
.auth-foot a { color: var(--text-2); }
.auth-foot .links { display: flex; gap: 16px; justify-content: center; margin-bottom: 10px; }

/* =========================================================================
   APP SHELL (dashboard + legal + landing)
   ========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: rgba(9,11,15,.72); backdrop-filter: saturate(140%) blur(14px);
}
.topbar .right { display: flex; align-items: center; gap: 14px; }
.topbar .who { font-size: 13px; color: var(--text-3); }
.topbar .who b { color: var(--text-2); font-weight: 600; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 32px 28px 64px; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--text-3); margin: 6px 0 0; }

.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* stat card */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .k { font-size: 12.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; display: flex; align-items: center; gap: 8px; }
.stat .v { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.stat .v.accent { color: var(--acc-2); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 600; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .mono { color: var(--text); background: var(--bg); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty { color: var(--text-3); font-size: 14px; padding: 8px 0 4px; }

.log-list { display: flex; flex-direction: column; max-height: 380px; overflow: auto; }
.log-item { display: grid; grid-template-columns: 150px 180px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.log-item:last-child { border-bottom: 0; }
.log-item .t { color: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; }
.log-item .ty { color: var(--acc-2); font-family: var(--font-mono); font-size: 12px; }
.log-item .d { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.inline { display: inline; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* =========================================================================
   LANDING (public info page for reviewers)
   ========================================================================= */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; max-width: 1080px; margin: 0 auto; }
.hero { max-width: 1080px; margin: 0 auto; padding: 64px 28px 40px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--acc-2); background: var(--acc-dim); border: 1px solid var(--acc-line); padding: 5px 12px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1; max-width: 16ch; }
.hero h1 .accent { color: var(--acc-2); }
.hero p { color: var(--text-2); font-size: 18px; max-width: 60ch; margin: 22px 0 30px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

.section { max-width: 1080px; margin: 0 auto; padding: 40px 28px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 22px; }
.feature { display: flex; flex-direction: column; gap: 12px; }
.feature .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--acc-dim); border: 1px solid var(--acc-line); color: var(--acc-2); }
.feature h3 { font-size: 17px; }
.feature p { color: var(--text-3); font-size: 14px; margin: 0; }

.perm-table td .mono { font-size: 12.5px; }
.perm-table td:first-child { width: 32%; }

.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer .inner { max-width: 1080px; margin: 0 auto; padding: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--text-3); font-size: 13px; }
.footer .links { display: flex; gap: 20px; }

/* legal prose */
.prose { max-width: 760px; margin: 0 auto; padding: 48px 28px 80px; }
.prose h1 { font-size: 34px; margin-bottom: 8px; }
.prose .updated { color: var(--text-3); font-size: 13px; margin-bottom: 32px; }
.prose h3 { font-size: 18px; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin: 6px 0; }

/* ---------- site nav (sticky, landing) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9,11,15,.7); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-nav .inner { max-width: 1080px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; }
.site-nav .links { display: flex; align-items: center; gap: 26px; }
.site-nav .links a:not(.btn) { color: var(--text-2); font-size: 14px; font-weight: 500; }
.site-nav .links a:not(.btn):hover { color: var(--text); }
@media (max-width: 720px) { .site-nav .links a:not(.btn) { display: none; } }

/* ---------- hero with product preview ---------- */
.hero-2 { max-width: 1080px; margin: 0 auto; padding: 72px 28px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero-2 .copy h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; }
.hero-2 .copy h1 .accent { color: var(--acc-2); }
.hero-2 .copy p { color: var(--text-2); font-size: 17px; margin: 20px 0 28px; max-width: 48ch; }
@media (max-width: 860px) { .hero-2 { grid-template-columns: 1fr; padding-top: 44px; } .hero-2 .preview { order: -1; } }

/* product preview mock */
.preview {
  background: linear-gradient(180deg, var(--elevated), var(--surface));
  border: 1px solid var(--line-2); border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow-lg); transform: perspective(1400px) rotateY(-9deg) rotateX(3deg);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.preview:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.preview .bar { display: flex; gap: 6px; padding: 4px 6px 12px; }
.preview .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.preview .pane { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.preview .tiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.preview .tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.preview .tile .n { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--acc-2); }
.preview .tile.blue .n { color: #6ba8ff; }
.preview .tile .l { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.preview .chat { display: flex; flex-direction: column; gap: 7px; }
.preview .msg { max-width: 78%; padding: 8px 11px; border-radius: 12px; font-size: 11.5px; line-height: 1.4; }
.preview .msg.in { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); border-bottom-left-radius: 4px; }
.preview .msg.out { align-self: flex-end; background: linear-gradient(180deg, var(--acc-2), var(--acc)); color: #04140d; border-bottom-right-radius: 4px; font-weight: 500; }
.preview .tag { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--text-3); margin-top: 4px; }
.preview .tag .d { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }

/* how it works steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--acc-2); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--acc-dim); border: 1px solid var(--acc-line); margin-bottom: 14px; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--text-3); font-size: 14px; margin: 0; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

/* demo/video band */
.band { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .inner { max-width: 1080px; margin: 0 auto; padding: 44px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band h2 { font-size: 24px; max-width: 22ch; }
.band p { color: var(--text-3); margin: 8px 0 0; max-width: 46ch; }

/* =========================================================================
   motion
   ========================================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.reveal.d1 { animation-delay: .06s; }
.reveal.d2 { animation-delay: .12s; }
.reveal.d3 { animation-delay: .18s; }
.reveal.d4 { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }

/* =========================================================================
   responsive
   ========================================================================= */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .log-item { grid-template-columns: 1fr; gap: 2px; }
}
