:root{
  --bg:#0b0f17;
  --card: rgba(17,24,39,.78);
  --muted:#94a3b8;
  --text:#e5e7eb;
  --line: rgba(148,163,184,.18);
  --line2: rgba(148,163,184,.26);
  --accent:#7dd3fc;
  --bad:#fb7185;
  --good:#86efac;
  --shadow: 0 18px 50px rgba(0,0,0,.18);
  --field: rgba(0,0,0,.22);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1100px 700px at 15% 10%, #0f1b3a 0%, var(--bg) 58%) fixed;
  color:var(--text);
}
.wrap{max-width:1180px;margin:0 auto;padding:18px}
.header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:4px}
.brand{display:flex; gap:12px; align-items:center}
.brandmark{
  width:46px;height:46px;border-radius:14px;
  display:grid;place-items:center;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line2);
  overflow:hidden;
}
.brandmark img{width:100%;height:100%;object-fit:cover}
h1{margin:0;font-size:20px;line-height:1.2;letter-spacing:.2px}
.sub{margin:4px 0 0;color:var(--muted);font-size:13px}
.status{
  padding:9px 10px;border-radius:12px;border:1px solid var(--line2);
  color:var(--muted); font-size:13px; white-space:nowrap;
  background: rgba(255,255,255,.03);
}
.status.good{border-color: rgba(134,239,172,.26); color: var(--good);}
.status.bad{border-color: rgba(251,113,133,.26); color: var(--bad);}

.overview{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:14px;
  margin: 12px 0 16px;
}
.ov-card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.ov-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.ov-title{font-size:12px;color:var(--muted);font-weight:800;letter-spacing:.35px;text-transform:uppercase}
.ov-more{color:rgba(148,163,184,.85);font-weight:700;font-size:12px}
.ov-list{display:flex;flex-direction:column;gap:9px}
.ov-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:9px 10px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(148,163,184,.16);
  border-radius:14px;
  cursor:pointer;
  transition: transform .08s ease, border-color .12s ease;
}
.ov-row:hover{transform: translateY(-1px); border-color: rgba(125,211,252,.22)}
.ov-left{display:flex;gap:10px;align-items:center}
.icon{
  width:26px;height:26px;border-radius:9px;
  border:1px solid rgba(148,163,184,.18);
  background: rgba(0,0,0,.18);
}
.ov-sym{font-weight:500;letter-spacing:.12px;font-size:12px} /* thinner */
.ov-right{display:flex;gap:12px;align-items:baseline}
.ov-price{color:var(--text);font-variant-numeric:tabular-nums;font-weight:520}
.ov-chg{font-variant-numeric:tabular-nums;font-weight:560;font-size:12px}
.ov-chg.pos{color:var(--good)}
.ov-chg.neg{color:var(--bad)}

.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  box-shadow: var(--shadow);
  margin-bottom:16px;
  backdrop-filter: blur(8px);
}
.card-head{
  padding:14px 16px 10px;
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  flex-wrap:wrap;
}
.card-head h2{margin:0;font-size:16px;letter-spacing:.2px}
.hint{color:var(--muted);font-size:12px;margin-top:2px}
.head-left{display:flex;flex-direction:column;gap:2px}

