:root {
  --bg: #07080f;
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f1f2ff;
  --muted: #8d92b8;
  --violet: #7c5cff;
  --teal: #22d3c5;
  --pink: #ff5fa2;
  --up: #2ee6a6;
  --down: #ff5c7a;
  --grad: linear-gradient(135deg, var(--violet), var(--teal));
  --r: 20px;
  --font: "Outfit", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--font);
  height: 100dvh; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal); }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* ---------- aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .22; }
.aurora i:nth-child(1) { background: var(--violet); top: -25vmax; left: -15vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: var(--teal); bottom: -30vmax; right: -20vmax; opacity: .16; animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: var(--pink); top: 30%; left: 45%; width: 35vmax; height: 35vmax; opacity: .09; animation: drift1 40s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(12vmax, 10vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-14vmax, -8vmax) scale(.9); } }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 3px 3px; }

/* ---------- layout ---------- */
.app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column-reverse; }
.main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view { display: none; flex: 1; min-height: 0; flex-direction: column; animation: fade .35s ease; }
.view.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.page { flex: 1; overflow-y: auto; padding: 8px 16px 24px; width: 100%; max-width: 760px; margin: 0 auto; }
.page.wide { max-width: 1100px; }

/* ---------- nav ---------- */
.nav {
  display: flex; background: rgba(10, 11, 20, .75); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.nav-brand, .nav-foot { display: none; }
.nav button {
  flex: 1; background: none; border: 0; cursor: pointer; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; border-radius: 14px;
  transition: color .2s, background .2s;
}
.nav svg { width: 22px; height: 22px; }
.nav button.active { color: var(--text); }
.nav button.active svg { stroke: url(#g) var(--teal); color: var(--teal); }

@media (min-width: 900px) {
  .app { flex-direction: row; }
  .nav { flex-direction: column; width: 240px; border-top: 0; border-right: 1px solid var(--line); padding: 20px 14px; gap: 4px; }
  .nav-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
  .nav-brand b { display: block; font-size: 20px; letter-spacing: .3px; }
  .nav-brand small { color: var(--muted); font-size: 12px; }
  .nav button { flex: none; flex-direction: row; gap: 12px; padding: 11px 14px; font-size: 15px; }
  .nav button:hover { background: var(--glass); color: var(--text); }
  .nav button.active { background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }
  .nav-foot { display: block; margin-top: auto; color: var(--muted); font-size: 12px; padding: 0 14px; }
  .top-brand .orb { display: none; }
}

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 12px;
}
.top-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .2px; }
.top p { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); font-size: 14px; white-space: nowrap;
  transition: .25s;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: .25s; }
.pill[aria-pressed="true"] { border-color: rgba(34, 211, 197, .5); background: rgba(34, 211, 197, .12); }
.pill[aria-pressed="true"] .dot { background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: ping 1.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,211,197,.7); } 100% { box-shadow: 0 0 0 10px rgba(34,211,197,0); } }

/* ---------- the orb ---------- */
.orb { position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none; isolation: isolate; }
.orb::before, .orb::after, .orb span { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.orb::before { background: conic-gradient(from 0deg, var(--violet), var(--teal), var(--pink), var(--violet)); animation: spin 8s linear infinite; filter: blur(.5px); }
.orb span { inset: 12%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.85), rgba(255,255,255,0) 45%), radial-gradient(circle, #1a1640, #0b0b18 70%); }
.orb::after { inset: -30%; background: radial-gradient(circle, rgba(124,92,255,.35), transparent 65%); z-index: -1; animation: breathe 4s ease-in-out infinite; }
.orb.big { width: 132px; height: 132px; }
.orb.big span { inset: 7%; }
.orb.listening::before { animation-duration: 2s; }
.orb.listening::after { background: radial-gradient(circle, rgba(34,211,197,.55), transparent 65%); animation-duration: 1s; }
.orb.thinking::before { animation-duration: .9s; }
.orb.speaking { animation: talk .38s ease-in-out infinite alternate; }
.orb.speaking::after { background: radial-gradient(circle, rgba(255,95,162,.45), transparent 65%); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.15); opacity: .7; } }
@keyframes talk { to { transform: scale(1.08); } }

