/* Mintara EWP members' dashboard. Brand: mintara.ae (slate navy, sky accent, Inter).
   Everything is scoped under .ewp so it can live inside any WordPress theme. */
.ewp {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.3);
  --text: #f8fafc;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.14);
  --long: #22c55e;
  --long-soft: rgba(34, 197, 94, 0.14);
  --short: #f43f5e;
  --short-soft: rgba(244, 63, 94, 0.14);
  --prime: #22c55e;
  --strong: #0ea5e9;
  --watch: #eab308;
  --low: #64748b;
  --rr0: #ef4444; --rr1: #f59e0b; --rr2: #84cc16; --rr3: #22c55e;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.ewp *, .ewp *::before, .ewp *::after { box-sizing: border-box; }
.ewp button { font: inherit; color: inherit; cursor: pointer; }
.ewp a { color: var(--accent); text-decoration: none; }
.ewp a:hover { text-decoration: underline; }
.ewp-wrap { max-width: 1280px; margin: 0 auto; padding: 24px 20px 48px; }

/* header */
.ewp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ewp-brand { display: flex; align-items: center; gap: 12px; }
.ewp-logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #0ea5e9, #6366f1); box-shadow: 0 0 24px rgba(14,165,233,.35); font-weight: 800; }
.ewp-brand h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.ewp-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.ewp-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ewp-asof { color: var(--muted); font-size: 13px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; }
.ewp-asof b { color: var(--text); font-weight: 600; }

/* buttons, chips, segmented controls */
.ewp-btn { border: 1px solid var(--line-strong); background: var(--panel); border-radius: 10px; padding: 8px 14px; font-size: 14px; }
.ewp-btn:hover { border-color: var(--accent); }
.ewp-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ewp-menu { position: relative; }
.ewp-menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--panel-solid);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; z-index: 30; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.ewp-menu-list a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.ewp-menu-list a:hover { background: var(--accent-soft); text-decoration: none; }
.ewp-menu-list small { display: block; color: var(--muted); padding: 6px 12px 4px; font-size: 12px; }

.ewp-modules { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ewp-chip { border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--muted); }
.ewp-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.ewp-chip.locked { opacity: .55; }
.ewp-chip .n { color: var(--faint); margin-left: 6px; font-size: 12px; }

.ewp-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.ewp-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; padding: 3px; background: var(--panel); }
.ewp-seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 14px; color: var(--muted); }
.ewp-seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.ewp-search { flex: 1 1 200px; max-width: 280px; margin-left: auto; position: relative; }
.ewp-search input { width: 100%; background: var(--panel); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: 10px; padding: 8px 12px 8px 34px; font: inherit; font-size: 14px; }
.ewp-search input:focus { outline: none; border-color: var(--accent); }
.ewp-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }

/* KPI strip */
.ewp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.ewp-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.ewp-kpi > span { color: var(--muted); font-size: 13px; }
.ewp-kpi b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.ewp-kpi small { color: var(--faint); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ewp-kpi, .ewp-card, .ewp-card-top > div { min-width: 0; }

.ewp-section-title { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.ewp-section-title h2 { font-size: 17px; margin: 0; }
.ewp-section-title span { color: var(--muted); font-size: 13px; }

/* top setups */
.ewp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.ewp-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: left;
  display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, transform .15s; }
.ewp-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.ewp-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ewp-sym { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ewp-name { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewp-signal { font-weight: 600; font-size: 14px; }
.ewp-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.ewp-levels div span { display: block; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.ewp-levels div b { font-size: 14px; font-weight: 600; }
.ewp-levels div em { font-style: normal; font-size: 12px; margin-left: 4px; }
.ewp-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* score ring */
.ewp-ring { --v: 0; --c: var(--accent); width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), rgba(148,163,184,.15) 0); }
.ewp-ring b { width: 36px; height: 36px; border-radius: 50%; background: var(--panel-solid); display: grid; place-items: center; font-size: 14px; }

/* badges */
.ewp-dir { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ewp-dir.long { color: var(--long); background: var(--long-soft); }
.ewp-dir.short { color: var(--short); background: var(--short-soft); }
.ewp-dir.none { color: var(--muted); background: rgba(148,163,184,.12); }
.ewp-band { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ewp-band.prime { color: var(--prime); } .ewp-band.strong { color: var(--strong); }
.ewp-band.watch { color: var(--watch); } .ewp-band.low { color: var(--low); }
.ewp-rr { display: inline-block; min-width: 46px; text-align: center; padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; color: #fff; }
.ewp-rr.b0 { background: var(--rr0); } .ewp-rr.b1 { background: var(--rr1); } .ewp-rr.b2 { background: var(--rr2); } .ewp-rr.b3 { background: var(--rr3); }
.ewp-rr.none { background: transparent; color: var(--faint); font-weight: 500; }
.ewp-tf { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.up { color: var(--long); } .down { color: var(--short); }

/* table */
.ewp-table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ewp-table { width: 100%; border-collapse: collapse; }
.ewp-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.ewp-table th[data-sort] { cursor: pointer; }
.ewp-table th[data-sort]:hover { color: var(--text); }
.ewp-table th .arrow { opacity: .8; margin-left: 4px; }
.ewp-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.ewp-table tbody tr { cursor: pointer; }
.ewp-table tbody tr:hover { background: rgba(14,165,233,.06); }
.ewp-table tbody tr:last-child td { border-bottom: 0; }
.ewp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ewp-table .sym b { display: block; }
.ewp-table .sym span { color: var(--muted); font-size: 12px; }
.ewp-scorebar { display: flex; align-items: center; gap: 8px; }
.ewp-scorebar i { display: block; width: 46px; height: 6px; border-radius: 4px; background: rgba(148,163,184,.15); overflow: hidden; }
.ewp-scorebar i::after { content: ""; display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--c); }
.ewp-more { display: block; width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--accent); font-size: 14px; }
.ewp-empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* drawer */
.ewp-overlay { position: fixed; inset: 0; background: rgba(2,6,23,.6); backdrop-filter: blur(2px); z-index: 50; }
.ewp-drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(620px, 100%); background: var(--panel-solid);
  border-left: 1px solid var(--line-strong); z-index: 51; overflow-y: auto; padding: 22px; box-shadow: -20px 0 50px rgba(0,0,0,.4); }
.ewp-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ewp-drawer-head h3 { margin: 0; font-size: 24px; }
.ewp-close { border: 1px solid var(--line-strong); background: transparent; border-radius: 9px; width: 36px; height: 36px; font-size: 18px; }
.ewp-chart { width: 100%; height: 340px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0b1220; margin: 14px 0; }
.ewp-chart iframe { width: 100%; height: 100%; border: 0; }
/* full-window symbol view: chart fills the screen, the rest stays readable width */
.ewp-drawer.wide { width: 100%; border-left: 0; box-shadow: none; padding: 22px max(22px, calc((100% - 1400px) / 2)); }
.ewp-drawer.wide .ewp-chart { height: max(420px, calc(100vh - 190px)); }
.ewp-drawer.wide .ewp-chart-off { height: auto; }
.ewp-wide-btn { font-size: 17px; line-height: 1; }
.ewp-chart-off { height: auto; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ewp-chart-off p { margin: 0; color: var(--muted); }
/* own chart (UAE / PSX): Lightweight Charts under a small Daily/Weekly bar */
.ewp-own { display: flex; flex-direction: column; }
.ewp-own-msg { margin: auto; color: var(--faint); font-size: 14px; }
.ewp-own-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ewp-own-tf button { padding: 4px 10px; font-size: 13px; }
.ewp-own-key { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ewp-own-key i { display: inline-block; width: 14px; height: 0; border-top: 2px solid; margin-left: 6px; }
.ewp-own-key .k-px { border-top: 2px dashed #94a3b8; margin-left: 0; }
.ewp-own-key .k-tg { border-color: #22c55e; }
.ewp-own-key .k-st { border-color: #ef4444; }
.ewp-own-canvas { flex: 1 1 auto; min-height: 0; position: relative; }
.ewp-explain { background: var(--accent-soft); border: 1px solid rgba(14,165,233,.3); border-radius: 12px; padding: 14px; }
.ewp-explain h4 { margin: 0 0 6px; font-size: 16px; }
.ewp-explain p { margin: 0; color: #cbd5e1; }
.ewp-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(234,179,8,.1); border: 1px solid rgba(234,179,8,.3); color: #fde68a; font-size: 13px; }
.ewp-trade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.ewp-trade div { background: rgba(148,163,184,.06); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ewp-trade span { display: block; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.ewp-trade b { font-size: 16px; }
.ewp-trade em { display: block; font-style: normal; font-size: 12px; }
.ewp-targets { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.ewp-targets li { display: flex; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ewp-targets li:last-child { border-bottom: 0; }
.ewp-targets li span { color: var(--muted); }
.ewp-sub { margin: 18px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ewp-tech { color: var(--faint); font-size: 12px; margin-top: 14px; }
/* alternate count (prototype) */
.ewp-alts { display: grid; gap: 10px; }
.ewp-alt { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: rgba(148,163,184,.04); }
.ewp-alt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ewp-alt-head small { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.ewp-rel { font-size: 12px; color: var(--muted); }
.ewp-rel.agree { color: var(--long); }
.ewp-rel.oppose { color: #fbbf24; }
.ewp-alt-sig { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ewp-alt p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.ewp-alt-lv { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ewp-alt-lv b { color: var(--text); font-weight: 600; }
.ewp-alt-foot { margin-top: 8px; font-size: 12px; color: var(--faint); }

.ewp-foot { margin-top: 32px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.ewp-loading { padding: 80px 20px; text-align: center; color: var(--muted); }

@media (max-width: 960px) {
  .ewp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ewp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ewp-table .hide-md { display: none; }
}
@media (max-width: 640px) {
  .ewp-wrap { padding: 16px 16px 40px; }
  .ewp-cards { grid-template-columns: minmax(0, 1fr); }
  .ewp-brand p { font-size: 12px; }
  .ewp-kpi b { font-size: 22px; }
  .ewp-search { max-width: none; margin-left: 0; flex-basis: 100%; }
  .ewp-table .hide-sm { display: none; }
  .ewp-table td, .ewp-table th { padding: 10px 8px; }
  .ewp-table .num span { display: block; font-size: 12px; }
  .ewp-trade { grid-template-columns: repeat(2, 1fr); }
  .ewp-chart { height: 280px; }
}

/* ---- view tabs (Today's setups | Performance) ---- */
.ewp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.ewp-tabs button { border: 0; background: transparent; padding: 10px 16px; font-size: 15px; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ewp-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.ewp-tabs button:hover { color: var(--text); }
.ewp-addon { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fde68a;
  background: rgba(234,179,8,.14); border: 1px solid rgba(234,179,8,.35); border-radius: 999px; padding: 2px 7px; margin-left: 6px; vertical-align: middle; }

/* ---- performance ---- */
.ewp-lead { color: var(--muted); margin: -4px 0 18px; max-width: 820px; }
.ewp-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ewp-story { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 16px; margin: -10px 0 22px; color: #cbd5e1; }
.ewp-controls-tight { margin-bottom: 14px; }
.ewp-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ewp-status.st-target { color: #fff; background: #16a34a; }
.ewp-status.st-stopped { color: #fff; background: #dc2626; }
.ewp-status.st-run_up { color: var(--long); background: var(--long-soft); }
.ewp-status.st-run_down { color: #fbbf24; background: rgba(245,158,11,.14); }
.ewp-status.st-done_up { color: #bbf7d0; background: rgba(34,197,94,.22); }
.ewp-status.st-done_down { color: #fecaca; background: rgba(239,68,68,.22); }
/* public track record (visitors): intro + the way in */
.ewp-public-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 16px; margin: 0 0 18px; }
.ewp-public-head h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }
.ewp-public-head p { margin: 0; color: var(--muted); max-width: 760px; }
.ewp-public-head .ewp-btn-primary { display: inline-block; padding: 11px 20px; color: #fff; white-space: nowrap; }
.ewp-public-head .ewp-btn-primary:hover { text-decoration: none; filter: brightness(1.08); }
@media (max-width: 960px) { .ewp-kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* chart report (PDF), paid plans - since 1.6.0 */
.ewp-report { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14,165,233,.05); }
.ewp-report span { color: var(--muted); font-size: 13px; }
.ewp-report button[disabled] { opacity: .6; cursor: progress; }

/* Performance stands out (1.7.0): the members' tab and the visitors' heading */
.ewp-tabs button.ewp-tab-perf { display: inline-flex; align-items: center; gap: 7px; }
.ewp-tab-perf i, .ewp-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.ewp-tab-perf small { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #bbf7d0;
  background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.4); border-radius: 999px; padding: 1px 7px; }
.ewp-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #86efac; margin-bottom: 4px; }
@media (max-width: 640px) { .ewp-tab-perf small { display: none; } }
