/* Phostrade Academy — dark theme, red accents */
:root {
  --bg: #000;
  --panel: #0d0d0f;
  --panel-2: #151518;
  --line: #24242a;
  --text: #f2f2f3;
  --muted: #9a9aa3;
  --red: #E11D2E;
  --red-dark: #b01422;
  --green: #22c55e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--text); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
.red { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.inline { display: inline; }
.no-scroll { overflow: hidden; }

/* ---------- layout */
.container { max-width: 1240px; margin: 0 auto; padding: 24px 20px 64px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: #050506;
  position: sticky; top: 0; z-index: 20;
}
.topbar nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; color: var(--muted); }
.topbar nav a:hover { color: var(--text); }
.who { color: var(--muted); font-size: 13px; }
.brand { text-decoration: none; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.brand b { color: var(--red); }
.brand-mark {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  background: var(--red); color: #fff; font-weight: 800;
}
.brand-mark.big { width: 56px; height: 56px; font-size: 28px; border-radius: 14px; }

/* ---------- buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #3a3a42; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: #5a1a20; color: #ff6b77; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-block { width: 100%; }
label { display: block; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=number], textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #0a0a0c; color: var(--text); font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.check-label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }

/* ---------- flash */
.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 16px; border: 1px solid; }
.flash-ok { background: #0b1f12; border-color: #1e5132; color: #8ff0b0; }
.flash-err { background: #22090c; border-color: #5a1a20; color: #ff8a94; }

/* ---------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-page { background: radial-gradient(900px 500px at 50% -10%, rgba(225,29,46,.22), transparent 70%), #000; }
.login-card {
  width: 100%; max-width: 390px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand h1 { margin-top: 14px; font-size: 26px; }

/* ---------- dashboard */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.hero h1 { font-size: 28px; }
.hero p { margin: 0; }
progress.bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 99px; background: #222; overflow: hidden; }
progress.bar::-webkit-progress-bar { background: #222; border-radius: 99px; }
progress.bar::-webkit-progress-value { background: var(--red); border-radius: 99px; }
progress.bar::-moz-progress-bar { background: var(--red); border-radius: 99px; }
progress.bar.sm { height: 3px; }
.course { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.course summary { list-style: none; cursor: pointer; padding: 18px 20px; }
.course summary::-webkit-details-marker { display: none; }
.course-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; }
.course-head h2 { font-size: 19px; margin: 0; }
.course-desc { padding: 0 20px; color: var(--muted); white-space: pre-line; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: #2a2a30; color: var(--muted); font-weight: 600; vertical-align: middle; }
.tag-red { background: rgba(225,29,46,.18); color: #ff7a85; }
.tag-green { background: rgba(34,197,94,.15); color: #86efac; }

.lesson-list { list-style: none; margin: 0; padding: 0 0 8px; }
.lesson-list li a {
  display: grid; grid-template-columns: 32px 1fr auto; grid-template-rows: auto auto; column-gap: 12px;
  padding: 11px 20px; text-decoration: none; border-top: 1px solid var(--line);
}
.lesson-list li a:hover { background: var(--panel-2); }
.lesson-list .check {
  grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #1c1c21; color: var(--muted); font-size: 13px; font-weight: 700;
}
.lesson-list li.done .check { background: var(--red); color: #fff; }
.lesson-list .lt { font-weight: 500; }
.lesson-list .ld { font-size: 13px; }
.lesson-list progress { grid-column: 2 / 4; margin-top: 6px; }
.lesson-list.compact li a { padding: 9px 12px; grid-template-rows: auto; }
.lesson-list li.current a { background: #1a0b0d; box-shadow: inset 3px 0 0 var(--red); }

/* ---------- lesson page */
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.lesson-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 0 0; align-self: start; max-height: calc(100vh - 100px); overflow: auto; position: sticky; top: 76px; }
.lesson-side h3 { padding: 0 14px 8px; font-size: 15px; }
@media (max-width: 960px) { .lesson-layout { grid-template-columns: 1fr; } .lesson-side { position: static; max-height: none; } }

.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); user-select: none; -webkit-user-select: none;
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.no-video { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.stage:fullscreen, .stage:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; border: 0; }
.stage.pseudo-fs {
  position: fixed; inset: 0; z-index: 9999; width: 100vw; height: 100vh; height: 100dvh;
  aspect-ratio: auto; border-radius: 0; border: 0;
}

.wm {
  position: absolute; z-index: 5; pointer-events: none; left: 12px; top: 12px;
  color: rgba(255,255,255,.38); font-size: clamp(8px, .75vw, 10px); font-weight: 600; letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.65); white-space: nowrap;
  transition: left 4s ease-in-out, top 4s ease-in-out;
  user-select: none; -webkit-user-select: none;
}
.wm-faint { color: rgba(255,255,255,.14); font-size: clamp(7px, .65vw, 9px); }
/* sits exactly over the Bunny player's own full-screen icon (bottom-right of its control bar), which can't work:
   the iframe has no fullscreen permission so the watermark can never be left behind */
.fs-btn {
  position: absolute; z-index: 6; right: 6px; bottom: 6px; width: 44px; height: 40px; border-radius: 10px; padding: 0;
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); background: rgba(10,10,12,.82); color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.fs-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fs-btn .fs-out { display: none; }
.fs-btn.on .fs-in { display: none; } .fs-btn.on .fs-out { display: block; }
.fs-btn:hover, .fs-btn:focus-visible { background: var(--red); border-color: var(--red); }

.lesson-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 2px; flex-wrap: wrap; }
.lesson-title { font-size: 22px; margin: 0 0 4px; }
.pn { display: flex; gap: 10px; }
.notes { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.notes h2 { font-size: 16px; color: var(--red); }
.notes-body { white-space: pre-line; color: #d6d6db; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h2, .card h3 { font-size: 16px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #08080a; }
tr:last-child td { border-bottom: 0; }
tr.inactive td { opacity: .5; }
tr.flagged td { background: #1a0709; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.search { display: flex; gap: 8px; }
.search input { margin: 0; min-width: 240px; }
.thumb { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: #111; display: block; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }
.warn { border-color: #5a1a20; }
td.actions { display: table-cell; white-space: nowrap; }
td.actions > * { margin: 2px 2px 2px 0; }
td { white-space: normal; }

/* =====================================================================
   GLASS STUDENT UI — layout from the reference dashboard,
   motion from the reference video (blur-in words, staggered reveals, glows)
   ===================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }

:root {
  --ease: cubic-bezier(.2,.8,.2,1);
  --glass: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.03));
  --glass-line: rgba(255,255,255,.09);
  --k-live: #E11D2E; --k-lesson: #f4f4f5; --k-replay: #ff8a3d; --k-webinar: #7dd3fc; --k-exam: #fbbf24;
}
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
.glass-body { background: #050505; min-height: 100vh; overflow-x: hidden;
  font-family: "Inter", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.glass-body * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.xs { font-size: 12px; }
.muted-light { color: rgba(255,255,255,.72); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- animated backdrop */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1100px 620px at 72% -12%, #2b0a0f 0%, transparent 62%), radial-gradient(900px 500px at -10% 110%, #2a1206 0%, transparent 60%), #050505; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; animation: drift 24s ease-in-out infinite alternate; }
.g1 { width: 560px; height: 560px; background: #E11D2E; top: -220px; right: 6%; opacity: .42; }
.g2 { width: 460px; height: 460px; background: #ff6a1a; bottom: -200px; left: -120px; opacity: .22; animation-duration: 30s; }
.g3 { width: 380px; height: 380px; background: #7a0f1a; top: 42%; left: 40%; opacity: .3; animation-duration: 36s; animation-direction: alternate-reverse; }
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(80px, 50px, 0) scale(1.18); } }
.grid-lines { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px; -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 20%, transparent 75%); }
.grain { position: absolute; inset: -50%; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- glass surfaces */
.glass { position: relative; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 24px;
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.07); }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(225,29,46,.14), transparent 60%);
  opacity: 0; transition: opacity .5s var(--ease); }
.spot:hover::after { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

/* ---------- reveal motion */
.js [data-reveal] { transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(26px); filter: blur(10px); }
.split .w { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(.35em); }
.split.in .w { animation: wordIn 1s var(--ease) forwards; animation-delay: calc(var(--w) * 75ms + 120ms); }
@keyframes wordIn { to { opacity: 1; filter: blur(0); transform: none; } }

/* ---------- shell + top bar */
.shell { max-width: 1340px; margin: 0 auto; padding: 16px 22px 90px; }
.gbar { position: sticky; top: 14px; z-index: 50; max-width: 1340px; margin: 16px auto 0; padding: 0 22px;
  display: grid; grid-template-columns: 300px 1fr auto; gap: 22px; align-items: center; }
.gsearch { position: relative; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  transition: border-color .3s, background .3s, box-shadow .3s; }
.gsearch:focus-within { border-color: rgba(225,29,46,.6); background: rgba(255,255,255,.1); box-shadow: 0 0 0 4px rgba(225,29,46,.15); }
.gsearch input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; margin: 0; padding: 0; }
.gsearch input::placeholder { color: rgba(255,255,255,.55); }
.gsearch kbd { font: 600 11px/1 ui-monospace, monospace; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 4px 6px; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 6px; border-radius: 18px; display: none;
  background: rgba(18,18,20,.92); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0,0,0,.6); max-height: 360px; overflow: auto; }
.search-results.open { display: block; animation: pop .25s var(--ease); }
.search-results a { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 12px; text-decoration: none; }
.search-results a small { color: var(--muted); font-size: 12px; }
.search-results a:hover, .search-results a.sel { background: rgba(225,29,46,.18); }
.sr-empty { padding: 10px 12px; color: var(--muted); font-size: 14px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

.gnav { position: relative; justify-self: center; display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.gnav a { position: relative; z-index: 1; padding: 9px 20px; border-radius: 999px; text-decoration: none; color: rgba(255,255,255,.7); font-size: 14px; font-weight: 500; transition: color .3s; white-space: nowrap; }
.gnav a.active, .gnav a:hover { color: #fff; }
.gnav-pill { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; opacity: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 18px rgba(0,0,0,.3);
  transition: transform .55s var(--ease), width .55s var(--ease), opacity .3s; }
.gright { display: flex; align-items: center; gap: 10px; }
.gbell { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #fff;
  background: rgba(255,255,255,.07); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); transition: transform .3s var(--ease), background .3s; }
.gbell:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); }
.gbell .dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 3px #050505; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 3px #050505, 0 0 0 3px rgba(225,29,46,.6); } 70%, 100% { box-shadow: 0 0 0 3px #050505, 0 0 0 12px rgba(225,29,46,0); } }
.guser { position: relative; }
.guser summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px 0 6px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.guser summary::-webkit-details-marker { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: linear-gradient(135deg, #E11D2E, #ff7a45); box-shadow: 0 4px 14px rgba(225,29,46,.45); }
.uname { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; line-height: 1.15; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uname small { color: var(--muted); font-weight: 400; font-size: 11px; }
.guser .chev { width: 16px; height: 16px; transition: transform .3s; }
.guser[open] .chev { transform: rotate(180deg); }
.umenu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 12px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px;
  background: rgba(18,18,20,.94); border: 1px solid var(--glass-line); box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: pop .25s var(--ease); }
.umenu button { width: 100%; padding: 10px; border-radius: 12px; border: 1px solid rgba(225,29,46,.4); background: rgba(225,29,46,.12); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.umenu button:hover { background: var(--red); }

/* ---------- dashboard grid */
.dash { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; margin-top: 8px; }
.dcol-left { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.dcol-main { min-width: 0; }
.panel { padding: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.panel-head h2 { font-size: 16px; margin: 0; font-weight: 650; }

/* cards with image or gradient art */
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 1s var(--ease); }
.cover-fallback { position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 90% at 15% 0%, hsl(calc(345 + var(--h, 0) * .1) 75% 42% / .95), transparent 62%),
    radial-gradient(90% 80% at 100% 100%, hsl(calc(14 + var(--h, 0) * .06) 90% 52% / .75), transparent 60%),
    linear-gradient(160deg, #2a0b12, #0c0507); }
.cover-fallback::after { content: ""; position: absolute; inset: 0; opacity: .35;
  background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.07) 22px 23px); -webkit-mask-image: linear-gradient(180deg, transparent, #000); mask-image: linear-gradient(180deg, transparent, #000); }
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease); will-change: transform; }
.tilt:hover { box-shadow: 0 22px 44px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.12), 0 10px 40px rgba(225,29,46,.22); }
.tilt:hover .cover { transform: scale(1.07); }
progress.xs-bar { height: 3px; margin-top: 8px; background: rgba(255,255,255,.18); }
progress.xs-bar::-webkit-progress-bar { background: rgba(255,255,255,.18); }

.cont-list { display: flex; flex-direction: column; gap: 12px; max-height: 410px; overflow: auto; padding: 2px; margin: -2px;
  -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent); mask-image: linear-gradient(180deg, #000 85%, transparent); }
.cont-card { position: relative; flex: 0 0 auto; display: block; height: 122px; border-radius: 18px; overflow: hidden; text-decoration: none; isolation: isolate; }
.cont-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.15) 65%); }
.cont-body { position: absolute; z-index: 3; left: 14px; right: 52px; bottom: 12px; display: flex; flex-direction: column; }
.cont-body b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.play-sm, .play-xs { position: absolute; z-index: 3; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .35s var(--ease), background .35s; }
.play-sm { right: 12px; bottom: 14px; width: 32px; height: 32px; }
.play-sm svg, .play-xs svg { width: 14px; height: 14px; fill: #fff; margin-left: 2px; }
.cont-card:hover .play-sm { transform: scale(1.12); background: var(--red); }

.course-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.course-mini a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-decoration: none; transition: background .3s; }
.course-mini a:hover { background: rgba(255,255,255,.06); }
.ring { --p: 0; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--red) calc(var(--p) * 1%), rgba(255,255,255,.1) 0); }
.ring span { width: 38px; height: 38px; border-radius: 50%; background: #121214; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.cm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-text small { color: var(--muted); font-size: 12px; }
.play-xs { position: static; width: 28px; height: 28px; }
.course-mini a:hover .play-xs { background: var(--red); transform: scale(1.1); }

/* ---------- hero carousel */
.hero { height: 410px; overflow: hidden; border-radius: 30px; padding: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s var(--ease), visibility 0s 1s; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 2; transition: opacity 1s var(--ease); }
.slide.is-leaving { z-index: 1; }
.slide-bg { position: absolute; inset: 0; transform: scale(1.12); transition: transform 8s linear; }
.slide.is-active .slide-bg { transform: scale(1.0); }
.slide-bg .cover { z-index: 1; }
.art { position: absolute; inset: 0; overflow: hidden; }
.art-0 { background: radial-gradient(70% 90% at 78% 30%, #ff7a45 0%, transparent 55%), radial-gradient(80% 80% at 60% 100%, #E11D2E 0%, transparent 60%), linear-gradient(170deg, #1d0a1e 0%, #5b1230 45%, #a0263a 70%, #2a0b10 100%); }
.art-1 { background: radial-gradient(60% 80% at 85% 20%, #E11D2E 0%, transparent 60%), radial-gradient(70% 70% at 30% 110%, #ff8a3d 0%, transparent 60%), linear-gradient(160deg, #0b0b12 0%, #2a0d16 50%, #4a1018 100%); }
.art-2 { background: radial-gradient(60% 80% at 70% 0%, #ff5a36 0%, transparent 55%), radial-gradient(80% 70% at 100% 100%, #7a0f1a 0%, transparent 60%), linear-gradient(200deg, #120708 0%, #3a0c12 55%, #0a0506 100%); }
.art::before { content: ""; position: absolute; width: 140px; height: 140px; right: 18%; top: 16%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd2b8, #ff7a45 55%, transparent 72%); filter: blur(2px); opacity: .55; animation: float 9s ease-in-out infinite alternate; }
@keyframes float { to { transform: translate3d(-18px, 14px, 0); } }
.candles { position: absolute; right: 0; bottom: 0; width: 70%; height: 72%; opacity: .55; }
.candles line { stroke-width: 2; }
.candles .up rect { fill: rgba(255,255,255,.55); } .candles .up line { stroke: rgba(255,255,255,.55); }
.candles .dn rect { fill: #ff3b4a; } .candles .dn line { stroke: #ff3b4a; }
.candles .cdl { transform-box: fill-box; transform-origin: 50% 100%; }
.slide.is-active .cdl { animation: grow 1s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 200ms); }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } }
.slide-bg .cover ~ .art { display: none; }
.slide-shade { position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, rgba(5,5,5,.88) 0%, rgba(5,5,5,.55) 42%, rgba(5,5,5,0) 78%), linear-gradient(0deg, rgba(5,5,5,.6), transparent 45%); }
.slide-body { position: absolute; z-index: 3; inset: 0; padding: 26px 34px 32px; display: flex; flex-direction: column; justify-content: flex-end; max-width: 640px; }
.badge { position: absolute; top: 24px; left: 30px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 6px 14px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.slide-body h1 { font-size: clamp(28px, 3.5vw, 46px); line-height: 1.04; letter-spacing: -.025em; font-weight: 700; margin: 0 0 12px; }
.slide-desc { margin: 0 0 22px; max-width: 520px; color: rgba(255,255,255,.75); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.slide .badge, .slide .chips, .slide .slide-desc, .slide .slide-actions { opacity: 0; transform: translateY(14px); filter: blur(6px); }
.slide.is-active .badge, .slide.is-active .chips, .slide.is-active .slide-desc, .slide.is-active .slide-actions { animation: wordIn .9s var(--ease) forwards; }
.slide.is-active .badge { animation-delay: .05s; } .slide.is-active .chips { animation-delay: .15s; }
.slide.is-active .slide-desc { animation-delay: .55s; } .slide.is-active .slide-actions { animation-delay: .7s; }
.btn-pill { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s; }
.btn-pill svg { width: 18px; height: 18px; fill: currentColor; }
.btn-pill svg.ico { fill: none; }
.btn-white { background: #fff; color: #0b0b0b; box-shadow: 0 10px 30px rgba(255,255,255,.15); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(225,29,46,.45); background: #fff; }
.btn-outline { color: #fff; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-outline:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.hero-nav { position: absolute; z-index: 5; right: 24px; bottom: 26px; display: flex; align-items: center; gap: 10px; }
.round { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .3s var(--ease), background .3s, opacity .3s; }
.round:hover { background: rgba(255,255,255,.26); transform: scale(1.06); }
.round:active { transform: scale(.95); }
.round.sm { width: 34px; height: 34px; } .round.sm .ico { width: 16px; height: 16px; }
.round.light { background: rgba(255,255,255,.9); color: #111; border-color: transparent; font-weight: 800; }
.round.light:hover { background: #fff; }
.hero-dots { display: flex; gap: 6px; margin-right: 6px; }
.hdot { width: 26px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.25); overflow: hidden; cursor: pointer; }
.hdot i { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; }
.hdot.is-active i { animation: fill var(--delay, 7s) linear forwards; }
.hero.paused .hdot.is-active i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }

/* ---------- lessons rows */
.lessons-sec { margin-top: 26px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 14px; }
.sec-head h2 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.sec-head.full { margin-top: 34px; }
.sec-tools { margin-left: auto; display: flex; gap: 8px; }
.lessons-sec.at-start [data-scroll="-1"], .lessons-sec.at-end [data-scroll="1"] { opacity: .3; pointer-events: none; }
.lessons-sec.pulse h2 { animation: flash 1.4s var(--ease); }
@keyframes flash { 30% { color: var(--red); text-shadow: 0 0 24px rgba(225,29,46,.7); } }
.lesson-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 16px; margin: -6px -2px 0; scrollbar-width: none; }
.lesson-row::-webkit-scrollbar { display: none; }
.lcard { position: relative; height: 232px; border-radius: 22px; overflow: hidden; text-decoration: none; scroll-snap-align: start; isolation: isolate;
  border: 1px solid rgba(255,255,255,.08); }
.js .lessons-sec:not(.in) .lcard { opacity: 0; }
.lessons-sec.in .lcard { animation: cardIn .8s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.96); filter: blur(8px); } }
.lcard-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.2) 55%, rgba(0,0,0,.25) 100%); }
.lcard-top { position: absolute; z-index: 3; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.num, .dur, .donechip { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.donechip { background: rgba(34,197,94,.25); border-color: rgba(34,197,94,.45); }
.lcard-body { position: absolute; z-index: 3; left: 14px; right: 66px; bottom: 14px; display: flex; flex-direction: column; }
.lcard-body b { font-size: 16px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-body small { color: rgba(255,255,255,.65); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play { position: absolute; z-index: 3; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: transform .4s var(--ease), background .4s, box-shadow .4s; }
.play svg { width: 18px; height: 18px; fill: #0b0b0b; margin-left: 3px; transition: fill .3s; }
.lcard:hover .play { transform: scale(1.12); background: var(--red); box-shadow: 0 0 0 8px rgba(225,29,46,.2), 0 10px 30px rgba(225,29,46,.6); }
.lcard:hover .play svg { fill: #fff; }
.lcard.done .play { background: rgba(255,255,255,.85); }

/* ---------- planning */
.planning { grid-column: 1 / -1; }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.cal-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; padding: 28px 30px; border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04)); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cal-head h3 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.cal-nav { display: flex; gap: 8px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow span { text-align: center; color: rgba(255,255,255,.6); font-size: 14px; font-weight: 600; padding-bottom: 10px; }
.cal-grid { row-gap: 4px; }
.day { position: relative; height: 50px; padding: 0; background: none; border: 0; color: #fff; font: 600 16px/1 inherit; font-family: inherit; cursor: pointer; display: grid; place-items: center; outline: none; }
.day .n { position: relative; z-index: 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  transition: background .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease), color .35s; }
.day:hover .n, .day:focus-visible .n { background: rgba(255,255,255,.12); }
.day.out { color: rgba(255,255,255,.22); }
.day.past:not(.out):not(.sel) { color: rgba(255,255,255,.55); }
.day.has:not(.sel) .n { background: rgba(255,255,255,.07); }
.day.band::before { content: ""; position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; right: 0; background: rgba(225,29,46,.14); transition: background .3s; }
.day.band-start::before { left: 4px; border-radius: 999px 0 0 999px; }
.day.band-end::before { right: 4px; border-radius: 0 999px 999px 0; }
.day.today .n { box-shadow: inset 0 0 0 1.5px rgba(225,29,46,.95); }
.day.sel .n { background: var(--red); color: #fff; transform: scale(1.06); box-shadow: 0 0 0 5px rgba(225,29,46,.22), 0 10px 26px rgba(225,29,46,.55); }
.dots { position: absolute; z-index: 3; bottom: 1px; display: flex; gap: 3px; }
.dots i, .cal-legend i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.k-live { background: var(--k-live); } .k-lesson { background: var(--k-lesson); } .k-replay { background: var(--k-replay); }
.k-webinar { background: var(--k-webinar); } .k-exam { background: var(--k-exam); }
.day.sel .dots i { background: #fff; }
.cal-grid.swap-l .day { animation: dayL .5s var(--ease) both; animation-delay: calc(var(--i) * 7ms); }
.cal-grid.swap-r .day { animation: dayR .5s var(--ease) both; animation-delay: calc(var(--i) * 7ms); }
@keyframes dayL { from { opacity: 0; transform: translateX(18px); filter: blur(4px); } }
@keyframes dayR { from { opacity: 0; transform: translateX(-18px); filter: blur(4px); } }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; }

.agenda { border-left: 1px solid rgba(255,255,255,.08); padding-left: 28px; min-width: 0; }
.ag-head { margin: 4px 0 16px; }
.ag-kicker { color: var(--red); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ag-head h4 { margin: 2px 0 0; font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.ag-list { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow: auto; padding-right: 4px; }
.ag-item { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 16px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); position: relative; overflow: hidden;
  animation: agIn .55s var(--ease) both; animation-delay: calc(var(--i) * 80ms); background-clip: padding-box; }
.ag-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--k-live); }
.ag-item.k-lesson::before { background: var(--k-lesson); } .ag-item.k-replay::before { background: var(--k-replay); }
.ag-item.k-webinar::before { background: var(--k-webinar); } .ag-item.k-exam::before { background: var(--k-exam); }
.ag-item.k-live, .ag-item.k-lesson, .ag-item.k-replay, .ag-item.k-webinar, .ag-item.k-exam { background-color: rgba(255,255,255,.05); }
@keyframes agIn { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } }
.ag-time { display: flex; flex-direction: column; padding-left: 4px; }
.ag-time b { font-size: 15px; } .ag-time small { color: var(--muted); font-size: 12px; }
.ag-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-kind, .ag-live, .ag-past { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); }
.ag-live { background: var(--red); position: relative; padding-left: 16px; }
.ag-live::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.ag-past { color: var(--muted); }
.ag-title { font-size: 15px; margin-top: 4px; }
.ag-course { color: var(--muted); font-size: 12px; }
.ag-desc { margin: 4px 0 0; color: rgba(255,255,255,.7); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mini-btn { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; text-decoration: none; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); transition: background .3s, transform .3s var(--ease); }
.mini-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.mini-btn.red { background: var(--red); border-color: var(--red); }
.mini-btn.red:hover { background: var(--red-dark); }
.st-past { opacity: .55; }
.ag-empty { color: var(--muted); margin: 6px 0; }
.ag-next { align-self: flex-start; font: inherit; font-size: 13px; color: #fff; padding: 8px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(225,29,46,.14); border: 1px solid rgba(225,29,46,.35); transition: background .3s; }
.ag-next:hover { background: rgba(225,29,46,.3); }

.day-stack { display: flex; flex-direction: column; gap: 12px; }
.dcard { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 20px; width: 100%;
  text-align: left; color: inherit; font: inherit; cursor: pointer; transition: transform .45s var(--ease), background .45s, box-shadow .45s, opacity .9s var(--ease), filter .9s var(--ease); }
.dcard:hover { transform: translateX(-5px); background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)); }
.dnum { font-size: 36px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.dmid { display: flex; flex-direction: column; min-width: 0; }
.dmid small { color: var(--muted); font-size: 11px; }
.dmid b { font-size: 14px; }
.dmid em { font-style: normal; color: rgba(255,255,255,.6); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcount { min-width: 32px; height: 26px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: #ff4757; box-shadow: 0 6px 16px rgba(255,71,87,.35); }
.dcard.is-today { background: linear-gradient(135deg, rgba(225,29,46,.38), rgba(225,29,46,.1)); border-color: rgba(225,29,46,.5); }
.dcard.is-today .dcount { background: #fff; color: #0b0b0b; box-shadow: none; }
.dcard.is-sel { box-shadow: 0 0 0 1.5px rgba(255,255,255,.55), 0 24px 60px rgba(0,0,0,.45); }
.empty-card { cursor: default; display: flex; flex-direction: column; gap: 4px; }
.empty-card small { color: var(--muted); }

/* ---------- lesson page in the glass shell */
.glass-body .stage { border-radius: 26px; border-color: rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 80px rgba(225,29,46,.12); }
.glass-body .notes, .glass-body .lesson-side { background: var(--glass); border-color: var(--glass-line); border-radius: 24px;
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.glass-body .lesson-side { top: 92px; }
.glass-body .crumbs { margin-top: 6px; }
.glass-body .lesson-list li a { border-top-color: rgba(255,255,255,.06); }
.glass-body .lesson-list li.current a { background: rgba(225,29,46,.14); }
.glass-body .btn { border-radius: 999px; }
.glass-body .btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }

/* ---------- responsive */
@media (max-width: 1240px) {
  .lesson-row { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
  .gbar { grid-template-columns: 240px 1fr auto; }
}
@media (max-width: 1040px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dcol-main { order: -1; }
  .dcol-left { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .day-stack { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .dcard { flex: 0 0 260px; scroll-snap-align: start; }
  .uname { display: none; }
}
@media (max-width: 760px) {
  .gbar { grid-template-columns: 1fr auto; gap: 10px; padding: 0 12px; top: 8px; }
  .gsearch { grid-column: 1 / -1; order: 3; }
  .gnav { justify-self: start; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .gnav a { padding: 8px 14px; }
  .shell { padding: 10px 12px 70px; }
  .dcol-left { grid-template-columns: minmax(0, 1fr); }
  .cont-list { flex-direction: row; overflow-x: auto; max-height: none; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; }
  .cont-card { flex: 0 0 78%; scroll-snap-align: start; }
  .hero { height: 470px; border-radius: 24px; }
  .slide-body { padding: 22px 20px 92px; }
  .slide-shade { background: linear-gradient(0deg, rgba(5,5,5,.92) 0%, rgba(5,5,5,.5) 60%, rgba(5,5,5,.2) 100%); }
  .hero-nav { left: 20px; right: 20px; bottom: 20px; }
  .hero-dots { margin-right: auto; }
  .lesson-row { grid-auto-columns: 74%; }
  .cal-card { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; border-radius: 26px; gap: 18px; }
  .agenda { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; }
  .day { height: 44px; } .day .n { width: 36px; height: 36px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .glow, .art::before { animation: none !important; }
}
.mini-btn.red { color: #fff; }
.gbar::before { content: ""; position: absolute; z-index: -1; top: -30px; bottom: -22px; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: linear-gradient(180deg, rgba(5,5,5,.92) 55%, rgba(5,5,5,0)); pointer-events: none; }
.sm-only { display: none; }
@media (max-width: 760px) {
  .gbar { position: relative; top: 0; }
  .gbar::before { display: none; }
  .gnav .lg { display: none; } .gnav .sm-only { display: inline; }
  .gnav a { padding: 8px 13px; font-size: 13px; }
}
@media (max-width: 420px) {
  .gnav a { padding: 8px 10px; }
  .gright { gap: 6px; }
  .gbell { width: 42px; height: 42px; }
  .guser summary { height: 42px; padding: 0 4px; }
  .guser .chev { display: none; }
}

/* ---------- anti-recording watermark layers */
.wm { color: rgba(255,255,255,.5); }
.wm-tile { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: .09; background-repeat: repeat; background-size: 460px 230px; }
.wm-flash { position: absolute; z-index: 7; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.92); pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 26px; border-radius: 18px; text-align: center;
  background: rgba(0,0,0,.45); border: 1px solid rgba(225,29,46,.6); box-shadow: 0 0 60px rgba(225,29,46,.35);
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease, ease), transform .5s var(--ease, ease), visibility 0s .5s; max-width: 90%; }
.wm-flash.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); transition: opacity .5s var(--ease, ease), transform .5s var(--ease, ease); }
.wf-alert { color: #ff4d5a; font-weight: 800; letter-spacing: .08em; font-size: clamp(11px, 1.4vw, 15px); }
.wf-name { color: #fff; font-weight: 800; font-size: clamp(16px, 2.6vw, 30px); }
.wf-meta { color: rgba(255,255,255,.85); font-weight: 600; font-size: clamp(11px, 1.4vw, 16px); }
.rec-warning { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 0; padding: 12px 16px; border-radius: 16px; font-size: 13px; line-height: 1.5;
  color: rgba(255,255,255,.85); background: rgba(225,29,46,.1); border: 1px solid rgba(225,29,46,.35); }
.rec-warning .ico { flex: 0 0 auto; color: #ff4d5a; margin-top: 1px; }
.rec-warning b { color: #fff; }
@media (max-width: 640px) { .wm { white-space: normal; max-width: 92%; } }
.wm-lock { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 20px; text-align: center;
  background: #000; color: #ff4d5a; font-weight: 700; font-size: 15px; }
.wm-flash { background: rgba(0,0,0,.72); }

/* ---------- admin video uploader */
.uploader { margin-bottom: 24px; }
.up-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.up-head p { margin: 4px 0 0; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 0; padding: 30px; border-radius: 14px; cursor: pointer; text-align: center;
  border: 2px dashed #3a3a42; background: #0a0a0c; color: var(--text); transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.over { border-color: var(--red); background: rgba(225,29,46,.06); }
.up-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.up-item { display: grid; grid-template-columns: 1fr 120px 90px 28px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.up-item input { margin: 0; padding: 7px 10px; }
.up-item progress { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; border: 0; border-radius: 99px; background: #222; overflow: hidden; }
.up-item progress::-webkit-progress-bar { background: #222; } .up-item progress::-webkit-progress-value { background: var(--red); } .up-item progress::-moz-progress-bar { background: var(--red); }
.up-item.done progress::-webkit-progress-value { background: var(--green); } .up-item.done progress::-moz-progress-bar { background: var(--green); }
.up-state { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.up-item.err .up-state { color: #ff8a94; } .up-item.done .up-state { color: #8ff0b0; }
.up-rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; }
.up-actions { display: flex; align-items: center; gap: 12px; }
@media (max-width: 700px) { .up-item { grid-template-columns: 1fr 70px 28px; } .up-item progress { display: none; } }

/* =====================================================================
   ADMIN — same glass language as the student area
   ===================================================================== */
.admin-ui { --aside-w: 248px; }
.admin-ui .admin-main { max-width: 1440px; margin: 0 0 0 calc(var(--aside-w) + 32px); padding: 26px 28px 80px 0; }
.admin-ui .admin-main > :not([data-reveal]) { animation: adIn .7s var(--ease) both; }
.admin-ui .admin-main > :nth-child(2) { animation-delay: .06s; } .admin-ui .admin-main > :nth-child(3) { animation-delay: .12s; }
.admin-ui .admin-main > :nth-child(4) { animation-delay: .18s; } .admin-ui .admin-main > :nth-child(n+5) { animation-delay: .24s; }
@keyframes adIn { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }

/* sidebar */
.aside { position: fixed; z-index: 40; top: 16px; bottom: 16px; left: 16px; width: var(--aside-w); padding: 18px 14px; border-radius: 26px;
  display: flex; flex-direction: column; gap: 20px; }
.aside-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.07); }
.aside-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; font-size: 15px; }
.aside-brand b { color: var(--red); } .aside-brand small { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
.aside-nav { display: flex; flex-direction: column; gap: 4px; }
.aside-nav a, .aside-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; text-decoration: none;
  color: rgba(255,255,255,.66); font-weight: 500; font-size: 14px; transition: background .3s, color .3s; }
.aside-nav a:hover, .aside-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.aside-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(225,29,46,.28), rgba(225,29,46,.06)); box-shadow: inset 0 0 0 1px rgba(225,29,46,.3); }
.aside-nav a.active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--red); box-shadow: 0 0 12px var(--red); }
.aside-nav a.active .ico { color: #ff6b77; }
.aside-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.aside-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.au-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.au-text b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-text small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .3s, color .3s; }
.icon-btn:hover { background: rgba(225,29,46,.2); color: #fff; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; box-shadow: none; }

/* page header */
.admin-ui .admin-head { margin: 4px 0 24px; align-items: flex-end; }
.admin-ui .admin-head h1 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.02em; font-weight: 700; margin: 0; }
.admin-ui .admin-head h1 .muted { font-weight: 400; letter-spacing: 0; }
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff6b77; margin-bottom: 6px; }
.admin-ui .crumbs { margin: 0 0 10px; }
.admin-ui h2 { font-size: 18px; letter-spacing: -.01em; margin: 26px 0 12px; }

/* surfaces */
.admin-ui .card, .admin-ui .table-wrap, .admin-ui .panel-pad {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px;
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.admin-ui .card { padding: 22px 24px; }
.admin-ui .card h3 { font-size: 16px; margin-bottom: 14px; }
.admin-ui .card.warn { border-color: rgba(225,29,46,.4); background: linear-gradient(180deg, rgba(225,29,46,.12), rgba(225,29,46,.03)); }
.admin-ui .cards { gap: 18px; }
.panel-pad { padding: 20px 22px; }

/* tables */
.admin-ui .table-wrap { padding: 4px; }
.admin-ui .table-wrap.flat { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; }
.admin-ui table { border-collapse: separate; border-spacing: 0; }
.admin-ui th { background: transparent; color: rgba(255,255,255,.45); font-size: 11px; letter-spacing: .08em; padding: 14px 14px 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.admin-ui td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
.admin-ui tbody tr { transition: background .25s; }
.admin-ui tbody tr:hover { background: rgba(255,255,255,.035); }
.admin-ui tbody tr:last-child td { border-bottom: 0; }
.admin-ui td a { text-decoration: none; font-weight: 500; }
.admin-ui td a:hover { color: #ff6b77; }
.admin-ui tr.flagged td { background: rgba(225,29,46,.08); }
.who-cell { display: inline-flex; align-items: center; gap: 10px; }

/* buttons, fields, tags */
.admin-ui .btn { border-radius: 999px; padding: 9px 18px; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); font-size: 14px;
  transition: background .3s, transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.admin-ui .btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); transform: translateY(-1px); }
.admin-ui .btn-red { background: linear-gradient(180deg, #f0283a, #c8121f); border-color: transparent; box-shadow: 0 8px 24px rgba(225,29,46,.35), inset 0 1px 0 rgba(255,255,255,.2); }
.admin-ui .btn-red:hover { background: linear-gradient(180deg, #ff3446, #d5141f); box-shadow: 0 12px 30px rgba(225,29,46,.5); }
.admin-ui .btn-danger { background: rgba(225,29,46,.08); border-color: rgba(225,29,46,.35); color: #ff8a94; }
.admin-ui .btn-danger:hover { background: rgba(225,29,46,.2); }
.admin-ui .btn-sm { padding: 6px 12px; font-size: 12.5px; }
.admin-ui .btn:disabled { opacity: .35; pointer-events: none; }
.admin-ui input[type=text], .admin-ui input[type=email], .admin-ui input[type=password], .admin-ui input[type=search], .admin-ui input[type=number],
.admin-ui input[type=date], .admin-ui input[type=time], .admin-ui textarea, .admin-ui select {
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 11px 14px; transition: border-color .25s, box-shadow .25s, background .25s; color-scheme: dark; }
.admin-ui input:focus, .admin-ui textarea:focus, .admin-ui select:focus { outline: none; border-color: rgba(225,29,46,.7); box-shadow: 0 0 0 4px rgba(225,29,46,.15); background: rgba(0,0,0,.5); }
.admin-ui label { font-weight: 500; }
.admin-ui input[type=checkbox] { accent-color: var(--red); width: 16px; height: 16px; }
.admin-ui .search input { border-radius: 999px; padding-left: 18px; min-width: 260px; }
.admin-ui .tag { padding: 3px 10px; font-size: 11.5px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); }
.admin-ui .tag-green { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); color: #86efac; }
.admin-ui .tag-red { background: rgba(225,29,46,.15); border-color: rgba(225,29,46,.35); color: #ff8a94; }
.k-tag.k-live { color: #ff8a94; border-color: rgba(225,29,46,.4); background: rgba(225,29,46,.12); }
.k-tag.k-replay { color: #ffb37a; border-color: rgba(255,138,61,.4); background: rgba(255,138,61,.1); }
.k-tag.k-webinar { color: #a5e3ff; border-color: rgba(125,211,252,.35); background: rgba(125,211,252,.08); }
.k-tag.k-exam { color: #fde68a; border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.08); }
.admin-ui .flash { border-radius: 14px; border-width: 1px; padding: 12px 16px 12px 18px; position: relative; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: adIn .5s var(--ease) both; }
.admin-ui .flash::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: currentColor; }
.admin-ui hr { border: 0; border-top: 1px solid rgba(255,255,255,.08) !important; }
.admin-ui .dropzone { border-radius: 18px; border-color: rgba(255,255,255,.14); background: rgba(0,0,0,.25); padding: 36px; }
.admin-ui .dropzone b { font-size: 16px; }
.admin-ui .up-item { background: rgba(0,0,0,.3); border-color: rgba(255,255,255,.08); border-radius: 14px; }
.admin-ui .thumb { border-radius: 10px; }

/* overview */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { padding: 20px 22px; border-radius: 22px; display: flex; flex-direction: column; gap: 6px; min-height: 150px; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-num { font-size: 42px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.kpi-num small { font-size: 20px; color: var(--muted); margin-left: 2px; }
.kpi-sub { color: var(--muted); font-size: 12px; margin-top: auto; }
.kpi progress.bar { height: 5px; }
.kpi-alert { border-color: rgba(225,29,46,.45); background: linear-gradient(160deg, rgba(225,29,46,.22), rgba(225,29,46,.04)); }
.kpi-alert .kpi-num { color: #ff6b77; }
.spark { margin-top: auto; height: 38px; display: flex; align-items: flex-end; gap: 3px; }
.spark i { flex: 1; height: max(3px, var(--v)); border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, #ff6b77, rgba(225,29,46,.35)); transform-origin: bottom; animation: sparkIn .8s var(--ease) both; }
.spark i:nth-child(n) { animation-delay: calc(var(--n, 0) * 1ms); }
@keyframes sparkIn { from { transform: scaleY(0); } }
.alert-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; margin-bottom: 18px; border-color: rgba(225,29,46,.4) !important; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: ping 2s infinite; }
.chip-link { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.06); text-decoration: none; }
.chip-link:hover { background: rgba(225,29,46,.25); }
.alert-strip .btn { margin-left: auto; }
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ov-wide { grid-column: 1 / -1; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.panel-title h2 { margin: 0; font-size: 16px; }
.panel-title a { color: var(--muted); font-size: 13px; text-decoration: none; } .panel-title a:hover { color: #fff; }
.ev-row, .top-row { display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.05); }
.ev-row:last-child, .top-row:last-child { border-bottom: 0; }
.ev-date { width: 46px; height: 50px; flex: 0 0 auto; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(225,29,46,.12); border: 1px solid rgba(225,29,46,.3); }
.ev-date b { font-size: 18px; line-height: 1; } .ev-date small { font-size: 10px; text-transform: uppercase; color: #ff8a94; letter-spacing: .08em; }
.ev-main, .top-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-main b, .top-main b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-main small, .top-main small { color: var(--muted); font-size: 12px; }
.top-rank { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: rgba(255,255,255,.06); }
.top-row:first-child .top-rank { background: var(--red); box-shadow: 0 0 16px rgba(225,29,46,.5); }
.top-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 6px; overflow: hidden; }
.top-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E11D2E, #ff6b77); border-radius: inherit; }
.top-num { text-align: right; font-weight: 700; font-size: 18px; display: flex; flex-direction: column; line-height: 1.1; }
.top-num small { font-weight: 400; font-size: 11px; color: var(--muted); }
.empty-mini { color: var(--muted); padding: 14px 4px; font-size: 14px; }
.empty-mini a { color: #ff8a94; }

/* responsive admin */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .aside { position: sticky; top: 8px; left: auto; bottom: auto; width: auto; margin: 8px; flex-direction: row; align-items: center; padding: 8px 10px; border-radius: 20px; gap: 8px; overflow-x: auto; }
  .aside-brand { border: 0; padding: 0 6px 0 0; } .aside-brand > span:last-child { display: none; }
  .aside-nav { flex-direction: row; } .aside-nav a span, .aside-link span, .au-text { display: none; }
  .aside-nav a { padding: 10px; } .aside-nav a.active::before { display: none; }
  .aside-foot { margin: 0 0 0 auto; flex-direction: row; } .aside-user { padding: 4px; background: none; border: 0; } .aside-user .avatar { display: none; }
  .admin-ui .admin-main { margin: 0; padding: 16px 14px 70px; }
  .ov-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { min-height: 120px; padding: 16px; } .kpi-num { font-size: 32px; } }
.aside-brand .bt { white-space: nowrap; }
.ov-grid > *, .kpis > * { min-width: 0; }
.ev-row .tag { flex: 0 0 auto; }
@media (max-width: 560px) { .ev-row .tag { display: none; } .aside { gap: 4px; } .aside-nav a { padding: 9px; } }
/* sharing alerts */
.alerts-panel { margin-bottom: 18px; border-color: rgba(225,29,46,.35) !important; background: linear-gradient(180deg, rgba(225,29,46,.1), rgba(255,255,255,.02)) !important; }
.alerts-panel h2 { display: flex; align-items: center; gap: 10px; }
.alert-row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid rgba(255,255,255,.06); }
.alert-row:last-of-type { border-bottom: 0; }
.alert-row.is-dismissed { opacity: .5; }
.al-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: rgba(255,138,61,.14); font-size: 16px; }
.alert-row.is-strong .al-icon { background: rgba(225,29,46,.25); box-shadow: 0 0 18px rgba(225,29,46,.35); }
.al-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.al-who { font-weight: 700; color: #fff; text-decoration: none; } .al-who:hover { color: #ff8a94; }
.al-main > b { font-size: 13.5px; color: #ffb3b9; font-weight: 600; }
.alert-row:not(.is-strong) .al-main > b { color: #ffcf9e; }
.al-places { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.al-place { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); }
.al-place i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.al-place small { color: var(--muted); font-size: 11px; }
.al-arrow { color: var(--muted); }
.btn-replay-on { border-color: rgba(34,197,94,.4) !important; color: #86efac !important; }
.rp-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rp-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(225,29,46,.15); font-size: 20px; }
.rp-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.replay-current { margin-bottom: 16px; }

/* ---------- replays page */
.page-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 18px 0 26px; }
.page-hero h1 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.025em; margin: 6px 0 8px; max-width: 720px; }
.page-hero p { margin: 0; }
.eyebrow-s { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff6b77; }
.rp-tools { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.rp-search { width: 320px; max-width: 100%; }
.rp-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fchip { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: rgba(255,255,255,.75);
  font: inherit; font-size: 13px; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.fchip:hover { color: #fff; background: rgba(255,255,255,.1); }
.fchip.on { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(225,29,46,.35); }
.rp-month { margin-bottom: 30px; }
.rp-month-title { font-size: 16px; color: rgba(255,255,255,.6); font-weight: 600; text-transform: capitalize; margin: 0 0 12px; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rp-grid .lcard { animation: cardIn .7s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.rcard .rkind { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #ffb3b9; margin-bottom: 4px; }
.rdate { text-transform: capitalize; }
.empty-replays { padding: 60px 24px; border-radius: 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-replays > span { font-size: 40px; }
.empty-replays b { font-size: 20px; }
.empty-replays .btn-pill { margin-top: 10px; }
.rp-none { padding: 30px; }
.center { text-align: center; }
@media (max-width: 760px) { .rp-tools { align-items: stretch; width: 100%; } .rp-search { width: 100%; } .rp-chips { justify-content: flex-start; } }

/* ---------- economic news */
:root { --imp-high: #ff3b4a; --imp-medium: #ff9f43; --imp-low: #f5d76e; }
.imp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; background: var(--imp-low); }
.imp-dot.imp-high, .imp-high > .imp-dot { background: var(--imp-high); box-shadow: 0 0 10px rgba(255,59,74,.7); }
.imp-dot.imp-medium, .imp-medium > .imp-dot { background: var(--imp-medium); }
.imp-dot.imp-holiday, .imp-holiday > .imp-dot { background: #9aa0a6; }
.news-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border-radius: 18px; margin: -4px 0 16px; }
.news-bar.off .nf-group { opacity: .35; }
.nf-group { display: flex; gap: 6px; flex-wrap: wrap; transition: opacity .3s; }
.fchip.sm { padding: 5px 11px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.15); position: relative; transition: background .3s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.news-flag { position: absolute; z-index: 3; top: 2px; right: calc(50% - 26px); width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center;
  font-size: 9px; font-weight: 900; color: #fff; background: var(--imp-high); box-shadow: 0 0 8px rgba(255,59,74,.7); }
.ag-news { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.news-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06); animation: agIn .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.news-row.imp-high { border-color: rgba(255,59,74,.35); background: linear-gradient(90deg, rgba(255,59,74,.12), rgba(255,255,255,.03)); }
.nr-time { font-weight: 700; font-size: 14px; min-width: 44px; padding-top: 1px; }
.nr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nr-top { display: flex; align-items: center; gap: 8px; }
.nr-top b { font-size: 14px; line-height: 1.3; }
.nr-cur { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.1); flex: 0 0 auto; }
.nr-main small { color: var(--muted); font-size: 12px; }
.nr-mk { display: flex; gap: 5px; flex-wrap: wrap; }
.nr-mk span { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(225,29,46,.14); color: #ffb3b9; }
.news-row .imp-dot { margin-top: 6px; }
.news-today { padding-bottom: 12px; }
.nt-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.05); }
.nt-row:last-of-type { border-bottom: 0; }
.nt-time { font-weight: 700; font-size: 13px; min-width: 42px; }
.nt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nt-main b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-main small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-empty { margin: 4px 0 0; }
@media (max-width: 760px) { .news-bar { gap: 10px; } .nf-group { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; } }

/* =====================================================================
   COMMUNAUTÉ — live chat
   ===================================================================== */
.nav-badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font-style: normal;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; background: var(--red); color: #fff; box-shadow: 0 0 0 2px #0b0b0d; }
.nav-badge.mention { background: #ff9f43; }
.chat-page .shell { padding-bottom: 16px; }
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 520px;
  border-radius: 28px; overflow: hidden; margin-top: 8px; padding: 0; }
.chat-side { display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.18); min-height: 0; }
.cs-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 12px; }
.cs-head b { font-size: 17px; }
.cs-online { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.cs-online i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.8); }
.cs-online.off i { background: #ff9f43; box-shadow: none; animation: blink 1s infinite; }
.cs-list { flex: 1; overflow-y: auto; padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.cs-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: rgba(255,255,255,.62);
  font-size: 14.5px; transition: background .25s, color .25s; }
.cs-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.cs-item.has { color: #fff; font-weight: 600; }
.cs-item.on { background: linear-gradient(90deg, rgba(225,29,46,.26), rgba(225,29,46,.06)); color: #fff; box-shadow: inset 0 0 0 1px rgba(225,29,46,.3); }
.cs-emoji { width: 22px; text-align: center; }
.cs-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-lock { font-size: 11px; opacity: .7; }
.cs-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.cs-badge.mention { background: #ff9f43; }
.cs-note { margin: 0; padding: 14px 18px 18px; font-size: 11.5px; color: var(--muted); line-height: 1.45; border-top: 1px solid rgba(255,255,255,.06); }

.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cm-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.07); }
.cm-menu { display: none; }
.cm-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-title b { font-size: 16px; }
.cm-title small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-pins { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.cm-pins:hover { background: rgba(255,255,255,.1); }
.cm-scroll { flex: 1; overflow-y: auto; padding: 10px 6px 14px; overscroll-behavior: contain; }
.cm-older { text-align: center; padding: 8px; }
.cm-older button { background: none; border: 1px solid rgba(255,255,255,.12); color: var(--muted); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 12.5px; cursor: pointer; }
.cm-day { display: flex; align-items: center; gap: 12px; margin: 16px 18px 8px; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.cm-day::before, .cm-day::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.08); }
.cm-empty { text-align: center; padding: 70px 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.cm-empty span { font-size: 38px; } .cm-empty b { color: #fff; font-size: 17px; } .cm-empty p { margin: 0; }

.msg { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 6px 16px; border-radius: 14px; margin: 0 6px; transition: background .2s; }
.msg:hover { background: rgba(255,255,255,.035); }
.msg.grouped { padding-top: 1px; padding-bottom: 1px; }
.msg.grouped .msg-av { visibility: hidden; height: 0; }
.msg.new { animation: msgIn .45s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.msg.flash-hl { animation: hl 1.6s ease; }
@keyframes hl { 0%, 40% { background: rgba(225,29,46,.22); } }
.msg.by-admin:not(.grouped) { background: linear-gradient(90deg, rgba(225,29,46,.08), transparent 60%); }
.msg.pinned { box-shadow: inset 3px 0 0 #ff9f43; }
.msg-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #2a2a31; color: #fff; }
.msg-av.admin { background: linear-gradient(135deg, #E11D2E, #ff7a45); box-shadow: 0 0 14px rgba(225,29,46,.5); }
.msg-body { min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1px; }
.msg-head b { font-size: 14.5px; }
.msg-head time { color: var(--muted); font-size: 11.5px; }
.msg-role { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--red); color: #fff; }
.msg-pin { font-size: 12px; }
.msg-text { margin: 0; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; font-size: 14.5px; color: rgba(255,255,255,.92); }
.msg-text a { color: #ff8a94; }
.msg-text.gone { color: var(--muted); font-style: italic; font-size: 13px; }
.mention { padding: 1px 5px; border-radius: 6px; background: rgba(255,159,67,.16); color: #ffcf9e; font-weight: 600; }
.mention.me { background: rgba(255,159,67,.35); color: #fff; }
.msg-quote { display: flex; gap: 6px; align-items: baseline; max-width: 100%; margin: 2px 0 4px; padding: 4px 10px; border: 0; border-left: 3px solid rgba(255,255,255,.25);
  border-radius: 6px; background: rgba(255,255,255,.04); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.msg-quote b { color: #fff; font-size: 12.5px; flex: 0 0 auto; }
.msg-quote span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-img { display: block; max-width: min(460px, 100%); max-height: 340px; margin-top: 6px; border-radius: 12px; cursor: zoom-in; border: 1px solid rgba(255,255,255,.1); object-fit: contain; background: #000; }
.msg-rx { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.msg-rx:empty { display: none; }
.rx { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #fff; border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 12.5px; cursor: pointer; transition: transform .2s var(--ease); }
.rx:hover { transform: scale(1.06); }
.rx.mine { border-color: rgba(225,29,46,.6); background: rgba(225,29,46,.18); }
.msg-actions { position: absolute; top: -14px; right: 18px; display: none; gap: 2px; padding: 3px; border-radius: 12px; z-index: 3;
  background: rgba(20,20,24,.96); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { display: flex; }
.ma { width: 30px; height: 28px; border: 0; background: none; color: #fff; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ma:hover { background: rgba(255,255,255,.1); } .ma.danger:hover { background: rgba(225,29,46,.3); }
.rx-picker { position: absolute; top: 30px; right: 0; display: flex; gap: 2px; padding: 4px; border-radius: 12px; z-index: 5; background: rgba(20,20,24,.98) !important; }
.rx-picker button { border: 0; background: none; font-size: 18px; width: 34px; height: 32px; border-radius: 8px; cursor: pointer; }
.rx-picker button:hover { background: rgba(255,255,255,.1); }
.cm-jump { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 4; border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 600;
  background: var(--red); color: #fff; cursor: pointer; box-shadow: 0 8px 24px rgba(225,29,46,.45); animation: msgIn .4s var(--ease); }
.cm-pinned { position: absolute; z-index: 6; top: 62px; right: 16px; width: min(380px, calc(100% - 32px)); max-height: 60%; display: flex; flex-direction: column; border-radius: 18px;
  background: rgba(16,16,20,.97) !important; animation: pop .25s var(--ease); }
.cp-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.cp-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cp-list .muted { padding: 10px; margin: 0; }
.cp-item { text-align: left; border: 0; background: rgba(255,255,255,.04); border-radius: 10px; padding: 9px 11px; color: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.cp-item:hover { background: rgba(255,255,255,.08); } .cp-item b { font-size: 12.5px; } .cp-item span { font-size: 13px; color: rgba(255,255,255,.75); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icon-x { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; width: 28px; height: 28px; border-radius: 8px; }
.icon-x:hover { background: rgba(255,255,255,.08); color: #fff; }

.composer { position: relative; padding: 10px 16px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.composer.locked .cmp-row { opacity: .45; pointer-events: none; }
.cmp-info { font-size: 12.5px; color: #ffcf9e; padding: 0 4px 8px; }
.cmp-reply, .cmp-image { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin-bottom: 8px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 13px; color: rgba(255,255,255,.8); }
.cmp-reply span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-image img { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; }
.cmp-image span { flex: 1; }
.cmp-row { display: flex; align-items: flex-end; gap: 8px; padding: 6px; border-radius: 18px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); transition: border-color .25s, box-shadow .25s; }
.cmp-row:focus-within { border-color: rgba(225,29,46,.6); box-shadow: 0 0 0 4px rgba(225,29,46,.12); }
.cmp-attach { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; color: rgba(255,255,255,.7); margin: 0; transition: background .2s; }
.cmp-attach:hover { background: rgba(255,255,255,.08); color: #fff; }
#cmp-text { flex: 1; resize: none; border: 0; background: none; color: #fff; font: inherit; font-size: 15px; line-height: 1.45; padding: 9px 4px; margin: 0; max-height: 160px; outline: none; box-shadow: none; }
.cmp-send { width: 42px; height: 42px; border-radius: 13px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(180deg, #f0283a, #c8121f); box-shadow: 0 6px 18px rgba(225,29,46,.4); transition: transform .2s var(--ease); }
.cmp-send svg { width: 18px; height: 18px; fill: #fff; }
.cmp-send:hover { transform: translateY(-1px) scale(1.04); }
.cmp-send.busy { opacity: .6; }
.cmp-send:disabled { opacity: .4; cursor: default; }
.cmp-mentions { position: absolute; left: 70px; bottom: 74px; z-index: 6; min-width: 220px; padding: 6px; border-radius: 14px; display: flex; flex-direction: column; background: rgba(18,18,22,.98) !important; }
.cmp-mentions button { text-align: left; border: 0; background: none; color: #fff; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.cmp-mentions button:hover, .cmp-mentions button.sel { background: rgba(225,29,46,.22); }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,.88); cursor: zoom-out; animation: pop .2s ease; padding: 20px; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 12px; }
.chat-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 120; padding: 11px 18px; border-radius: 14px; background: rgba(20,20,24,.96);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 40px rgba(0,0,0,.5); font-size: 14px; animation: msgIn .3s var(--ease); transition: opacity .4s; }
.chat-toast.out { opacity: 0; }

@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; height: calc(100dvh - 150px); border-radius: 22px; }
  .chat-side { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); transform: translateX(-105%); transition: transform .35s var(--ease);
    background: rgba(12,12,14,.98); border-right: 1px solid rgba(255,255,255,.1); box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  body.chat-drawer .chat-side { transform: none; }
  body.chat-drawer::after { content: ""; position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.55); }
  .cm-menu { display: grid; }
  .cm-pins span { display: none; }
  .msg { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 6px 10px; margin: 0 2px; }
  .msg-av { width: 34px; height: 34px; font-size: 12px; }
  .msg-actions { right: 8px; }
  .cmp-mentions { left: 16px; }
}
.inline-edit { display: inline-block; position: relative; }
.inline-edit summary { list-style: none; cursor: pointer; }
.inline-edit summary::-webkit-details-marker { display: none; }
.edit-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 420px; max-width: 80vw; white-space: normal; background: rgba(16,16,20,.98) !important; }
.inline-dot { display: inline-block; vertical-align: middle; margin-right: 4px; background: #22c55e; }

/* the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }
#cmp-text { min-height: 0; width: auto; display: block; border-radius: 0; }
.cmp-row { align-items: center; }

/* =====================================================================
   ANALYSES + NOTIFICATIONS
   ===================================================================== */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.post { position: relative; padding: 20px 22px; border-radius: 24px; display: flex; flex-direction: column; gap: 10px; transition: transform .4s var(--ease), border-color .4s; }
.post:hover { transform: translateY(-3px); border-color: rgba(225,29,46,.35); }
.post.is-pinned { border-color: rgba(255,159,67,.45); }
.post-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.post-head { display: flex; align-items: center; gap: 10px; }
.ph-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ph-meta b { font-size: 14px; } .ph-meta small { color: var(--muted); font-size: 12px; }
.post-title { font-size: 20px; letter-spacing: -.01em; margin: 2px 0 0; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-tags span, .post-tags a { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(225,29,46,.14); color: #ffb3b9; text-decoration: none; }
.post-excerpt { margin: 0; color: rgba(255,255,255,.75); white-space: pre-line; line-height: 1.55; font-size: 14.5px; }
.post-gallery { position: relative; display: grid; gap: 6px; border-radius: 16px; overflow: hidden; }
.post-gallery.n1 { grid-template-columns: 1fr; } .post-gallery.n2 { grid-template-columns: 1fr 1fr; } .post-gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-gallery img { width: 100%; height: 100%; max-height: 260px; object-fit: cover; display: block; background: #000; }
.post-gallery.n3 img:first-child { grid-row: span 2; }
.post-gallery .more { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.7); font-size: 13px; font-weight: 700; }
.post-foot { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin-top: 2px; }
.pf-rx { display: flex; gap: 8px; flex: 1; } .pf-rx span { color: #fff; }
.pf-pdf { color: #ffcf9e; }
.post-full { padding: 26px 30px; border-radius: 28px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.post-h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; margin: 4px 0 0; }
.post-body { white-space: pre-wrap; line-height: 1.7; font-size: 15.5px; color: rgba(255,255,255,.88); }
.post-images { display: grid; gap: 10px; }
.post-images img { width: 100%; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); cursor: zoom-in; background: #000; }
.pdf-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; text-decoration: none; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); max-width: 420px; transition: background .3s, border-color .3s; }
.pdf-card:hover { background: rgba(225,29,46,.12); border-color: rgba(225,29,46,.4); }
.pdf-ico { width: 44px; height: 52px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--red); }
.pdf-card span:last-child { display: flex; flex-direction: column; } .pdf-card small { color: var(--muted); }
.post-react { display: flex; gap: 8px; flex-wrap: wrap; }
.post-react .rx { padding: 6px 14px; font-size: 15px; }
.disclaimer { margin: 0; font-size: 12px; color: var(--muted); }
.btn-pill.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.comments { padding: 22px 26px; border-radius: 26px; }
.comments h2 { font-size: 18px; margin: 0 0 14px; }
.comment { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.comment.by-admin { background: linear-gradient(90deg, rgba(225,29,46,.08), transparent 60%); border-radius: 12px; padding-left: 8px; }
.avatar.admin { background: linear-gradient(135deg, #E11D2E, #ff7a45); }
.cm-h { display: flex; align-items: baseline; gap: 8px; } .cm-h time { color: var(--muted); font-size: 11.5px; }
.cm-del { align-self: start; }
.comment-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; padding: 6px; border-radius: 18px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); }
.comment-form textarea { flex: 1; min-height: 44px; max-height: 200px; border: 0; background: none; color: #fff; font: inherit; padding: 10px; margin: 0; resize: vertical; outline: none; }

/* notification centre */
.nbell { position: relative; }
.nbell .gbell { border: 1px solid var(--glass-line); cursor: pointer; font: inherit; }
.npanel { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, 92vw); max-height: 70vh; display: flex; flex-direction: column; z-index: 80; border-radius: 20px;
  background: rgba(16,16,20,.97); border: 1px solid var(--glass-line); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .25s var(--ease); overflow: hidden; }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.np-link { border: 0; background: none; color: #ff8a94; font: inherit; font-size: 12.5px; cursor: pointer; }
.np-push, .np-ios { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13px; background: rgba(225,29,46,.1); border-bottom: 1px solid rgba(225,29,46,.2); }
.np-push span { flex: 1; }
.np-ios { display: block; line-height: 1.5; }
.np-ok { margin: 0; padding: 10px 16px; font-size: 13px; color: #86efac; }
.np-list { overflow-y: auto; padding: 6px; }
.np-item { display: flex; gap: 12px; padding: 10px; border-radius: 14px; text-decoration: none; transition: background .2s; }
.np-item:hover { background: rgba(255,255,255,.06); }
.np-item.unread { background: rgba(225,29,46,.08); }
.np-item.unread .np-text b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.np-ico { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.07); font-size: 16px; }
.np-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.np-text b { font-size: 13.5px; line-height: 1.3; }
.np-text small { color: rgba(255,255,255,.65); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-text time { color: var(--muted); font-size: 11px; }
.np-empty { color: var(--muted); font-size: 13.5px; padding: 18px; margin: 0; text-align: center; }

/* admin analysis editor */
.post-editor .card { margin-bottom: 16px; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag-pick input { position: absolute; opacity: 0; width: 0; }
.tag-pick span { display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.75); font-size: 13px; cursor: pointer; transition: all .2s; }
.tag-pick input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.tag-pick input:focus-visible + span { outline: 2px solid #fff; }
.ed-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ed-img { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ed-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; }
.ed-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .post-full, .comments { padding: 18px 16px; } .post-gallery.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .post-gallery.n3 img:first-child { grid-row: auto; grid-column: span 2; } }
a.fchip { text-decoration: none; display: inline-flex; align-items: center; }

/* =====================================================================
   GROUPS (bootcamps)
   ===================================================================== */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.group-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 22px; text-decoration: none; min-height: 150px;
  border-color: color-mix(in srgb, var(--gc, #E11D2E) 40%, transparent) !important; transition: transform .35s var(--ease); }
a.group-card:hover { transform: translateY(-3px); }
.gc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gc); box-shadow: 0 0 14px var(--gc); }
.group-card > b { font-size: 18px; }
.gc-stats { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.new-group { border-style: dashed !important; border-color: rgba(255,255,255,.18) !important; }
.new-group form { margin-top: 8px; }
.color-row { display: flex; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }
.color-pick input { position: absolute; opacity: 0; width: 0; }
.color-pick span { display: block; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .2s; }
.color-pick input:checked + span { border-color: #fff; transform: scale(1.12); }
.pick-search { margin: 0 0 10px; }
.pick-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.25); margin-bottom: 12px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; margin: 0; cursor: pointer; color: #fff; }
.pick-row:hover { background: rgba(255,255,255,.06); }
.pick-row span { display: flex; flex-direction: column; } .pick-row small { color: var(--muted); font-size: 12px; }
.rsv { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.rsv > span:first-child { width: 100%; }
.rsv-item { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); }
.exp-form { display: inline-flex; align-items: center; gap: 6px; }
.exp-form input[type=date] { width: auto; margin: 0; padding: 6px 10px; }
.vis-picker { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.08); }
.vis-picker.compact { margin: 0 0 12px; }
.vp-label { font-size: 13px; font-weight: 600; }
.vp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vp-all { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px dashed rgba(255,255,255,.2); color: var(--muted); }
.vp-all.on { border-style: solid; border-color: rgba(34,197,94,.5); color: #86efac; background: rgba(34,197,94,.1); }
.vp-chip { margin: 0; }
.vp-chip input { position: absolute; opacity: 0; width: 0; }
.vp-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.8); font-size: 12.5px; cursor: pointer; transition: all .2s; }
.vp-chip span i { width: 8px; height: 8px; border-radius: 50%; background: var(--gc); }
.vp-chip input:checked + span { background: color-mix(in srgb, var(--gc) 25%, transparent); border-color: var(--gc); color: #fff; }
.vp-chip input:focus-visible + span { outline: 2px solid #fff; }
.gtag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin: 2px 4px 0 0;
  background: color-mix(in srgb, var(--gc) 18%, transparent); border: 1px solid color-mix(in srgb, var(--gc) 45%, transparent); color: #fff; }
.gtag i { width: 6px; height: 6px; border-radius: 50%; background: var(--gc); }
.gtag.everyone { --gc: #22c55e; }
.member-of { margin-bottom: 18px; }
.mo-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.mo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mo-row.inactive { opacity: .55; }
.mo-add { margin-top: 10px; }

/* ---------- Higgsfield brand art */
.login-page .login-card { position: relative; background: rgba(12,12,14,.72); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }

/* ---- premium minimal art: one ember light beam on warm black (no pictures) ---- */
.beam-cover { background: radial-gradient(120% 90% at 100% 0%, #1c1210, #0c0908 60%) !important; overflow: hidden; }
.beam-cover::before { content: ""; position: absolute; inset: -40%; transform: rotate(calc(var(--a, 32deg) * -1));
  background: linear-gradient(180deg, transparent 40%, rgba(255,90,31,.35) 46%, rgba(255,170,120,.85) 49.5%, rgba(255,230,210,.9) 50%, rgba(255,120,60,.45) 52%, transparent 60%);
  filter: blur(10px); opacity: .9; transition: transform 1.2s var(--ease), opacity .6s; }
.beam-cover::after { content: "" !important; position: absolute; inset: 0; opacity: .5 !important; -webkit-mask-image: none !important; mask-image: none !important;
  background: radial-gradient(1px 1px at 22% 30%, #fff7 50%, transparent), radial-gradient(1px 1px at 72% 64%, #fff5 50%, transparent),
    radial-gradient(1px 1px at 46% 80%, #fff4 50%, transparent), radial-gradient(1px 1px at 84% 22%, #fff6 50%, transparent) !important; }
.tilt:hover .beam-cover::before { transform: rotate(calc(var(--a, 32deg) * -1)) translateY(-4%); opacity: 1; }
.slide-bg .beam-cover { z-index: 1; }
.slide-bg .beam-cover ~ .art { display: none; }

.login-page { background: #0b0908; position: relative; overflow-x: hidden; }
.login-page::before { content: ""; position: fixed; z-index: 0; pointer-events: none; top: -12%; right: -14%; width: 70vw; height: 26vw; min-height: 200px; transform: rotate(-32deg);
  background: linear-gradient(90deg, transparent 0%, rgba(255,90,31,0) 18%, rgba(255,90,31,.35) 48%, rgba(255,150,90,.75) 66%, rgba(255,214,180,.5) 74%, transparent 86%);
  filter: blur(44px); opacity: .85; }
.login-page::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 96px 96px; -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); }
.login-page > * { position: relative; z-index: 1; }
.login-page .login-card { background: rgba(16,13,12,.72); border-color: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 40px 100px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05); }
@media (max-width: 640px) { .login-page::before { width: 120vw; height: 60vw; right: -50%; } }
.login-page .btn-red { background: linear-gradient(180deg, #ff6a3d, #e8371f); box-shadow: 0 8px 26px rgba(255,90,31,.28), inset 0 1px 0 rgba(255,255,255,.25); }
.login-page::before { top: 4%; right: -24%; height: 13vw; min-height: 130px; filter: blur(32px); }

/* ---- sign-up form (public) ---- */
.signup-card { width: min(560px, 100%); }
.su-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.su-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
.su-cohorts { border: 0; padding: 0; margin: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.su-cohorts legend { font-size: 13px; margin-bottom: 8px; padding: 0; }
.su-chip { margin: 0 !important; cursor: pointer; }
.su-chip input { position: absolute; opacity: 0; pointer-events: none; }
.su-chip span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 13.5px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); transition: all .25s var(--ease, ease); }
.su-chip span i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: .5; }
.su-chip input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); color: #fff; }
.su-chip input:checked + span i { opacity: 1; box-shadow: 0 0 10px var(--c); }
.su-chip input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
.su-sep { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #8e8781; }
.su-sep::before, .su-sep::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.08); }
.su-done { text-align: center; }
.su-check { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font-size: 24px; color: #fff;
  background: linear-gradient(180deg, #ff6a3d, #e8371f); box-shadow: 0 10px 30px rgba(255,90,31,.35); margin-bottom: 10px; }
.su-done .btn { margin-top: 16px; }
/* sign-up: WhatsApp code + screenshot proof */
.sp-lead { margin: 0 0 14px; line-height: 1.5; }
.sp-steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: sp; display: grid; gap: 16px; }
.sp-steps > li { counter-increment: sp; position: relative; padding: 14px 14px 14px 48px; border-radius: 14px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); }
.sp-steps > li::before { content: counter(sp); position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #ff6a3d, #e8371f); }
.sp-steps > li > span { display: block; font-size: 14px; line-height: 1.45; margin-bottom: 10px; }
.sp-code { font: 700 26px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-align: center; padding: 14px 10px;
  border-radius: 12px; background: #0d0c0b; border: 1px dashed rgba(255,106,61,.55); color: #fff; margin: 4px 0 10px; user-select: all; direction: ltr; }
.su-done .sp-code { margin-top: 14px; }
.btn-wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn-wa:hover { background: #23bd60; }
.sp-form { display: grid; gap: 8px; }
.sp-file { display: grid; gap: 6px; font-size: 13.5px; }
.sp-file input[type=file] { width: 100%; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.18); color: inherit; }
.sp-out { margin-top: 10px; } .sp-out .linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.su-proofs { display: flex; gap: 4px; margin-top: 4px; }
.su-proofs img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); }
@media (max-width: 560px) { .su-row { grid-template-columns: 1fr; gap: 0; } }

/* ---- sign-ups (admin) ---- */
.su-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.su-link { display: flex; gap: 8px; flex: 1 1 340px; max-width: 520px; }
.su-link input { flex: 1; margin: 0; font-family: ui-monospace, monospace; font-size: 13px; }
.su-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.su-filters .search { margin-left: auto; } .su-filters .search input { margin: 0; min-width: 240px; }
.su-gap { width: 10px; }
.su-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 13px; text-decoration: none; color: inherit;
  border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.03); }
.su-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.su-pill b { font-weight: 600; opacity: .7; }
.su-pill.on { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.su-bulk { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.su-bulk .check-label { margin: 0 8px 0 0; }
.su-tag { border-color: var(--c) !important; color: #fff; background: color-mix(in srgb, var(--c) 18%, transparent) !important; }

/* ---- language switcher (FR · EN · ع) ---- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.lang-switch a { min-width: 30px; height: 26px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: rgba(255,255,255,.55); text-decoration: none; transition: all .2s; }
.lang-switch a[lang=ar] { font-size: 14px; letter-spacing: 0; }
.lang-switch a:hover { color: #fff; background: rgba(255,255,255,.06); }
.lang-switch a.on { color: #fff; background: rgba(255,255,255,.12); }
.lang-switch.in-card { position: absolute; top: 14px; inset-inline-end: 14px; }
.login-card { position: relative; }
.lang-switch.in-menu { display: none; margin: 8px 0; }
@media (max-width: 760px) { .lang-switch.in-bar { display: none; } .lang-switch.in-menu { display: inline-flex; } }

/* ---- Arabic: right-to-left + Arabic-friendly type ---- */
html[lang=ar] body { font-family: "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif; }
html[lang=ar] *, html[lang=ar] *::before, html[lang=ar] *::after { letter-spacing: 0 !important; }
html[lang=ar] h1, html[lang=ar] h2, html[lang=ar] h3 { line-height: 1.35; }
html[dir=rtl] .mono, html[dir=rtl] input[type=email], html[dir=rtl] input[type=tel], html[dir=rtl] input[name=username],
html[dir=rtl] input[name=discord], html[dir=rtl] input[type=password], html[dir=rtl] .wm, html[dir=rtl] .wm-flash { direction: ltr; }
html[dir=rtl] input[type=email], html[dir=rtl] input[type=tel], html[dir=rtl] input[name=username], html[dir=rtl] input[name=discord],
html[dir=rtl] input[type=password] { text-align: right; }
html[dir=rtl] .round .ico { transform: scaleX(-1); }
/* content written by Ayoub/students (titles, chat, notes) takes the direction of its own text */
html[dir=rtl] :is(.slide-desc, .lcard-body b, .lcard-body small, .cont-body b, .cont-body span, .cm-text b, .post-title, .post-excerpt,
  .post-body, .lesson-title, .notes-body, .ag-title, .ag-desc, .ag-course, .dcard em, .msg-text, .msg-quote span, .np-text b,
  .np-text small, .nt-main b, .crumbs, .lesson-list .lt, .comment .msg-text, .rcard b, .cm-title small, .cs-item, .chips .chip) { unicode-bidi: plaintext; }
html[dir=rtl] .cm-send svg, html[dir=rtl] .cmp-send svg { transform: scaleX(-1); }
/* right-to-left mirrors of absolutely positioned pieces */
html[dir=rtl] .hero-nav { right: auto; left: 24px; }
html[dir=rtl] .hero-dots { margin-right: 0; margin-left: 6px; }
html[dir=rtl] .badge { left: auto; right: 30px; }
html[dir=rtl] .cont-body { left: 52px; right: 14px; }
html[dir=rtl] .play-sm { right: auto; left: 12px; }
html[dir=rtl] .lcard-body { left: 66px; right: 14px; }
html[dir=rtl] .play { right: auto; left: 14px; }
html[dir=rtl] .agenda { border-left: 0; padding-left: 0; border-right: 1px solid rgba(255,255,255,.08); padding-right: 28px; }
html[dir=rtl] .ag-list { padding-right: 0; padding-left: 4px; }
html[dir=rtl] .chat-side { border-right: 0; border-left: 1px solid rgba(255,255,255,.07); }
html[dir=rtl] .msg-actions { right: auto; left: 18px; }
html[dir=rtl] .cm-pinned { right: auto; left: 16px; }
html[dir=rtl] .cmp-mentions { left: auto; right: 70px; }
html[dir=rtl] .nav-badge { right: auto; left: 4px; }
html[dir=rtl] .gbell .dot { right: auto; left: 6px; }
html[dir=rtl] .post-gallery .more { right: auto; left: 10px; }
html[dir=rtl] .np-item.unread .np-text b::after { margin-left: 0; margin-right: 6px; }
@media (max-width: 760px) { html[dir=rtl] .hero-nav { left: 20px; right: 20px; } html[dir=rtl] .msg-actions { left: 8px; right: auto; } html[dir=rtl] .cmp-mentions { right: 16px; } }
html[dir=rtl] .umenu { right: auto; left: 0; }
/* anything that bleeds past the edge must not create a sideways scroll in right-to-left */
html[dir=rtl], html[dir=rtl] body { overflow-x: hidden; }
html[dir=rtl] .day.band-start::before { left: 0; right: 4px; border-radius: 0 999px 999px 0; }
html[dir=rtl] .day.band-end::before { right: 0; left: 4px; border-radius: 999px 0 0 999px; }

/* ---------------------------------------------------------------- admin Live dashboard */
.live-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #86efac; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.live-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; margin-bottom: 22px; }
.live-col h3 { margin: 0 0 12px; }
.lv-list { display: flex; flex-direction: column; gap: 10px; }
.lv-row { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.lv-row.idle { opacity: .62; }
.lv-av { position: relative; flex: none; }
.lv-st { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #111; background: #22c55e; }
.lv-row.idle .lv-st { background: #eab308; }
.lv-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.lv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-name { font-weight: 600; color: inherit; }
.lv-pills { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.lv-pill { font-size: 11px; padding: 1px 8px; border-radius: 999px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
td .lv-pills { margin-left: 8px; }
.lv-act { font-size: 14px; overflow-wrap: anywhere; }
.lv-ico { display: inline-block; width: 1.4em; text-align: center; }
.lv-bar { width: 100%; height: 4px; }
.lv-feed { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; }
.lv-ev { display: grid; grid-template-columns: 44px 1.6em minmax(0, 1fr); align-items: baseline; gap: 6px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13px; }
.lv-ev .lv-t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.lv-ev .lv-txt { overflow-wrap: anywhere; }
.lv-ev .lv-txt a { font-weight: 600; color: inherit; }
.lv-ev.k-offline, .lv-ev.k-page { color: var(--muted); }
@media (max-width: 1000px) { .live-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- GEX dashboard (student) */
.gx-board { --gx-green: #3FB950; --gx-red: #E5534B; --gx-gold: #f0a35e; border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.gx-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; vertical-align: middle; animation: livePulse 1.8s infinite; }
.gx-live.off { background: #eab308; animation: none; }
.gx-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.gx-tickers { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.gx-tk { font: 600 12px/1 var(--mono, ui-monospace, monospace); color: var(--muted); background: none; border: 0; padding: 8px 11px; border-radius: 10px; cursor: pointer; }
.gx-tk:hover { color: #fff; }
.gx-tk.on { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(225,29,46,.3); }
.gx-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.gx-field select { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: #fff; border-radius: 10px; padding: 7px 10px; font: 500 12px ui-monospace, monospace; min-width: 120px; }
.gx-refresh { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.gx-refresh:hover { color: #fff; }
.gx-refresh.spin svg { animation: gxspin .7s linear infinite; }
@keyframes gxspin { to { transform: rotate(360deg); } }
.gx-status { margin-left: auto; font-size: 12px; color: var(--muted); align-self: center; }
.gx-summary { display: flex; overflow-x: auto; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); font-family: ui-monospace, "JetBrains Mono", monospace; }
.gx-grp { display: flex; gap: 18px; padding: 10px 16px; border-right: 1px solid rgba(255,255,255,.06); }
.gx-grp:last-child { border-right: 0; }
.gx-item { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.gx-item .l { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.gx-item .v { font-size: 14px; font-weight: 600; }
.gx-board .g { color: var(--gx-green); } .gx-board .r { color: var(--gx-red); } .gx-item .v.gold { color: var(--gx-gold); }
.gx-wrap { overflow: auto; max-height: calc(100vh - 290px); min-height: 360px; border-radius: 14px; border: 1px solid rgba(255,255,255,.06); -webkit-overflow-scrolling: touch; }
.gx-table { border-collapse: collapse; width: 100%; font: 11.5px ui-monospace, "JetBrains Mono", monospace; }
.gx-table thead th { position: sticky; top: 0; z-index: 2; background: #141012; color: var(--muted); font-weight: 500; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.gx-table td { padding: 2px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,.035); }
.gx-table td.k { text-align: center; font-weight: 700; color: var(--gx-gold); background: rgba(255,255,255,.03); border-left: 1px solid rgba(255,255,255,.06); border-right: 1px solid rgba(255,255,255,.06); }
.gx-table tr.atm td { background: rgba(79,163,255,.09); } .gx-table tr.atm td.k { background: rgba(79,163,255,.22); color: #fff; }
.gx-table tr.cwall td.k { box-shadow: inset 3px 0 0 var(--gx-green); } .gx-table tr.pwall td.k { box-shadow: inset 3px 0 0 var(--gx-red); }
.gx-table .dim { color: rgba(255,255,255,.22); }
.gx-barcell { width: 200px; padding: 0 4px !important; }
.gx-bar { position: relative; height: 13px; }
.gx-bar .c { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.14); }
.gx-bar b { position: absolute; top: 1px; bottom: 1px; border-radius: 2px; }
.gx-msg { text-align: center !important; color: var(--muted); padding: 28px !important; white-space: normal !important; }
.gx-msg.err { color: #ff8a8a; }
@media (max-width: 768px) {
  .gx-board { padding: 10px; border-radius: 18px; }
  .gx-status { margin-left: 0; width: 100%; }
  .gx-field { flex: 1 1 120px; } .gx-field select { width: 100%; min-width: 0; }
  .gx-wrap { max-height: 70vh; }
  .gx-barcell { width: 110px; }
  .gx-grp { gap: 12px; padding: 8px 12px; }
}
html[dir=rtl] .gx-board { direction: ltr; }

/* ---------------------------------------------------------------- Options Flow hub + tool frame */
.of-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 26px; }
.of-cats .fchip span { opacity: .55; margin-inline-start: 4px; }
.of-sec { margin-bottom: 34px; scroll-margin-top: 110px; }
.of-h { font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: 0 0 14px; }
.of-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.of-card { --acc: #E11D2E; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px; border-radius: 20px; color: inherit; text-decoration: none; overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; min-height: 180px; }
.of-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--acc), transparent); opacity: .7; }
.of-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--acc) 45%, transparent); box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--acc) 60%, transparent); }
.of-flow { --acc: #22c55e; } .of-vol { --acc: #a78bfa; } .of-levels { --acc: #f59e0b; }
.of-top { display: flex; align-items: center; justify-content: space-between; }
.of-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font: 700 17px/1 ui-monospace, monospace; color: var(--acc); background: color-mix(in srgb, var(--acc) 13%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent); }
.of-tag { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid rgba(255,255,255,.1); padding: 3px 8px; border-radius: 999px; }
.of-name { font-size: 17px; letter-spacing: -.01em; }
.of-desc { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }
.of-open { font-size: 13px; font-weight: 600; color: var(--acc); }
.of-card:hover .of-open span { display: inline-block; transform: translateX(3px); transition: transform .2s; }
html[dir=rtl] .of-card:hover .of-open span { transform: translateX(-3px); }

.of-toolbar { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; flex-wrap: wrap; }
.of-back { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.of-back:hover { color: #fff; }
.of-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.of-title b { font-size: 18px; }
.of-title .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-switch select { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: #fff; border-radius: 12px; padding: 8px 12px; font-size: 13px; max-width: 220px; }
.of-full { width: 36px; height: 36px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.of-full:hover { color: #fff; }
.of-frame-wrap { border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); background: #0a0b0d; height: calc(100vh - 190px); min-height: 560px; margin-bottom: 24px; }
.of-frame-wrap:fullscreen, .of-frame-wrap.pseudo-fs { position: fixed; inset: 0; z-index: 9999; height: 100vh; border-radius: 0; margin: 0; }
.of-frame { width: 100%; height: 100%; border: 0; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 768px) {
  .of-title .small { display: none; }
  .of-switch { flex: 1; } .of-switch select { width: 100%; max-width: none; }
  .of-frame-wrap { height: calc(100vh - 170px); min-height: 480px; border-radius: 14px; }
  .of-grid { grid-template-columns: 1fr; }
}

/* ---------- admin: notifications page */
.nt-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin: 16px 0; }
@media (max-width: 900px) { .nt-grid { grid-template-columns: 1fr; } }
.nt-form form { display: flex; flex-direction: column; gap: 12px; }
.nt-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.nt-form textarea { resize: vertical; }
.nt-sent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nt-sent li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.nt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-chip { font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); text-decoration: none; color: inherit; }
.nt-chip:hover { background: rgba(255,255,255,.1); }

/* ---------- live chart (Binance) */
.ch-board { border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ch-board:fullscreen, .ch-board.pseudo-fs { position: fixed; inset: 0; z-index: 300; border-radius: 0; margin: 0; background: #070708; }
.ch-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ch-symbol { position: relative; }
.ch-sym-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; padding: 6px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: inherit; cursor: pointer; }
.ch-sym-btn .ico { width: 16px; height: 16px; }
.ch-sym-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: min(320px, 86vw); padding: 10px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; background: rgba(14,14,16,.97); }
.ch-sym-pop[hidden] { display: none; }
.ch-sym-pop input { width: 100%; }
.ch-sym-list { max-height: 320px; overflow: auto; display: flex; flex-direction: column; }
.ch-sym-item { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 8px 10px; border-radius: 9px; border: 0; background: none; color: inherit; font: 600 14px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.ch-sym-item small { font: 12px/1 system-ui, sans-serif; color: var(--muted); }
.ch-sym-item:hover, .ch-sym-item.on { background: rgba(255,255,255,.08); }
.ch-stats { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.ch-last { font-size: 22px; font-weight: 700; }
.ch-chg { font-weight: 600; }
.ch-stat { display: flex; flex-direction: column; font-size: 13px; }
.ch-stat small { color: var(--muted); font-size: 11px; }
.ch-board .up { color: #22c55e; } .ch-board .down { color: #ff4d5e; }
.ch-status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.ch-status i { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.ch-status.live i { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ch-pulse 2s infinite; }
.ch-status.err i { background: #ff4d5e; } .ch-status.err { color: #ff8a95; }
@keyframes ch-pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.ch-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ch-tfs, .ch-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.ch-tf, .ch-tool { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 9px; border: 1px solid transparent; background: rgba(255,255,255,.04); color: rgba(255,255,255,.75); font: 600 13px/1 inherit; cursor: pointer; }
.ch-tf:hover, .ch-tool:hover { background: rgba(255,255,255,.1); }
.ch-tf.on { background: var(--red, #e11d2e); color: #fff; }
.ch-tool[aria-pressed="true"] { border-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,.1); }
.ch-tool .ico { width: 16px; height: 16px; }
.ch-area { position: relative; height: max(420px, calc(100vh - 300px)); border-radius: 16px; overflow: hidden; background: rgba(0,0,0,.25); }
.ch-board:fullscreen .ch-area, .ch-board.pseudo-fs .ch-area { height: auto; flex: 1; }
.ch-area.drawing { cursor: crosshair; }
.ch-chart { position: absolute; inset: 0; }
.ch-legend { position: absolute; top: 8px; left: 10px; z-index: 3; display: flex; gap: 10px; flex-wrap: wrap; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; pointer-events: none; max-width: calc(100% - 80px); }
.ch-legend b { color: #fff; font-family: inherit; }
.ch-legend i { font-style: normal; color: var(--muted); margin-right: 3px; }
.ch-hint { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 3; font-size: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.4); color: #fbbf24; pointer-events: none; white-space: nowrap; }
.ch-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .ch-board { padding: 10px; border-radius: 18px; }
  .ch-area { height: max(380px, calc(100vh - 330px)); }
  .ch-tool span:not(.sr-only) { display: none; }
  .ch-hint { white-space: normal; width: 86%; text-align: center; }
}
.ch-sym-btn b { display: inline-flex; align-items: center; gap: 8px; }
.ch-tag { font: 700 9.5px/1 system-ui, sans-serif; letter-spacing: .06em; padding: 3px 6px; border-radius: 6px; border: 1px solid; }
.ch-tag.perp { color: #fbbf24; border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.1); }
.ch-tag.spot { color: #60a5fa; border-color: rgba(96,165,250,.45); background: rgba(96,165,250,.1); }
.ch-sym-h { font: 700 10.5px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; }
.ch-sym-h:first-child { padding-top: 4px; }
.ch-sym-item > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.ch-sym-list { max-height: min(420px, 60vh); }

/* ---------- TradingView chart layouts */
.tv-board { border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.tv-board:fullscreen, .tv-board.pseudo-fs { position: fixed; inset: 0; z-index: 300; border-radius: 0; margin: 0; background: #070708; }
.tv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tv-layouts, .tv-actions { display: flex; gap: 4px; }
.tv-actions { margin-left: auto; }
.tv-lay, .tv-act { height: 32px; min-width: 34px; padding: 0 9px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: rgba(255,255,255,.78); font: 600 12.5px/1 inherit; cursor: pointer; text-decoration: none; }
.tv-lay:hover, .tv-act:hover { background: rgba(255,255,255,.1); }
.tv-lay[aria-checked="true"] { border-color: var(--red, #e11d2e); background: rgba(225,29,46,.16); }
.tv-act .ico { width: 16px; height: 16px; }
.tv-lay-ico { width: 18px; height: 14px; display: grid; gap: 2px; }
.tv-lay-ico i { background: currentColor; border-radius: 1.5px; opacity: .85; }
.tv-lay-1 { grid-template: 1fr / 1fr; } .tv-lay-1 i:nth-child(n+2) { display: none; }
.tv-lay-2v { grid-template: 1fr / 1fr 1fr; } .tv-lay-2v i:nth-child(n+3) { display: none; }
.tv-lay-2h { grid-template: 1fr 1fr / 1fr; } .tv-lay-2h i:nth-child(n+3) { display: none; }
.tv-lay-3 { grid-template: 1fr 1fr / 1.4fr 1fr; } .tv-lay-3 i:first-child { grid-row: span 2; } .tv-lay-3 i:nth-child(4) { display: none; }
.tv-lay-4 { grid-template: 1fr 1fr / 1fr 1fr; }
.tv-quick { display: flex; gap: 4px; flex-wrap: wrap; }
.tv-q { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: rgba(255,255,255,.8); font: 600 12.5px/1 inherit; cursor: pointer; }
.tv-q:hover { background: rgba(255,255,255,.1); }
.tv-q.on { background: var(--red, #e11d2e); border-color: var(--red, #e11d2e); color: #fff; }
.tv-tip { margin: 0; }
.tv-tip[hidden] { display: none; }
.tv-grid { display: grid; gap: 6px; height: max(540px, calc(100vh - 250px)); }
.tv-board:fullscreen .tv-grid, .tv-board.pseudo-fs .tv-grid { flex: 1; height: auto; }
.tv-grid[data-layout="1"] { grid-template: 1fr / 1fr; }
.tv-grid[data-layout="2v"] { grid-template: 1fr / 1fr 1fr; }
.tv-grid[data-layout="2h"] { grid-template: 1fr 1fr / 1fr; }
.tv-grid[data-layout="3"] { grid-template: 1fr 1fr / 1.4fr 1fr; }
.tv-grid[data-layout="3"] .tv-cell:first-child { grid-row: span 2; }
.tv-grid[data-layout="4"] { grid-template: 1fr 1fr / 1fr 1fr; }
.tv-cell { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.07); background: #0a0a0b; }
.tv-grid:not([data-layout="1"]) .tv-cell.sel { border-color: var(--red, #e11d2e); box-shadow: 0 0 0 1px var(--red, #e11d2e); }
.tv-cell-head { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); color: rgba(255,255,255,.7); font: 600 12px/1 inherit; cursor: pointer; text-align: left; }
.tv-cell-head b { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 11px; }
.tv-cell.sel .tv-cell-head { color: #fff; } .tv-cell.sel .tv-cell-head b { background: var(--red, #e11d2e); }
.tv-body { flex: 1; min-height: 0; }
.tv-body .tradingview-widget-container, .tv-body .tradingview-widget-container__widget { height: 100%; width: 100%; }
@media (max-width: 760px) {
  .tv-board { padding: 6px; border-radius: 16px; }
  .tv-grid { height: auto; grid-template: none !important; }
  .tv-grid .tv-cell { height: 72vh; grid-row: auto !important; }
  .tv-grid[data-layout="1"] .tv-cell { height: calc(100vh - 230px); min-height: 460px; }
  .tv-quick { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

/* ---------- chart tabs (Phostrade / TradingView) */
.cht-tabs { display: flex; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.cht-tabs a { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border-radius: 12px; text-decoration: none; color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); font-weight: 700; font-size: 14px; }
.cht-tabs a small { font-weight: 500; font-size: 11px; color: var(--muted); }
.cht-tabs a.on { color: #fff; border-color: var(--red, #e11d2e); background: rgba(225,29,46,.12); }

/* ---------- Phostrade pro chart (KLineChart + saved drawings) */
.cp-board { border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cp-board:fullscreen, .cp-board.pseudo-fs { position: fixed; inset: 0; z-index: 300; border-radius: 0; background: #070708; }
.cp-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-btn, .cp-select { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: rgba(255,255,255,.85); font: 600 13px/1 inherit; cursor: pointer; }
.cp-select { padding-right: 6px; width: auto; flex: none; }
.cp-btn:hover { background: rgba(255,255,255,.1); }
.cp-btn .ico { width: 16px; height: 16px; }
.cp-menu { position: relative; }
.cp-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: min(300px, 86vw); padding: 12px; border-radius: 14px; background: rgba(14,14,16,.97); display: flex; flex-direction: column; gap: 8px; }
.cp-pop[hidden] { display: none; }
.cp-pop-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cp-chip { padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: rgba(255,255,255,.8); font: 600 12px/1 ui-monospace, monospace; cursor: pointer; }
.cp-chip.on { background: var(--red, #e11d2e); border-color: var(--red, #e11d2e); color: #fff; }
.cp-stats { gap: 8px; }
.cp-stats .ch-last { font-size: 18px; }
.cp-saved { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.cp-saved.ok { color: #22c55e; } .cp-saved.err { color: #ff8a95; }
.cp-board .ch-status { margin-left: 0; }
.cp-board .up { color: #22c55e; } .cp-board .down { color: #ff4d5e; }
.cp-main { position: relative; display: flex; gap: 6px; height: max(520px, calc(100vh - 270px)); }
.cp-board:fullscreen .cp-main, .cp-board.pseudo-fs .cp-main { flex: 1; height: auto; }
.cp-tools { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); overflow-y: auto; scrollbar-width: none; }
.cp-tool { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 0; background: none; color: rgba(255,255,255,.72); cursor: pointer; }
.cp-tool .ico { width: 19px; height: 19px; }
.cp-tool:hover { background: rgba(255,255,255,.08); color: #fff; }
.cp-tool[aria-pressed="true"] { background: rgba(225,29,46,.18); color: #ff6b78; }
.cp-tool.danger:hover { color: #ff6b78; }
.cp-sep { width: 22px; height: 1px; flex: none; background: rgba(255,255,255,.1); margin: 3px 0; }
.cp-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px 0; }
.cp-color { width: 14px; height: 14px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; }
.cp-color.on { border-color: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.cp-chart { flex: 1; min-width: 0; border-radius: 12px; overflow: hidden; background: #0a0a0b; }
.cp-main .ch-hint { bottom: 40px; left: calc(50% + 24px); }
@media (max-width: 760px) {
  .cp-board { padding: 6px; border-radius: 16px; }
  .cp-main { height: calc(100vh - 250px); min-height: 460px; }
  .cp-top .ch-tfs { order: 5; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cp-tool { width: 30px; height: 30px; }
  .cp-saved { display: none; }
}

/* ---------- account-sharing verification */
.vf-card { max-width: 560px; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.vf-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vf-head h1 { margin: 4px 0 0; font-size: 22px; }
.vf-shield { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); color: #fbbf24; }
.vf-shield .ico { width: 28px; height: 28px; }
.vf-why { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 8px; }
.vf-why p { margin: 0; line-height: 1.55; font-size: 14px; }
.vf-alert { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); font-size: 13px; }
.vf-places small { color: var(--muted); }
.vf-note { font-size: 13px; }
.vf-status { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.vf-status p { margin: 4px 0 0; }
.vf-status.ok { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.35); }
.vf-status.err { background: rgba(225,29,46,.1); border: 1px solid rgba(225,29,46,.35); }
.vf-form { display: flex; flex-direction: column; gap: 12px; }
.vf-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.vf-form small { font-weight: 400; line-height: 1.45; }
.vf-confirm { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-weight: 500 !important; }
.vf-confirm input { margin-top: 3px; }
.vf-logout { text-align: center; }
/* admin */
.vf-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.vf-item { display: flex; flex-direction: column; gap: 10px; border-left: 3px solid rgba(255,255,255,.1); }
.vf-item.vf-submitted { border-left-color: #f59e0b; } .vf-item.vf-waiting { border-left-color: #e11d2e; }
.vf-item.vf-rejected { border-left-color: #a78bfa; } .vf-item.vf-approved { border-left-color: #22c55e; opacity: .75; }
.vf-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.vf-name { font-weight: 700; font-size: 16px; margin-right: 8px; }
.vf-tag-submitted { background: rgba(245,158,11,.15); color: #fbbf24; } .vf-tag-approved { background: rgba(34,197,94,.15); color: #4ade80; }
.vf-answer { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); }
.vf-answer p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.5; }
.vf-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.vf-imgs img { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); }
.vf-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vf-decide { display: flex; gap: 6px; flex: 1; min-width: 280px; }
.vf-decide input { flex: 1; min-width: 0; margin: 0; }
.al-actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.al-block { position: relative; }
.al-block summary { list-style: none; cursor: pointer; }
.al-block summary::-webkit-details-marker { display: none; }
.al-block-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 300px; padding: 12px; border-radius: 12px; background: rgba(14,14,16,.98); border: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.al-block-form input { margin: 0; }
.inline-details { display: inline-block; }
.inline-details .al-block-form { left: 0; right: auto; }

/* =========================================================== trading journal */
.jr { --pos: #22c55e; --neg: #ff4d5e; --line: rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 16px; }
.jr .pos { color: var(--pos); } .jr .neg { color: var(--neg); } .jr .zero { color: rgba(255,255,255,.7); }
.jr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.jr-title h1 { margin: 6px 0 4px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; }
.jr-title p { margin: 0; max-width: 560px; }
.jr-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jr-btn { height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 11px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #fff; font: 600 13.5px/1 inherit; cursor: pointer; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; white-space: nowrap; }
.jr-btn .ico { width: 16px; height: 16px; }
.jr-btn:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.jr-btn.primary { background: linear-gradient(180deg, #ef2b3c, #c8101f); border-color: transparent; box-shadow: 0 8px 22px -8px rgba(225,29,46,.7), inset 0 1px 0 rgba(255,255,255,.2); }
.jr-btn.primary:hover { box-shadow: 0 12px 28px -8px rgba(225,29,46,.85), inset 0 1px 0 rgba(255,255,255,.2); }
.jr-btn.danger { color: #ff8a95; border-color: rgba(255,77,94,.35); background: rgba(255,77,94,.08); }
.jr-btn.ghost { background: transparent; }
.jr-btn.wide { width: 100%; justify-content: center; margin-top: 10px; }
.jr-btn:disabled { opacity: .55; pointer-events: none; }
.jr-select { height: 38px; padding: 0 10px; border-radius: 11px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #fff; font: 500 13px/1 inherit; width: auto; margin: 0; }
.jr-select[hidden] { display: none; }
.jr-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.jr-seg.wrap { flex-wrap: wrap; }
.jr-seg button { height: 30px; padding: 0 12px; border-radius: 9px; border: 0; background: none; color: rgba(255,255,255,.65); font: 600 12.5px/1 inherit; cursor: pointer; transition: background .2s, color .2s; }
.jr-seg button:hover { color: #fff; }
.jr-seg button.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.jr-seg button.on.bull { background: rgba(34,197,94,.2); color: #4ade80; } .jr-seg button.on.bear { background: rgba(255,77,94,.2); color: #ff8a95; }
.jr-seg.small button { height: 28px; padding: 0 10px; }
.jr-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.jr-tabs button { position: relative; padding: 12px 16px; border: 0; background: none; color: rgba(255,255,255,.6); font: 600 14px/1 inherit; cursor: pointer; white-space: nowrap; }
.jr-tabs button:hover { color: #fff; }
.jr-tabs button.on { color: #fff; }
.jr-tabs button.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--red, #e11d2e); box-shadow: 0 0 12px rgba(225,29,46,.8); }
.jr-tabs i { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.08); margin-left: 4px; }
.jr-tabs i:empty { display: none; }
.jr-view[hidden], .jr-empty[hidden] { display: none; }
.jr-view { display: flex; flex-direction: column; gap: 16px; animation: jr-in .35s ease both; }
@keyframes jr-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* KPIs */
.jr-kpis { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 12px; }
.jr-kpi { position: relative; padding: 16px; border-radius: 18px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; min-width: 0; }
.jr-k-label { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.jr-k-val { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-k-sub { font-size: 12px; color: var(--muted); }
.jr-kpi-hero { grid-row: span 1; background: radial-gradient(120% 140% at 0% 0%, rgba(225,29,46,.18), transparent 55%), rgba(255,255,255,.03); }
.jr-k-big { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.jr-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 44px; opacity: .55; pointer-events: none; }
.jr-kpi-ring { flex-direction: row; align-items: center; gap: 12px; }
.jr-kpi-ring > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jr-ring { width: 54px; height: 54px; flex: none; transform: rotate(-90deg); }
.jr-ring circle { fill: none; stroke-width: 5; }
.jr-ring .bg { stroke: rgba(255,255,255,.08); }
.jr-ring .fg { stroke: var(--pos); stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }

/* cards */
.jr-row { display: grid; grid-template-columns: 1.7fr 1fr; gap: 12px; }
.jr-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.jr-card { padding: 16px 18px; border-radius: 18px; min-width: 0; }
.jr-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.jr-card-h h3 { margin: 0; font-size: 14.5px; letter-spacing: .01em; }
.jr-none { margin: 8px 0; font-size: 13px; }
.jr-equity { position: relative; height: 270px; }
.jr-eq-svg { width: 100%; height: 100%; display: block; }
.jr-eq-grid { stroke: rgba(255,255,255,.05); }
.jr-eq-zero { stroke: rgba(255,255,255,.22); stroke-dasharray: 4 4; }
.jr-eq-lbl { fill: rgba(255,255,255,.45); font-size: 11px; font-family: inherit; }
.jr-eq-hover { stroke: rgba(255,255,255,.25); stroke-dasharray: 3 3; }
.jr-eq-tip { position: absolute; top: 4px; width: 180px; padding: 8px 10px; border-radius: 10px; background: rgba(10,10,12,.92); border: 1px solid rgba(255,255,255,.12); font-size: 12px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.jr-eq-tip[hidden] { display: none; }
.jr-insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jr-insights li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.jr-insights li.good { border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.06); }
.jr-insights li.bad { border-color: rgba(255,77,94,.25); background: rgba(255,77,94,.06); }
.jr-ins-ico { flex: none; }
.jr-bars { display: flex; flex-direction: column; gap: 10px; }
.jr-bar-h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.jr-bar-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-bar-name::first-letter { text-transform: uppercase; }
.jr-k-slash { color: var(--muted); font-weight: 500; }
.jr-bar-meta { font-size: 11.5px; }
.jr-bar-h b { font-variant-numeric: tabular-nums; }
.jr-bar-track { position: relative; height: 6px; margin-top: 5px; border-radius: 99px; background: rgba(255,255,255,.05); }
.jr-bar-track::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(255,255,255,.18); }
.jr-bar-track i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.jr-bar-track i.pos { left: 50%; background: linear-gradient(90deg, rgba(34,197,94,.5), #22c55e); }
.jr-bar-track i.neg { right: 50%; background: linear-gradient(270deg, rgba(255,77,94,.5), #ff4d5e); }

/* trades table */
.jr-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px; border-radius: 16px; }
.jr-filters input[type=search] { flex: 1; min-width: 180px; height: 36px; margin: 0; border-radius: 10px; }
.jr-table-wrap { border-radius: 18px; overflow-x: auto; padding: 4px; }
.jr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.jr-table th { text-align: start; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.jr-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.jr-table td small { display: block; font-size: 11.5px; margin-top: 2px; }
.jr-table tbody tr { cursor: pointer; transition: background .15s; }
.jr-table tbody tr:hover, .jr-table tbody tr:focus { background: rgba(255,255,255,.04); outline: none; }
.jr-table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 11px 12px; border-radius: 0; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.04); -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 13.5px; font-weight: 600; }
.jr-table th.num { font-size: 11px; border-bottom-color: rgba(255,255,255,.07); padding: 12px 12px 10px; }
.jr-pnl { font-weight: 700; }
.jr-sym { letter-spacing: .02em; }
.jr-pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.jr-pill.long { color: #4ade80; background: rgba(34,197,94,.12); } .jr-pill.short { color: #ff8a95; background: rgba(255,77,94,.12); }
.jr-tags-cell { display: flex; gap: 4px; flex-wrap: wrap; }
.jr-tag { font-size: 11px; padding: 3px 8px; border-radius: 7px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.jr-tag.err { color: #fbbf24; border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.08); }
.jr-stars-cell { color: #fbbf24; letter-spacing: 1px; font-size: 12px; white-space: nowrap; }
.jr-icons { color: var(--muted); font-size: 12px; white-space: nowrap; display: flex; gap: 8px; }

/* calendar */
.jr-cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.jr-cal-head h3 { margin: 0; min-width: 160px; text-align: center; text-transform: capitalize; font-size: 16px; }
.jr-cal-total { margin-left: auto; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.jr-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: #fff; cursor: pointer; }
.jr-icon .ico { width: 17px; height: 17px; }
.jr-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(70px, .8fr); gap: 6px; }
.jr-cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 6px 4px; }
.jr-cal-cell { position: relative; min-height: 86px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: #fff; text-align: start; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; transition: transform .15s, border-color .15s; }
.jr-cal-cell:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.2); }
.jr-cal-cell.out { background: none; border-color: transparent; cursor: default; }
.jr-cal-cell.pos { background: rgba(34,197,94,var(--a)); border-color: rgba(34,197,94,.35); }
.jr-cal-cell.neg { background: rgba(255,77,94,var(--a)); border-color: rgba(255,77,94,.35); }
.jr-cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--red, #e11d2e); }
.jr-cal-cell.noted::after { content: "✎"; position: absolute; top: 7px; right: 8px; font-size: 11px; color: rgba(255,255,255,.6); }
.jr-cal-num { font-size: 12px; color: rgba(255,255,255,.65); font-weight: 600; }
.jr-cal-cell b { margin-top: auto; font-size: 14px; font-variant-numeric: tabular-nums; }
.jr-cal-cell small { font-size: 11px; color: rgba(255,255,255,.7); }
.jr-cal-week { border-radius: 12px; padding: 8px; display: flex; flex-direction: column; justify-content: center; gap: 2px; background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.08); font-variant-numeric: tabular-nums; }
.jr-cal-week b { font-size: 13.5px; } .jr-cal-week small { font-size: 11px; color: var(--muted); }

/* daily journal + fields */
.jr-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.75); margin-bottom: 12px; min-width: 0; }
.jr-field em { font-style: normal; font-weight: 500; color: var(--muted); }
.jr-field input, .jr-field select, .jr-field textarea { margin: 0; border-radius: 11px; }
.jr-field textarea { resize: vertical; line-height: 1.5; }
.jr-field-row { display: flex; gap: 18px; flex-wrap: wrap; }
.jr-stars { display: inline-flex; gap: 2px; }
.jr-star { width: 28px; height: 28px; border: 0; background: none; color: rgba(255,255,255,.18); font-size: 20px; cursor: pointer; padding: 0; transition: transform .15s, color .15s; }
.jr-star.on { color: #fbbf24; text-shadow: 0 0 12px rgba(251,191,36,.45); }
.jr-star:hover { transform: scale(1.15); }
.jr-stars.big .jr-star { width: 34px; height: 34px; font-size: 26px; }
.jr-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.jr-mini-list { display: flex; flex-direction: column; gap: 6px; }
.jr-mini { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: #fff; font: inherit; font-size: 13.5px; cursor: pointer; text-align: start; }
.jr-mini:hover { background: rgba(255,255,255,.05); }
.jr-mini-r { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.jr-mini-pnl { font-variant-numeric: tabular-nums; }

/* empty state */
.jr-empty { text-align: center; padding: 48px 20px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.jr-empty h2 { margin: 0; font-size: 22px; }
.jr-empty p { margin: 0 0 8px; max-width: 460px; }
.jr-empty-art { width: 130px; color: var(--red, #e11d2e); filter: drop-shadow(0 0 18px rgba(225,29,46,.55)); }

/* drawer (trade editor) */
html.jr-lock, html.jr-lock body { overflow: hidden; }
.jr input[type=date], .jr-panel input[type=datetime-local] { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #fff; font: inherit; color-scheme: dark; }
.jr input[type=date].jr-select { width: auto; padding: 0 10px; }
.jr-drawer { position: fixed; inset: 0; z-index: 350; display: flex; justify-content: flex-end; }
.jr-drawer[hidden] { display: none; }
.jr-drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: jr-fade .25s ease both; }
@keyframes jr-fade { from { opacity: 0; } }
.jr-panel { position: relative; width: min(600px, 100vw); height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(20,20,23,.98), rgba(11,11,13,.99)); border-left: 1px solid rgba(255,255,255,.08); box-shadow: -30px 0 80px rgba(0,0,0,.6); animation: jr-slide .35s cubic-bezier(.2,.8,.2,1) both; }
[dir=rtl] .jr-drawer { justify-content: flex-start; }
[dir=rtl] .jr-panel { border-left: 0; border-right: 1px solid rgba(255,255,255,.08); animation-name: jr-slide-rtl; }
@keyframes jr-slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes jr-slide-rtl { from { transform: translateX(-40px); opacity: 0; } }
.jr-panel-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.jr-panel-h h2 { margin: 0; font-size: 19px; }
.jr-panel-body { flex: 1; overflow-y: auto; padding: 18px 20px 8px; }
.jr-panel-f { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(0,0,0,.25); }
.jr-panel-f .muted { flex: 1; text-align: end; }
.jr-side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.jr-side-toggle button { height: 46px; border-radius: 13px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: rgba(255,255,255,.6); font: 800 15px/1 inherit; letter-spacing: .04em; cursor: pointer; transition: all .2s; }
.jr-side-toggle .long.on { color: #fff; border-color: transparent; background: linear-gradient(180deg, #22c55e, #15924a); box-shadow: 0 8px 22px -8px rgba(34,197,94,.7); }
.jr-side-toggle .short.on { color: #fff; border-color: transparent; background: linear-gradient(180deg, #ef2b3c, #c8101f); box-shadow: 0 8px 22px -8px rgba(225,29,46,.7); }
.jr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.jr-grid3c { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.jr-sub-h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 8px 0 10px; display: flex; align-items: center; gap: 10px; }
.jr-sub-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.jr-calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 12px; }
.jr-calc div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.jr-calc span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.jr-calc b { font-size: 17px; font-variant-numeric: tabular-nums; }
.jr-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 12px; color: rgba(255,255,255,.75); }
.jr-check input { margin: 0; width: auto; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-chip { padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: rgba(255,255,255,.75); font: 600 12.5px/1 inherit; cursor: pointer; transition: all .15s; }
.jr-chip:hover { border-color: rgba(255,255,255,.25); color: #fff; }
.jr-chip.on { background: rgba(225,29,46,.18); border-color: rgba(225,29,46,.6); color: #fff; }
.jr-chips.emo .jr-chip.on { background: rgba(167,139,250,.18); border-color: rgba(167,139,250,.6); }
.jr-chips.err .jr-chip.on { background: rgba(251,191,36,.15); border-color: rgba(251,191,36,.6); color: #fde68a; }
.jr-shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jr-shots:empty { display: none; }
.jr-shot { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.jr-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jr-shot-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.jr-drop { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border-radius: 12px; border: 1.5px dashed rgba(255,255,255,.16); color: rgba(255,255,255,.6); font-weight: 500; cursor: pointer; transition: all .2s; }
.jr-drop[hidden] { display: none; }
.jr-drop:hover, .jr-drop.over { border-color: var(--red, #e11d2e); color: #fff; background: rgba(225,29,46,.06); }
.jr-drop .ico { width: 18px; height: 18px; }
.jr-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: rgba(16,16,18,.96); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 40px rgba(0,0,0,.55); font-size: 14px; animation: jr-in .3s ease both; transition: opacity .4s, transform .4s; }
.jr-toast.out { opacity: 0; transform: translate(-50%, 8px); }
.jr-toast .pos { color: #22c55e; } .jr-toast .neg { color: #ff4d5e; }

@media (max-width: 1100px) {
  .jr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jr-kpi-hero { grid-column: span 3; }
  .jr-row, .jr-grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .jr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .jr-kpi-hero { grid-column: span 2; }
  .jr-kpi { padding: 13px; }
  .jr-k-val { font-size: 18px; }
  .jr-head-actions { width: 100%; }
  .jr-head-actions .primary { flex: 1; justify-content: center; }
  .jr-cal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .jr-cal-week, .jr-cal-dow:nth-child(8) { display: none; }
  .jr-cal-cell { min-height: 58px; padding: 5px; border-radius: 8px; }
  .jr-cal-cell b { font-size: 10.5px; } .jr-cal-cell small { display: none; }
  .jr-grid3c { grid-template-columns: 1fr 1fr; }
  .jr-grid2 { grid-template-columns: 1fr; }
  .jr-equity { height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .jr-view, .jr-panel, .jr-drawer-bg, .jr-toast { animation: none; } }

.jr-k-wl { white-space: normal; text-align: start; }
[dir=rtl] .jr-k-wl { text-align: right; }


/* ---------- lot size calculator */
.cz { display: flex; flex-direction: column; gap: 16px; }
.cz-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cz-in { padding: 18px 20px; }
.cz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.cz-chips[hidden] { display: none; }
.cz-chips button { padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: rgba(255,255,255,.78); font: 600 12.5px/1 inherit; cursor: pointer; }
.cz-chips button:hover { border-color: var(--red, #e11d2e); color: #fff; }
.cz-risk-row { display: flex; gap: 10px; align-items: flex-end; }
.cz-risk-row .jr-field { flex: 1; }
.cz-risk-row .jr-seg { margin-bottom: 12px; }
.cz-inst-info { margin: -4px 0 12px; }
.cz-mode { margin-bottom: 12px; }
.cz-adv summary { cursor: pointer; font-weight: 600; font-size: 13px; color: rgba(255,255,255,.75); margin: 4px 0 10px; }
.cz-adv small { font-weight: 400; line-height: 1.4; }
.cz-out { position: sticky; top: 90px; padding: 22px; display: flex; flex-direction: column; gap: 12px; background: radial-gradient(120% 120% at 100% 0%, rgba(225,29,46,.16), transparent 55%), rgba(255,255,255,.03); }
.cz-size { display: flex; align-items: baseline; gap: 10px; }
.cz-size b { font-size: clamp(44px, 6vw, 64px); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.cz-size b.zero { color: #ff8a95; }
.cz-size span { font-size: 18px; font-weight: 600; color: rgba(255,255,255,.7); }
.cz-sub { font-size: 13px; color: var(--muted); min-height: 18px; }
.cz-side { align-self: flex-start; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 12.5px; }
.cz-side.long { color: #4ade80; background: rgba(34,197,94,.14); } .cz-side.short { color: #ff8a95; background: rgba(255,77,94,.14); }
.cz-side[hidden] { display: none; }
.cz-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cz-stats div { padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 3px; }
.cz-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cz-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.cz-stats small { font-size: 11.5px; color: var(--muted); }
.cz-tip { padding: 11px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.3); }
.cz-tip.warn { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.35); color: #fde68a; }
.cz-tip[hidden] { display: none; }
.cz-actions { display: flex; gap: 8px; }
.cz-actions .jr-btn { flex: 1; justify-content: center; }
.cz-actions .jr-btn.off { opacity: .45; pointer-events: none; }
.cz-note { margin: 0; line-height: 1.45; }
@media (max-width: 900px) { .cz-grid { grid-template-columns: 1fr; } .cz-out { position: static; order: -1; } }

/* ---------- one-to-one follow-up (/suivi + admin) ---------- */
.cf { display: grid; gap: 18px; max-width: 920px; margin: 0 auto; width: 100%; }
.cf-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.cf-stats > div { padding: 12px 18px; border-radius: 14px; display: grid; gap: 2px; min-width: 150px; }
.cf-stats span { font-size: 12px; opacity: .65; text-transform: uppercase; letter-spacing: .06em; }
.cf-stats b { font-size: 22px; }
.cf-card { display: grid; gap: 12px; scroll-margin-top: 90px; }
.cf-card h2 { margin: 0; font-size: 18px; }
#questions { scroll-margin-top: 90px; }
.cf-session-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cf-session-head > div { flex: 1; min-width: 180px; }
.cf-num { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(180deg, #ef2b3c, #c8101f); color: #fff; flex: none; }
.cf-notes { white-space: pre-wrap; line-height: 1.6; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.cf-sub { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.cf-thread { display: grid; gap: 10px; }
.cf-msg { padding: 10px 14px; border-radius: 14px; max-width: 88%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.cf-msg.coach { background: rgba(225,29,46,.1); border-color: rgba(225,29,46,.3); justify-self: start; }
.cf-msg.student { justify-self: end; }
.cf-msg.new { box-shadow: 0 0 0 2px rgba(225,29,46,.5); }
.cf-msg-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.cf-new { font-size: 11px; font-weight: 700; color: #fff; background: #e11d2e; border-radius: 99px; padding: 1px 8px; }
.cf-body { white-space: pre-wrap; margin: 6px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.cf-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cf-imgs img { width: 150px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); }
.cf-reply { display: grid; gap: 8px; }
.cf-reply textarea, .cf-form textarea, .cf-form input, .cf-add select { width: 100%; padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); color: inherit; font: inherit; }
.cf-reply-row { display: flex; align-items: center; gap: 10px; }
.cf-reply-row .jr-btn { margin-inline-start: auto; }
.cf-attach { cursor: pointer; font-size: 13.5px; padding: 7px 12px; border-radius: 10px; border: 1px dashed rgba(255,255,255,.2); }
.cf-attach input { display: none; }
.cf-attach.has { border-color: #e11d2e; }
.cf-form { display: grid; gap: 12px; }
.cf-form label { display: grid; gap: 6px; font-size: 13.5px; }
.cf-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.cf-edit summary { cursor: pointer; font-size: 13px; opacity: .75; }
.cf-edit[open] { display: grid; gap: 10px; }
.cf-add { display: flex; gap: 10px; }
.cf-add select { flex: 1; }
@media (max-width: 640px) { .cf-grid { grid-template-columns: 1fr; } .cf-msg { max-width: 100%; } .cf-imgs img { width: 120px; height: 84px; } }
