/* EagleFX design system — shared by the website, the client area and the web trader.
   Light mode only for now. Brand colours are placeholders until the logo arrives: change --brand / --accent here. */

@font-face {
  font-family: "EFX Sans";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "EFX Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* Surfaces: warm paper greys, darkest at the back */
  --bg-canvas: #e9e8e2;
  --bg-default: #f2f1ee;
  --bg-card: #f7f6f4;
  --bg-raised: #fbfbf9;
  --bg-white: #ffffff;
  --bg-tint: #e4e3dc;
  --bg-tint-strong: #d8d7cf;
  --bg-inverse: #1c1c1c;
  --bg-inverse-hover: #303030;

  /* Ink */
  --text-primary: #1c1c1c;
  --text-secondary: #474747;
  --text-tertiary: #85857a;
  --text-faint: #a7a79f;
  --text-inverse: #f7f6f4;

  /* Lines */
  --border-subtle: #e2e1da;
  --border-default: #d2d1c9;
  --border-strong: #a7a79f;

  /* Market colours */
  --positive: #0f7655;
  --positive-chart: #0ba876;
  --positive-subtle: rgba(112, 214, 175, 0.24);
  --positive-bar: rgba(11, 168, 118, 0.16);
  --negative: #b8442f;
  --negative-chart: #e8695e;
  --negative-subtle: rgba(242, 90, 74, 0.16);
  --negative-bar: rgba(242, 90, 74, 0.16);

  /* Brand (placeholder until the logo arrives) */
  --brand: #1c1c1c;
  --accent: #c08a2c;
  --accent-subtle: rgba(192, 138, 44, 0.14);

  --warning: #b7791f;
  --info: #2f5f8a;

  --font-sans: "EFX Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "EFX Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  --shadow-pop: 0 8px 28px rgba(28, 28, 28, 0.10), 0 1px 2px rgba(28, 28, 28, 0.06);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(28, 28, 28, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-primary);
  background: var(--bg-default);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }

.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.up { color: var(--positive); }
.down { color: var(--negative); }
.muted { color: var(--text-secondary); }
.faint { color: var(--text-tertiary); }
.caps { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 500; }

/* ---- Logo: EagleFX's eagle and lettering (traced from the old site's logo), drawn in currentColor ---- */
.efx-logo { --h: 30px; display: inline-flex; align-items: center; gap: calc(var(--h) * .22); color: var(--brand); line-height: 0; }
.efx-logo .m, .efx-logo .w { display: block; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.efx-logo .m { --src: url("brand/eagle-mark.svg"); height: var(--h); width: calc(var(--h) * 134 / 121); }
.efx-logo .w { --src: url("brand/eagle-wordmark.svg"); height: calc(var(--h) * .5); width: calc(var(--h) * .5 * 179 / 43); margin-top: calc(var(--h) * .12); }
.efx-logo.sm { --h: 24px; }
.efx-logo.lg { --h: 40px; }
.efx-logo.mark-only .w { display: none; }
.efx-logo.on-dark { color: var(--text-inverse); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); background: var(--bg-raised);
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--bg-white); border-color: var(--border-strong); }
.btn-primary { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.btn-primary:hover { background: var(--bg-inverse-hover); border-color: var(--bg-inverse-hover); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-tint); border-color: transparent; }
.btn-buy { background: var(--positive); color: #fff; border-color: var(--positive); }
.btn-sell { background: var(--negative); color: #fff; border-color: var(--negative); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---- Form fields ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.input {
  height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); background: var(--bg-white); outline: none; width: 100%;
}
.input:focus { border-color: var(--text-primary); box-shadow: 0 0 0 3px var(--bg-tint); }
.input-group { display: flex; align-items: center; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-white); height: 38px; }
.input-group input { border: 0; outline: none; background: transparent; flex: 1; min-width: 0; padding: 0 10px; height: 100%; }
.input-group .addon { padding: 0 10px; color: var(--text-tertiary); font-size: 12px; white-space: nowrap; }

/* ---- Cards, tags, tabs ---- */
.card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border-subtle); }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--radius-xs); font-size: 11px; font-weight: 500; background: var(--bg-tint); color: var(--text-secondary); }
.tag-live { background: var(--positive-subtle); color: var(--positive); }
.tag-demo { background: var(--accent-subtle); color: #8a611b; }
.tag-warn { background: rgba(183, 121, 31, .14); color: var(--warning); }
.tag-down { background: var(--negative-subtle); color: var(--negative); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.tabs { display: flex; gap: 2px; }
.tab { padding: 6px 10px; font-size: 12px; font-weight: 500; color: var(--text-tertiary); border-radius: var(--radius-xs); background: none; border: 0; text-transform: uppercase; letter-spacing: .04em; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-primary); background: var(--bg-tint); }
.seg { display: inline-flex; padding: 2px; background: var(--bg-tint); border-radius: var(--radius-sm); }
.seg button { border: 0; background: none; padding: 5px 12px; font-size: 12px; font-weight: 500; border-radius: var(--radius-xs); color: var(--text-secondary); }
.seg button.active { background: var(--bg-white); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table tbody tr:hover { background: var(--bg-raised); }

/* ---- Instrument icon (placeholder flags/initials) ---- */
.sym-ico { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; flex: none; }
.sym-pair { position: relative; width: 26px; height: 20px; flex: none; }
.sym-pair .sym-ico { position: absolute; width: 18px; height: 18px; border: 1.5px solid var(--bg-card); font-size: 8px; }
.sym-pair .sym-ico:first-child { left: 0; top: 0; }
.sym-pair .sym-ico:last-child { left: 9px; top: 2px; }

/* ---- Template marker: shows that a page is a design template, not wired up ---- */
.tpl-note { position: fixed; right: 12px; bottom: 12px; z-index: 50; font-size: 11px; background: var(--bg-inverse); color: var(--text-inverse); padding: 6px 10px; border-radius: var(--radius-sm); opacity: .82; }