.controls{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;justify-content:flex-end}
.ctl{display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--muted);font-weight:800;letter-spacing:.35px;text-transform:uppercase}
.ctl.inline{flex-direction:row;align-items:center;gap:10px}
select, input[type="search"]{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;

  background: var(--field);
  border:1px solid var(--line2);
  color:var(--text);
  padding:10px 12px;border-radius:12px;
  outline:none;
  font-size:13px;
}
select{
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(148,163,184,.9) 50%),
    linear-gradient(135deg, rgba(148,163,184,.9) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
select option{background: #0b1220;color: #e5e7eb;}
input[type="search"]{min-width:200px}
select:focus, input[type="search"]:focus{border-color: rgba(125,211,252,.32)}
.mini-select{padding:8px 10px;font-size:12px;border-radius:12px}

.seg{display:flex;gap:6px}
.segbtn{
  padding:10px 12px;border-radius:12px;
  border:1px solid var(--line2);
  background: var(--field);
  color:rgba(148,163,184,.95);
  cursor:pointer;font-weight:750;font-size:12px;
  transition: border-color .12s ease, transform .08s ease;
}
.segbtn:hover{transform: translateY(-1px); border-color: rgba(125,211,252,.22)}
.segbtn.active{color:var(--text); border-color: rgba(125,211,252,.35); box-shadow: 0 0 0 3px rgba(125,211,252,.08) inset}

.toggle{position:relative;display:inline-flex;align-items:center}
.toggle input{display:none}
.toggle .pill{
  width:44px;height:26px;border-radius:999px;
  background: var(--field);
  border:1px solid var(--line2);
  position:relative;
  cursor:pointer;
}
.toggle .pill::after{
  content:"";
  width:20px;height:20px;border-radius:999px;
  background: rgba(148,163,184,.9);
  position:absolute;top:2px;left:2px;
  transition: transform .16s ease, background .16s ease;
}
.toggle input:checked + .pill{border-color: rgba(125,211,252,.35)}
.toggle input:checked + .pill::after{
  transform: translateX(18px);
  background: rgba(125,211,252,.95);
}

/* OHLC top bar */
.ohlcbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  padding: 0 16px 10px;
  border-bottom: 1px solid rgba(148,163,184,.10);
}
.ohlc-left{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.pair{font-weight:300;letter-spacing:.2px}
.last{
  font-size:14px;
  font-weight:300;
  font-variant-numeric: tabular-nums;
}
.chg{font-weight:600;font-variant-numeric: tabular-nums}
.chg.pos{color: var(--good)}
.chg.neg{color: var(--bad)}

.ohlc-right{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;justify-content:flex-end}
.stat{color: rgba(148,163,184,.95); font-size:12px}
.stat strong{color: var(--text); font-weight:650; font-variant-numeric: tabular-nums; margin-left:4px}

.chartbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;
  padding: 10px 16px 0;
}
.chartbar-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.chartbar-right{display:flex;align-items:center}
.iconbtn{
  width:34px;height:34px;border-radius:12px;
  border:1px solid var(--line2);
  background: var(--field);
  color: var(--text);
  cursor:pointer;
  font-weight:780;
  transition: transform .08s ease, border-color .12s ease;
}
.iconbtn:hover{transform: translateY(-1px); border-color: rgba(125,211,252,.22)}
.slider{display:flex;align-items:center;gap:10px;padding:0 6px}
.slider input[type="range"]{width:150px}
.pan{display:flex;align-items:center;gap:8px}
.levels{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.small{font-size:12px}
.muted{color:var(--muted)}

.chart-wrap{padding:12px}
canvas{
  width:100%;
  height:auto;
  background: rgba(0,0,0,.14);
  border:1px solid rgba(148,163,184,.16);
  border-radius:16px;
}
.card-sub{
  display:flex; gap:18px; flex-wrap:wrap;
  padding:10px 16px 14px;
  border-top:1px solid var(--line);
}
.kv{display:flex;flex-direction:column;gap:4px}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:920px}
th, td{padding:12px 14px;border-top:1px solid var(--line);font-size:13px}
th{color:rgba(148,163,184,.9);text-align:left;font-weight:800;letter-spacing:.3px;text-transform:uppercase;background:rgba(0,0,0,.10);font-size:11px}
td.muted{color:var(--muted)}
.pos{color:var(--good);font-variant-numeric:tabular-nums}
.neg{color:var(--bad);font-variant-numeric:tabular-nums}
.foot{display:flex; justify-content:space-between; gap:12px;padding:12px 16px;border-top:1px solid var(--line); color:var(--muted)}

.row-asset{display:flex;align-items:center;gap:10px}
.row-asset img{width:22px;height:22px;border-radius:8px;border:1px solid rgba(148,163,184,.16);background: rgba(0,0,0,.18)}
.row-asset span{font-weight:520} /* thinner */

@media (max-width: 980px){
  .overview{grid-template-columns: repeat(2, minmax(0,1fr));}
}
@media (max-width: 560px){
  .overview{grid-template-columns: 1fr;}
  .header{flex-direction:column}
  .controls{width:100%;justify-content:space-between}
  input[type="search"]{flex:1; min-width: 0;}
  .slider input[type="range"]{width:120px}
}

.right{display:flex;align-items:center;gap:10px}

.status.ident{
  cursor:pointer;
  color: rgba(255,230,200,.98);
  border-color: rgba(251,146,60,.35);
  background: rgba(251,146,60,.10);
}
.status.ident:hover{ border-color: rgba(251,146,60,.55); }

/* Modal */
.modal{position:fixed;inset:0;display:none;z-index:50}
.modal.open{display:block}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55);backdrop-filter: blur(2px)}
.modal-card{
  position:relative;
  width:min(520px, calc(100% - 28px));
  margin: 70px auto;
  background: rgba(17,24,39,.92);
  border:1px solid rgba(148,163,184,.18);
  border-radius:20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
  padding:16px;
}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.modal-head h3{margin:6px 0 0;font-size:16px;letter-spacing:.2px}
.modal-sub{margin:6px 0 0;color:var(--muted);font-size:12px}
.modal-pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 10px;border-radius:999px;
  font-size:11px;font-weight:800;letter-spacing:.35px;text-transform:uppercase;
  color: rgba(255,230,200,.98);
  border:1px solid rgba(251,146,60,.35);
  background: rgba(251,146,60,.10);
}
.modal-form{margin-top:14px;display:flex;flex-direction:column;gap:12px}
.field{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.35px;text-transform:uppercase}
.field input{
  background: rgba(0,0,0,.22);
  border:1px solid rgba(148,163,184,.26);
  color:var(--text);
  padding:12px;border-radius:14px;
  font-size:13px;
}
.field input:focus{outline:none;border-color: rgba(251,146,60,.55)}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:6px;flex-wrap:wrap}
.btn{
  padding:10px 12px;border-radius:12px;
  border:1px solid rgba(251,146,60,.45);
  background: rgba(251,146,60,.12);
  color: rgba(255,230,200,.98);
  font-weight:800;cursor:pointer;
}
.btn:hover{border-color: rgba(251,146,60,.65)}
.btn.ghost{
  border-color: rgba(148,163,184,.26);
  background: rgba(0,0,0,.18);
  color: rgba(148,163,184,.95);
}
.modal-foot{margin-top:8px;color:var(--muted)}
.modal-close{height:34px;width:34px}

