/**
 * رصد — One UI 8.5 glass
 */

:root {
  --gold-200: #E8D48B;
  --gold-300: #D4B84A;
  --gold-400: #C9A227;
  --accent: #e4b45a;
  --accent-muted: rgba(228, 180, 90, 0.14);
  --accent-glow: rgba(228, 180, 90, 0.28);
  --up: #3ddc97;
  --down: #f07167;
  --info: #7cb6e4;

  --bg-base: #0b1014;
  --bg-subtle: #12181e;
  --bg-elevated: rgba(22, 30, 38, 0.58);
  --bg-elevated-strong: rgba(28, 38, 48, 0.78);
  --text-primary: #e8eef2;
  --text-secondary: #8b9aab;
  --text-muted: #6d7d8e;
  --control-bg: #1a232c;
  --control-text: #e8eef2;
  --control-border: rgba(255, 255, 255, 0.12);
  --border-glass: rgba(228, 180, 90, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.38);
  --blur-md: 22px;
  --blur-lg: 36px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  --header-height: 64px;
  --bottom-nav-height: 72px;
  --container: 1120px;
  --font: 'Vazirmatn', Tahoma, system-ui, sans-serif;
  color-scheme: dark;
}

html.light {
  --accent: #9A7B0A;
  --accent-muted: rgba(201, 162, 39, 0.12);
  --bg-base: #F5F3EF;
  --bg-subtle: #EBE8E2;
  --bg-elevated: rgba(255, 255, 255, 0.62);
  --bg-elevated-strong: rgba(255, 255, 255, 0.86);
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-muted: #9A9A9A;
  --control-bg: #ffffff;
  --control-text: #1A1A1A;
  --control-border: rgba(0, 0, 0, 0.12);
  --border-glass: rgba(201, 162, 39, 0.22);
  --border-subtle: rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { overflow-x: hidden; }
body.rasad-body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

.rasad-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(228, 180, 90, 0.08), transparent 55%),
    radial-gradient(900px 500px at -10% 90%, rgba(61, 220, 151, 0.06), transparent 50%),
    var(--bg-base);
}
.rasad-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: orb 22s ease-in-out infinite;
}
.rasad-bg__orb--gold {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--gold-300), transparent 70%);
  top: -140px; right: -80px;
}
.rasad-bg__orb--teal {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #3ddc97, transparent 70%);
  bottom: 8%; left: -90px;
  animation-delay: -9s;
  opacity: 0.18;
}
.rasad-bg__glass {
  position: absolute;
  inset: 18% 10%;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent 40%);
  filter: blur(20px);
}
html.light .rasad-bg__orb--gold { opacity: 0.45; }
html.light .rasad-bg__orb--teal { opacity: 0.12; }

@keyframes orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -16px) scale(1.06); }
}

.rasad-wrap { min-height: 100vh; }

.glass, .glass-card, .glass-nav, .glass-sheet {
  background: var(--bg-elevated);
  backdrop-filter: blur(var(--blur-md)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(140%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
}
.glass-nav {
  background: var(--bg-elevated-strong);
  backdrop-filter: blur(var(--blur-lg)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(160%);
}
.glass-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
}
.glass-sheet {
  border-radius: var(--radius-2xl);
}

.rasad-header {
  position: fixed;
  top: 0.85rem;
  inset-inline: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding-inline: 1rem;
  pointer-events: none;
}
.rasad-header__inner {
  pointer-events: auto;
  width: min(96%, var(--container));
  height: var(--header-height);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-inline: 1rem 0.75rem;
}
.rasad-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.rasad-brand__mark {
  width: 38px; height: 38px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--gold-200), var(--gold-400));
  color: #1a1408;
  font-weight: 800;
  box-shadow: 0 6px 18px var(--accent-glow);
}
.rasad-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.rasad-brand__text strong { font-size: 1.05rem; }
.rasad-brand__text small { color: var(--text-secondary); font-size: 0.7rem; }

.rasad-nav--desk { display: none; gap: 0.25rem; margin-inline-start: auto; }
.rasad-nav--desk a {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
}
.rasad-nav--desk a.is-active,
.rasad-nav--desk a:hover {
  color: var(--text-primary);
  background: var(--accent-muted);
}
.rasad-header__actions { display: flex; align-items: center; gap: 0.4rem; margin-inline-start: auto; }
@media (min-width: 860px) {
  .rasad-nav--desk { display: flex; }
  .rasad-header__actions { margin-inline-start: 0; }
}

.rasad-main {
  width: min(96%, var(--container));
  margin: 0 auto;
  padding: calc(var(--header-height) + 2.2rem) 0 calc(var(--bottom-nav-height) + 2rem);
}
@media (min-width: 860px) {
  .rasad-main { padding-bottom: 3.5rem; }
}