/* ---------- chat ---------- */
.messages { flex: 1; overflow-y: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 820px; margin: 0 auto; }
.hero { margin: auto; text-align: center; padding: 20px 4px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero h2 { margin: 10px 0 0; font-size: clamp(26px, 6vw, 38px); font-weight: 600; letter-spacing: -.5px; line-height: 1.15; }
.hero h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; max-width: 620px; }
.chip {
  background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; cursor: pointer;
  font-size: 14px; text-align: left; transition: .2s; backdrop-filter: blur(10px);
}
.chip:hover { border-color: var(--line-2); background: var(--glass-2); transform: translateY(-1px); }
.chip b { display: block; font-size: 12px; color: var(--teal); font-weight: 500; }
.notice { font-size: 14px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 14px; padding: 10px 14px; }
.notice b { color: var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.msg { display: flex; gap: 10px; max-width: 100%; }
.msg .bub { padding: 11px 15px; border-radius: var(--r); word-wrap: break-word; overflow-wrap: anywhere; unicode-bidi: plaintext; min-width: 0; }
.msg.user { justify-content: flex-end; }
.msg.user .bub { background: linear-gradient(135deg, rgba(124,92,255,.55), rgba(92,72,220,.45)); border: 1px solid rgba(124,92,255,.45); border-bottom-right-radius: 6px; max-width: 82%; white-space: pre-wrap; }
.msg.model .bub { background: var(--glass); border: 1px solid var(--line); border-top-left-radius: 6px; max-width: calc(100% - 44px); backdrop-filter: blur(12px); }
.msg.model .orb { width: 30px; height: 30px; margin-top: 2px; }
.msg.error .bub { background: rgba(255,92,122,.12); border: 1px solid rgba(255,92,122,.35); color: #ffd0d8; font-size: 14px; margin: 0 auto; }
.bub p { margin: 0 0 8px; } .bub p:last-child { margin-bottom: 0; }
.bub h4 { margin: 10px 0 6px; font-size: 15px; color: var(--teal); }
.bub ul, .bub ol { margin: 4px 0 8px; padding-inline-start: 20px; }
.bub li { margin: 2px 0; }
.bub code { font-family: "JetBrains Mono", monospace; font-size: 13px; background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; }
.bub img { max-width: 220px; max-height: 220px; border-radius: 12px; display: block; margin-bottom: 6px; }
.bub .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bub .tag { font-size: 12px; }
.bub .src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bub .src a { font-size: 12px; text-decoration: none; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bub .src a:hover { color: var(--text); }
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: rgba(34,211,197,.12); color: var(--teal); border: 1px solid rgba(34,211,197,.25); vertical-align: middle; }
.typing { display: inline-flex; gap: 5px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; transform: translateY(-2px); } }

.composer-wrap { padding: 8px 14px calc(12px); width: 100%; max-width: 820px; margin: 0 auto; }
.attach-strip { display: flex; gap: 8px; margin-bottom: 8px; }
.attach-strip:empty { display: none; }
.attach-strip .th { position: relative; }
.attach-strip img { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line-2); }
.attach-strip button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--down); color: #fff; font-size: 12px; cursor: pointer; line-height: 1; }
.composer {
  display: flex; align-items: flex-end; gap: 4px; padding: 6px;
  background: rgba(20, 21, 36, .7); border: 1px solid var(--line-2); border-radius: 26px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 10px 40px rgba(0,0,0,.35);
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: rgba(124,92,255,.6); box-shadow: 0 10px 40px rgba(0,0,0,.35), 0 0 0 4px rgba(124,92,255,.12); }
.composer textarea { flex: 1; resize: none; border: 0; background: transparent; outline: none; padding: 10px 6px; max-height: 160px; min-height: 42px; unicode-bidi: plaintext; }
.cbtn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: .2s; }
.cbtn:hover { color: var(--text); background: var(--glass-2); }
.cbtn svg { width: 21px; height: 21px; }
.cbtn.send { background: var(--grad); color: #fff; }
.cbtn.send:hover { filter: brightness(1.1); }
.cbtn.recording { background: var(--down); color: #fff; animation: ping 1.2s infinite; }

/* ---------- glass / cards / forms ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.card { padding: 18px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; width: 100%;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: rgba(124,92,255,.7); }
select option { background: #15162a; }
input[type="datetime-local"] { color-scheme: dark; }
.check { flex-direction: row !important; align-items: center; color: var(--text) !important; font-size: 15px !important; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn {
  background: var(--grad); color: #fff; border: 0; border-radius: 13px; padding: 11px 18px; cursor: pointer; font-weight: 600;
  transition: .2s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn.ghost { background: var(--glass); border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.btn.ghost:hover { border-color: var(--line-2); }
.btn.danger { color: var(--down); }
.card .btn.ghost { width: 100%; }

.add-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; margin-bottom: 14px; }
.add-row #taskTitle { flex: 2 1 200px; } .add-row #taskDue { flex: 1 1 170px; }
.add-col { display: flex; flex-direction: column; gap: 8px; padding: 10px; margin-bottom: 14px; }
.add-col .btn { align-self: flex-end; }

.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.list li {
  display: flex; align-items: flex-start; gap: 12px; background: var(--glass); border: 1px solid var(--line);
  border-radius: 16px; padding: 13px 14px; backdrop-filter: blur(12px); transition: .2s;
}
.list li:hover { border-color: var(--line-2); }
.list.small li { padding: 9px 12px; font-size: 14px; background: rgba(0,0,0,.2); }
.list .body { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.list .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.list .meta.late { color: var(--down); }
.list input[type=checkbox] {
  appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); padding: 0; flex: none; cursor: pointer; margin-top: 1px; display: grid; place-items: center;
}
.list input[type=checkbox]:checked { background: var(--grad); border-color: transparent; }
.list input[type=checkbox]:checked::after { content: "✓"; color: #fff; font-size: 13px; }
.list .del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 2px 4px; opacity: .6; }
.list .del:hover { opacity: 1; color: var(--down); }
.list .empty { justify-content: center; color: var(--muted); background: transparent; border-style: dashed; }
.done-wrap { margin-top: 18px; color: var(--muted); }
.done-wrap summary { cursor: pointer; margin-bottom: 10px; }
.done-wrap .body { text-decoration: line-through; opacity: .7; }

/* ---------- trading ---------- */
.watch { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.watch::-webkit-scrollbar { display: none; }
.tick {
  text-align: left; cursor: pointer; padding: 12px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px); transition: .2s; display: flex; flex-direction: column; gap: 2px; position: relative; min-width: 0;
}
.tick:hover { border-color: var(--line-2); }
.tick.on { border-color: rgba(124,92,255,.65); box-shadow: 0 0 0 3px rgba(124,92,255,.15); }
.tick .nm { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.tick .nm .x { opacity: 0; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.tick:hover .nm .x { opacity: 1; }
.tick .px { font-family: "JetBrains Mono", monospace; font-size: 16px; }
.tick .ch { font-size: 13px; font-weight: 500; }
.tick svg { width: 100%; height: 30px; margin-top: 4px; stroke-width: 1.6; }
.up { color: var(--up); } .down { color: var(--down); }

.chart-card { padding: 14px; margin-bottom: 14px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 2px 4px; }
.chart-head h3 { margin: 0; font-size: 18px; font-weight: 600; }
.chart-head p { margin: 0; color: var(--muted); font-size: 14px; }
.seg { display: inline-flex; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 13px; }
.seg button.on { background: var(--glass-2); color: var(--text); }
.tv { height: min(58vh, 520px); min-height: 320px; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.25); }
.tv .tradingview-widget-container, .tv .tradingview-widget-container__widget { height: 100%; width: 100%; }
.chart-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.add-sym { display: flex; gap: 6px; margin-left: auto; }
.add-sym input { width: 170px; padding: 9px 12px; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 .card { margin: 0; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.calc-out div { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.calc-out small { display: block; color: var(--muted); font-size: 12px; }
.calc-out b { font-family: "JetBrains Mono", monospace; font-weight: 500; font-size: 15px; }
.rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 16px); z-index: 20;
  background: rgba(24, 25, 42, .92); border: 1px solid var(--line-2); padding: 11px 18px; border-radius: 14px;
  opacity: 0; pointer-events: none; transition: .28s; max-width: calc(100% - 32px); backdrop-filter: blur(14px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 899px) {
  .pill-txt { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- top actions + RTL ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-pill { padding: 9px 13px; font-weight: 600; min-width: 42px; justify-content: center; }
.add-sym { margin-left: 0; margin-inline-start: auto; }
.rules { padding-left: 0; padding-inline-start: 20px; }
.tick, .chip { text-align: start; }
[dir="rtl"] .msg.user .bub { border-bottom-right-radius: var(--r); border-bottom-left-radius: 6px; }
[dir="rtl"] .msg.model .bub { border-top-left-radius: var(--r); border-top-right-radius: 6px; }
[dir="rtl"] .cbtn.send svg, [dir="rtl"] .nav svg path[d^="M3 17"] { transform: scaleX(-1); }
[dir="rtl"] body, [dir="rtl"] { font-family: "Tajawal", "Outfit", system-ui, sans-serif; }
@media (min-width: 900px) { [dir="rtl"] .nav { border-right: 0; border-left: 1px solid var(--line); } }

/* ---------- shopify ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { padding: 14px 16px; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat b { font-size: 22px; font-weight: 600; font-family: "JetBrains Mono", monospace; }
.audit-row { display: flex; gap: 8px; flex-wrap: wrap; }
.audit-row input { flex: 1 1 220px; }
.chips.left { justify-content: flex-start; margin-top: 0; max-width: none; }
.row.between { justify-content: space-between; margin-bottom: 12px; }
.seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg button { white-space: nowrap; }
.client-form textarea { resize: vertical; }
.clients { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.client { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.client-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.client h4 { margin: 0; font-size: 17px; font-weight: 600; }
.client a.url { font-size: 13px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.client .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.client .meta b { color: var(--text); font-weight: 500; }
.client .nt { font-size: 14px; color: var(--muted); white-space: pre-wrap; max-height: 66px; overflow: hidden; }
.client select { padding: 6px 10px; font-size: 13px; width: auto; border-radius: 999px; }
.client .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.client .acts button { font-size: 13px; padding: 7px 11px; }
.stage-lead { color: #ffd166; } .stage-design { color: var(--violet); } .stage-dev { color: #5cc8ff; } .stage-review { color: var(--pink); } .stage-done { color: var(--up); }
.empty-box { text-align: center; color: var(--muted); padding: 30px; border: 1px dashed var(--line-2); border-radius: var(--r); grid-column: 1 / -1; }

/* ---------- auth ---------- */
.auth { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(7, 8, 15, .82); backdrop-filter: blur(10px); }
.auth[hidden] { display: none; }
.auth-box { width: 100%; max-width: 380px; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.auth-box .orb.big { width: 92px; height: 92px; }
.auth-box h2 { margin: 0; font-size: 24px; font-weight: 600; }
.auth-box h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-box form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.seg.wide { width: 100%; } .seg.wide button { flex: 1; }
.google { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-links { margin: 0; font-size: 13px; color: var(--muted); }
.account { display: flex; align-items: center; gap: 12px; }
.account .av { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 600; flex: none; overflow: hidden; }
.account .av img { width: 100%; height: 100%; object-fit: cover; }
.account div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.account small { display: block; color: var(--muted); }

/* ---------- journal + academy ---------- */
.calc.c3 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tag.up { color: var(--up); background: rgba(46,230,166,.1); border-color: rgba(46,230,166,.3); }
.tag.down { color: var(--down); background: rgba(255,92,122,.1); border-color: rgba(255,92,122,.3); }
.tag.muted { color: var(--muted); background: rgba(255,255,255,.05); border-color: var(--line); }
.trade .res { font-family: "JetBrains Mono", monospace; font-size: 15px; white-space: nowrap; }
.trade h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .6s ease; }
.lessons { display: grid; gap: 10px; margin-bottom: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lesson { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.lesson .ln { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.lesson.done .ln { background: var(--grad); border-color: transparent; color: #fff; }
.lesson.next { border-color: rgba(124,92,255,.6); box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
.lesson .lb { flex: 1; min-width: 0; }
.lesson h4 { margin: 2px 0 4px; font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lesson p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.lesson .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lesson .acts .btn { font-size: 13px; padding: 7px 12px; }
.lesson .check { font-size: 13px !important; color: var(--muted) !important; display: inline-flex; gap: 6px; }
.plan-card { margin-bottom: 14px; }
.plan-card .btn { align-self: flex-start; }
.card .add-col { padding: 0; margin: 0; }

/* ---------- strategy ---------- */
.strat { border-color: rgba(124,92,255,.45); background: linear-gradient(160deg, rgba(124,92,255,.12), rgba(34,211,197,.05)); }
.strat h3 { font-size: 20px; margin-top: 6px; }
.strat .grade { font-size: 22px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: c; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--line); cursor: pointer; transition: .2s; }
.checklist li:hover { border-color: var(--line-2); }
.checklist li.on { border-color: rgba(46,230,166,.45); background: rgba(46,230,166,.07); }
.checklist li .ck { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 13px; }
.checklist li.on .ck { background: var(--up); border-color: transparent; color: #04261a; }
.checklist li b { display: block; font-weight: 500; font-size: 15px; }
.checklist li small { color: var(--muted); font-size: 12.5px; }
.verdict { padding: 12px 14px; border-radius: 14px; font-weight: 500; }
.verdict.a { background: rgba(46,230,166,.12); color: var(--up); border: 1px solid rgba(46,230,166,.35); }
.verdict.b { background: rgba(255,209,102,.1); color: #ffd166; border: 1px solid rgba(255,209,102,.35); }
.verdict.c { background: rgba(255,92,122,.1); color: var(--down); border: 1px solid rgba(255,92,122,.35); }