.ov-more-btn{
  border:none;
  background: transparent;
  color: rgba(148,163,184,.85);
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  padding:6px 8px;
  border-radius:10px;
  letter-spacing:.2px;
}
.ov-more-btn:hover{
  background: rgba(255,255,255,.04);
  color: rgba(226,232,240,.95);
}

.more-tools{margin-top:12px}
.more-tools input[type="search"]{width:100%}
.more-list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: 52vh;
  overflow:auto;
  padding-right:4px;
}
.more-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(148,163,184,.16);
  border-radius:14px;
  cursor:pointer;
}
.more-row:hover{border-color: rgba(125,211,252,.24)}
.more-left{display:flex;align-items:center;gap:10px;min-width:0}
.more-left .label{font-weight:650;letter-spacing:.12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.more-mid{margin-left:auto;font-variant-numeric:tabular-nums;font-weight:650}
.more-chg{font-variant-numeric:tabular-nums;font-weight:700}
.more-chg.pos{color:var(--good)}
.more-chg.neg{color:var(--bad)}


/* PATCH: brandmark = 2 logos visibles */
.brandmark{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;

  width:auto !important;
  height:auto !important;
  padding:0 !important;

  overflow:visible !important;
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
}

/* Si tes images étaient forcées en absolute par l'ancien style */
.brandmark img{
  position:static !important;
  inset:auto !important;
  transform:none !important;

  display:block !important;
  width:auto !important;
  max-width:none !important;
  object-fit:contain !important;
}

.brandmark .logo{ height:44px !important; }
.brandmark .logo-sub{ height:34px !important; opacity:.95; }