.bottom-nav {
  position: fixed;
  bottom: 0.85rem;
  inset-inline: 0.85rem;
  z-index: 40;
  height: var(--bottom-nav-height);
  border-radius: var(--radius-xl);
  display: flex;
  padding: 0.2rem;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.62rem;
  border-radius: 22px;
}
.bottom-nav a.is-active { color: var(--accent); background: var(--accent-muted); }
@media (min-width: 860px) { .bottom-nav { display: none; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--border-glass);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  padding: 0.62rem 1.1rem;
  cursor: pointer;
}
.btn--gold {
  background: linear-gradient(160deg, var(--gold-200), var(--gold-400));
  color: #1a1408;
  border: 0;
  font-weight: 700;
}
.btn--glass { background: var(--bg-elevated-strong); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-secondary); font-size: 0.8rem; }
.btn--icon {
  width: 40px; height: 40px; padding: 0; border-radius: 14px;
}
.btn:hover { filter: brightness(1.06); }

.rasad-guest {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.rasad-guest__card {
  width: min(100%, 520px);
  padding: 2.4rem 2rem;
}
.rasad-guest h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.45; margin: 0.4rem 0 1rem; font-weight: 650; }
.rasad-guest .lead { color: var(--text-secondary); line-height: 1.9; margin: 0 0 1.6rem; }
.rasad-guest__actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.2rem; }

.eyebrow { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.04em; margin: 0; }
.lead { color: var(--text-secondary); line-height: 1.9; }
.mute { color: var(--text-secondary); }
.tiny { font-size: 0.75rem; line-height: 1.7; }
.up { color: var(--up); }
.down { color: var(--down); }
.accent { color: var(--accent); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
}

.stats {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--border-glass);
  margin-bottom: 1.6rem;
}
.stats__item { background: var(--bg-elevated); backdrop-filter: blur(var(--blur-md)); padding: 1rem 1.1rem; }
.stats__item span { display: block; font-size: 0.75rem; color: var(--text-secondary); }
.stats__item strong { display: block; margin-top: 0.45rem; font-size: 1.05rem; font-weight: 600; }
.stats__item small { color: var(--text-muted); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 699px) { .stats { grid-template-columns: 1fr 1fr; } }

.brief { margin: 0 0 2rem; }
.brief h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0.25rem 0 1rem; font-weight: 650; }
.brief ol { list-style: none; padding: 0; margin: 0; border-block: 1px solid var(--border-subtle); }
.brief li + li { border-top: 1px solid var(--border-subtle); }
.brief a { display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem; padding: 1rem 0.1rem; }
@media (min-width: 640px) { .brief a { grid-template-columns: 2rem 4.4rem 1fr; } }
.kind { font-size: 0.75rem; color: var(--info); }
.kind.high { color: var(--accent); }
.kind.medium { color: var(--info); }
.kind.low { color: var(--text-muted); }
.picks-card { margin: 0 0 1.6rem; }
.picks-list { list-style: none; padding: 0; margin: 0; }
.picks-list li { padding: 0.95rem 0; border-bottom: 1px solid var(--border-subtle); }
.picks-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.picks-list__top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.picks-list__top small { display: block; margin-top: 0.2rem; color: var(--text-muted); font-size: 0.75rem; }
.picks-list__meta { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.picks-list p { margin: 0.45rem 0 0; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.85; }

.brief h3 { margin: 0; font-size: 0.98rem; font-weight: 600; }
.brief p { margin: 0.35rem 0 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.85; }

.split { display: grid; gap: 1.4rem; margin-bottom: 1.6rem; }
@media (min-width: 980px) { .split { grid-template-columns: 1.4fr 0.85fr; } }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.8rem; }
.section-title h2 { margin: 0; font-size: 0.95rem; font-weight: 600; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 0.75rem 0.8rem; font-variant-numeric: tabular-nums; }
th { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border-subtle); }
td { border-bottom: 1px solid var(--border-subtle); font-size: 0.9rem; }
tr:last-child td { border-bottom: 0; }
.sym small { display: block; color: var(--text-muted); font-size: 0.72rem; }

.codal article { padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border-subtle); }
.codal article:last-child { border-bottom: 0; margin: 0; padding: 0; }
.codal .meta { display: flex; flex-wrap: wrap; gap: 0.55rem; font-size: 0.75rem; color: var(--text-muted); }
.codal h3 { margin: 0.45rem 0; font-size: 0.92rem; }
.codal .codal-link { color: var(--accent); font-size: 0.82rem; }
.codal .codal-link:hover { text-decoration: underline; }

.depth table { font-size: 0.82rem; }
.depth td.up, .depth td.down { font-variant-numeric: tabular-nums; }

.board-toolbar .pills { max-width: 100%; }

.risk-rows { margin-top: 1rem; display: grid; gap: 0.7rem; }
.bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
html.light .bar { background: rgba(0,0,0,0.08); }
.bar > i { display: block; height: 100%; background: var(--info); }
.bar > i.warn { background: var(--accent); }
.risk-head { display: flex; justify-content: space-between; font-size: 0.78rem; }

