/* ونتیکا — قالب راست‌چین نسخه PHP */
:root {
  --accent-from: #f5b942;
  --accent-to: #e07b00;
  --bg: #f4f6fb;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(15, 27, 45, 0.1);
  --text: #0f1b2d;
  --muted: #5b6b80;
  --up: #0f9d6e;
  --down: #d92d3b;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 14px 34px -20px rgba(15, 27, 45, .22);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  background:
    radial-gradient(1100px 620px at 88% -10%, rgba(245, 185, 66, 0.22), transparent 62%),
    radial-gradient(900px 520px at 4% 2%, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(760px 520px at 50% 108%, rgba(129, 140, 248, 0.12), transparent 62%),
    linear-gradient(180deg, #fdfdfe, #f5f7fc 42%, #eef1f8);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
code { direction: ltr; display: inline-block; background: rgba(255,255,255,.07); padding: 0 6px; border-radius: 6px; font-size: 12px; }
.muted { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* header */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(15,27,45,.04); }
.hdr-in { display: flex; align-items: center; gap: 14px; padding: 12px 16px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(140deg, var(--accent-from), var(--accent-to)); box-shadow: 0 10px 24px -12px var(--accent-from); }
.logo-title { font-weight: 800; font-size: 17px; }
.logo-sub { font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 12px; font-size: 13px; color: #475569; }
.nav a:hover, .nav a.active { background: rgba(15,27,45,.05); color: #0f1b2d; }

/* ticker */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: rgba(255,255,255,.75); }
.ticker-track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }
.tick-item { display: flex; align-items: center; gap: 8px; padding: 8px 18px; border-inline-end: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.tick-item b { color: #0f1b2d; font-variant-numeric: tabular-nums; }

/* status bar */
.statusbar { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.8); }
.statusbar .wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); padding-block: 8px; }
.statusbar b { color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); display: inline-block; animation: pulse 1.6s infinite; }
.dot.warn { background: #fbbf24; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

/* hero */
.hero { position: relative; padding: 48px 0 16px; }
.hero h1 { font-size: clamp(26px, 4vw, 44px); font-weight: 900; line-height: 1.35; margin: 12px 0 0; }
.hero h1 span { background: linear-gradient(100deg, color-mix(in srgb, var(--accent-to) 92%, #000), color-mix(in srgb, var(--accent-from) 68%, var(--accent-to))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 14px; max-width: 720px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(255,255,255,.8); font-size: 11px; font-weight: 600; color: #475569; }

/* buttons */
.btn { display: inline-block; padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  color: #0f1b2d; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: var(--shadow); }
.btn:hover { border-color: rgba(15,27,45,.22); }
.btn.primary { background: linear-gradient(100deg, var(--accent-from), var(--accent-to)); color: #17202e; border: none; }
.btn.big { width: 100%; padding: 14px; font-size: 15px; margin-top: 16px; }
.btn.danger { border-color: rgba(234,57,67,.35); background: rgba(234,57,67,.12); color: #fda4af; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* cards grid */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-hero { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  backdrop-filter: blur(12px); transition: transform .22s, border-color .22s, box-shadow .22s; display: block; box-shadow: var(--shadow); }
.card:hover { transform: translateY(-4px); border-color: rgba(245,185,66,.55); box-shadow: 0 20px 44px -24px rgba(15,27,45,.35), 0 0 0 1px rgba(245,185,66,.35); }
.card::after { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-from), transparent); opacity: .6; }
.card-title { font-size: 13px; color: #475569; display: flex; align-items: center; gap: 6px; }
.card-price { font-size: 22px; font-weight: 800; margin-top: 8px; font-variant-numeric: tabular-nums; color: var(--text); }
.card-price small { font-size: 11px; color: var(--muted); font-weight: 500; margin-inline-start: 5px; }
.card-foot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
  border: 1px solid transparent; font-variant-numeric: tabular-nums; }
.pill.up { background: rgba(15,157,110,.1); color: var(--up); border-color: rgba(15,157,110,.3); }
.pill.down { background: rgba(217,45,59,.1); color: var(--down); border-color: rgba(217,45,59,.3); }
.pill.flat { background: rgba(15,27,45,.05); color: var(--muted); border-color: var(--line); }

/* sections */
.section { margin-top: 40px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--text); }
.section-head p { margin: 0; font-size: 12px; color: var(--muted); }
.section-rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(15,27,45,.16), transparent); }

/* toolbar */
.toolbar { position: sticky; top: 118px; z-index: 30; display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; backdrop-filter: blur(12px); margin-top: 24px; box-shadow: var(--shadow); }
input, select, textarea { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  color: var(--text); font-family: inherit; font-size: 13px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(245,185,66,.75); box-shadow: 0 0 0 3px rgba(245,185,66,.18); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; width: 100%; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(15,27,45,.03); font-size: 12px; cursor: pointer; color: #475569; }
.chip.active { background: linear-gradient(100deg, var(--accent-from), var(--accent-to)); color: #17202e; border-color: transparent; font-weight: 700; }

/* tables */
.table-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 16px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.05); }
thead th { background: rgba(15,27,45,.035); font-size: 11px; color: var(--muted); font-weight: 600; position: sticky; top: 0; }
tbody tr:hover { background: rgba(15,27,45,.025); }
tbody tr:last-child td { border-bottom: none; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.up-txt { color: var(--up); } .down-txt { color: var(--down); } .flat-txt { color: var(--muted); }

/* panels / forms */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 14px; font-size: 14px; font-weight: 800; color: var(--text); }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: block; font-size: 12px; color: #475569; font-weight: 600; }
label input, label select, label textarea { margin-top: 6px; font-weight: 400; }
.span2 { grid-column: span 2; }
.alert { padding: 12px 14px; border-radius: 14px; font-size: 13px; margin-bottom: 12px; }
.alert.ok { background: rgba(15,157,110,.1); border: 1px solid rgba(15,157,110,.3); color: #065f46; }
.alert.err { background: rgba(217,45,59,.1); border: 1px solid rgba(217,45,59,.3); color: #9f1239; }
.alert.warn { background: rgba(217,119,6,.1); border: 1px solid rgba(217,119,6,.32); color: #92400e; }
.alert.info { background: rgba(2,132,199,.1); border: 1px solid rgba(2,132,199,.28); color: #075985; }
.note { margin-top: 14px; font-size: 11px; color: var(--muted); }

/* admin layout */
.admin { display: grid; gap: 20px; grid-template-columns: 240px 1fr; padding-block: 20px; }
.admin-side { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; height: fit-content; position: sticky; top: 80px; box-shadow: var(--shadow); }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.admin-side a:hover { background: rgba(15,27,45,.04); color: var(--text); }
.admin-side a.active { background: linear-gradient(270deg, rgba(245,185,66,.22), transparent); color: var(--text); box-shadow: inset 0 0 0 1px rgba(245,185,66,.45); }
.admin-side .ico { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(15,27,45,.05); }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-head h1 { margin: 0; font-size: 22px; font-weight: 900; color: var(--text); }
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); }
.stat span { font-size: 12px; color: var(--muted); }
.sym-row { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.sym-row .cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #475569; }
.checkline input { width: auto; margin: 0; }
.sticky-save { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; backdrop-filter: blur(10px); flex-wrap: wrap; box-shadow: var(--shadow); }

/* symbol page */
.symbol-hero { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 28px; box-shadow: var(--shadow); }
.symbol-price { font-size: clamp(30px, 6vw, 52px); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text); }
.kv { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kv > div { background: rgba(15,27,45,.025); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.kv dt { font-size: 11px; color: var(--muted); }
.kv dd { margin: 4px 0 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.chart-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-top: 20px; box-shadow: var(--shadow); }
.range-btns { display: flex; gap: 6px; }
.range-btns button { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(15,27,45,.03); color: var(--muted); font-size: 11px; cursor: pointer; font-family: inherit; }
.range-btns button.active { background: linear-gradient(100deg, var(--accent-from), var(--accent-to)); color: #17202e; border-color: transparent; font-weight: 700; }
svg.chart { width: 100%; height: 300px; }

/* install */
.install-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.install-card { width: 100%; max-width: 720px; background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 32px; box-shadow: var(--shadow); }
.install-logo { font-size: 40px; }
.install-card h1 { font-size: 24px; margin: 10px 0 4px; }
.install-card h2 { font-size: 14px; margin: 24px 0 12px; color: var(--accent-from); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 30px; box-shadow: var(--shadow); }

/* footer */
footer.site { margin-top: 60px; border-top: 1px solid var(--line); background: rgba(255,255,255,.9); }
footer.site .cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); padding-block: 40px; }
footer.site h4 { margin: 0 0 10px; font-size: 14px; }
footer.site ul { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--muted); }
footer.site li { margin-bottom: 7px; }
footer.site .copy { border-top: 1px solid var(--line); padding: 14px; text-align: center; font-size: 12px; color: var(--muted); }

.flash-up { animation: fu 1.1s ease-out; border-radius: 8px; }
.flash-down { animation: fd 1.1s ease-out; border-radius: 8px; }
@keyframes fu { from { background-color: rgba(22,199,132,.26); } to { background-color: transparent; } }
@keyframes fd { from { background-color: rgba(234,57,67,.26); } to { background-color: transparent; } }

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; overflow-x: auto; gap: 6px; }
  .admin-side a { white-space: nowrap; }
  .toolbar { top: 96px; }
  .span2 { grid-column: span 1; }
}

/* تبلیغات */
.ad-box { margin: 20px 0; }
.ad-item { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.ad-item img { display: block; width: 100%; height: auto; border-radius: 10px; }
.ad-item::after { content: "تبلیغات"; position: absolute; top: 12px; inset-inline-end: 12px;
  font-size: 9px; font-weight: 700; color: var(--muted); background: rgba(15,27,45,.05);
  padding: 1px 6px; border-radius: 6px; }
.ad-html { margin-top: 6px; }