.form-grid { display: grid; gap: 0.7rem; }
.form-grid.cols-4 { grid-template-columns: 1fr; }
.form-grid.cols-5 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .form-grid.cols-5 { grid-template-columns: 1.1fr 1fr 1fr 1fr auto; }
}

input, select, textarea {
  width: 100%;
  background: var(--control-bg);
  color: var(--control-text);
  border: 1px solid var(--control-border);
  border-radius: 14px;
  padding: 0.62rem 0.8rem;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.search-list { margin: 0.8rem 0 1.2rem; }
.search-row {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.search-row:last-child { border-bottom: 0; }
.linkish { background: none; border: 0; color: var(--text-secondary); cursor: pointer; font-size: 0.8rem; }
.linkish:hover { color: var(--down); }

.tape {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--border-glass);
  margin: 1.1rem 0;
}
.tape div { background: var(--bg-elevated); padding: 0.8rem 0.9rem; }
.tape dt { font-size: 0.7rem; color: var(--text-muted); }
.tape dt small { display: block; font-weight: 400; opacity: 0.8; margin-top: 0.15rem; line-height: 1.5; }
.tape dd { margin: 0.3rem 0 0; font-size: 0.9rem; }
.fund-card { margin: 1.1rem 0; }
.fund-tape { margin: 0; }
.size-snap { margin: 1.1rem 0; }
.chip--enter { color: var(--up); }
.chip--wait { color: var(--accent); }
.chip--manage { color: var(--info); }
.chip--avoid { color: var(--down); }
.sym .chip { margin-inline-start: 0.35rem; font-size: 0.65rem; padding: 0.12rem 0.5rem; vertical-align: middle; }

.decision { display: grid; gap: 1rem; margin: 1.2rem 0; }
.strategy__head h2 { margin: 0.45rem 0 0; font-size: 1.25rem; font-weight: 650; line-height: 1.6; }
.strategy__steps { margin: 0.4rem 0 1rem; padding-inline-start: 1.2rem; }
.strategy__steps li { margin: 0.45rem 0; line-height: 1.85; color: var(--text-secondary); }
.strategy__meta { display: grid; gap: 0.8rem; margin-bottom: 0.8rem; }
@media (min-width: 700px) { .strategy__meta { grid-template-columns: 1fr 1fr; } }
.strategy__meta span { display: block; font-size: 0.72rem; color: var(--text-muted); }
.strategy__meta strong { display: block; margin-top: 0.3rem; font-weight: 500; line-height: 1.7; }

.criteria ol { list-style: none; padding: 0; margin: 0; }
.crit { padding: 0.9rem 0; border-bottom: 1px solid var(--border-subtle); }
.crit:last-child { border-bottom: 0; padding-bottom: 0; }
.crit__top { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; }
.crit__val { margin-top: 0.25rem; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.crit p { margin: 0.35rem 0 0; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.8; }
.crit-status { font-size: 0.72rem; border-radius: var(--radius-full); padding: 0.15rem 0.55rem; border: 1px solid var(--border-subtle); color: var(--text-muted); }
.crit-status--good { color: var(--up); border-color: color-mix(in srgb, var(--up) 35%, transparent); }
.crit-status--caution { color: var(--accent); border-color: var(--border-glass); }
.crit-status--bad { color: var(--down); border-color: color-mix(in srgb, var(--down) 35%, transparent); }

.tape { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .tape { grid-template-columns: repeat(5, 1fr); } }

.chart { width: 100%; height: 220px; display: block; }
.rasad-ohlc-card { padding: 0.95rem 1rem 1rem; }
.rasad-ohlc-card__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}
.rasad-ohlc {
  direction: ltr;
  height: 440px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.16);
}
html.light .rasad-ohlc { background: rgba(255, 255, 255, 0.4); }
.rasad-ohlc iframe { width: 100%; height: 100%; border: 0; }
.symbol-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.price-lg { font-size: 2rem; font-weight: 600; margin-inline-end: 0.5rem; }

.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 0.85rem 0; border-bottom: 1px solid var(--border-subtle); }
.rasad-skeleton { text-align: center; color: var(--text-secondary); }

.hide-sm { }
@media (max-width: 700px) {
  .hide-sm { display: none; }
  th.hide-md, td.hide-md { display: none; }
}
@media (max-width: 980px) {
  .hide-lg { display: none; }
}

.wp-admin-bar { display: none !important; }
html { margin-top: 0 !important; }

.board-toolbar { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill {
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-size: 0.8rem;
}
.pill.is-active {
  background: var(--accent-muted);
  color: var(--accent);
}
.board-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated-strong);
  z-index: 1;
}
.board-table td, .board-table th { padding: 0.55rem 0.75rem; }
@media (min-width: 860px) {
  .board-toolbar { grid-template-columns: 1fr; }
}
@media (min-width: 1100px) {
  .board-toolbar { grid-template-columns: 1.2fr auto 0.7fr; align-items: start; }
}
@media (max-width: 859px) {
  .bottom-nav a { font-size: 0.6rem; }
}
