@font-face {
  font-family: Vazirmatn;
  src: url("fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #262049;
  --muted: #645e79;
  --violet: #6233ce;
  --violet-dark: #4e22ad;
  --surface: #fff;
  --line: #e7e0f2;
  --shadow: 0 10px 30px #38266b0b;
}
* { box-sizing: border-box; }
body, .rasad {
  margin: 0;
  background: radial-gradient(ellipse at 91% 16%, #efe8ff, transparent 38%), #faf8fe;
  color: var(--ink);
  font: 16px/1.75 Vazirmatn, Tahoma, sans-serif;
}
.rasad { min-height: 100vh; text-align: start; }
a { color: var(--violet-dark); text-underline-offset: 4px; }
h1, h2, h3, p { margin-block-start: 0; }
h1 { font-size: clamp(28px, 3.1vw, 40px); line-height: 1.25; font-weight: 840; margin-block-end: 22px; }
h2 { font-size: 21px; line-height: 1.45; margin-block-end: 10px; }
h3 { font-size: 17px; }
small { color: var(--muted); }

.shell {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
  background: #fffdfdf2;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.shell-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1530px;
  padding: 12px clamp(16px, 3.5vw, 56px);
  margin-inline: auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 26px; font-weight: 900; }
.brand b { line-height: 1; }
.signal {
  width: 34px;
  aspect-ratio: 1;
  flex: none;
  border-radius: 11px;
  background: radial-gradient(circle at 65% 34%, #ffcf7c 0 11%, transparent 12%), repeating-radial-gradient(circle at 50% 55%, #ffffffd1 0 1px, transparent 2px 5px), #7443e4;
  box-shadow: 0 5px 10px #7544df40;
}
.shell nav { display: flex; align-items: center; gap: 3px; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.shell nav a, .shell nav button {
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 14px;
}
.shell nav .on, .shell nav a:hover, .shell nav button:hover { color: var(--violet-dark); background: #f0e8ff; }
.shell nav .on { font-weight: 750; }
.shell form { margin-inline-start: auto; }
.shell form button { color: var(--violet-dark); background: #faf7ff; border-color: var(--line); }

main.panel { max-width: 1530px; margin-inline: auto; padding: clamp(17px, 3.5vw, 55px); min-width: 0; }
main.guest { max-width: 525px; margin-inline: auto; padding: 9vh 20px 28px; }
.guest .brand { margin-block-end: 16px; }
.guest section { padding: 28px; }
.dashboard-grid, .insight-grid { display: grid; gap: 16px; margin-block-end: 16px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.insight-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  border-radius: 25px;
  min-height: 250px;
  padding: clamp(23px, 4vw, 49px);
  display: grid;
  align-content: center;
  justify-items: start;
  background: radial-gradient(ellipse at 0 108%, #a54bd5, transparent 67%), linear-gradient(126deg, #5423af, #7135da 74%, #8144e0);
  color: white;
  box-shadow: 0 13px 28px #5e32ae37;
}
.hero h1 { color: white; margin-block-end: 8px; }
.hero p { color: #f4eaff; max-width: 275px; margin-block-end: 23px; }
.hero .button { background: #fff; color: #4d2697; border-radius: 11px; font-weight: 750; }
.hero-art {
  position: absolute;
  z-index: -1;
  width: clamp(190px, 22vw, 335px);
  aspect-ratio: 1;
  inset-inline-end: -5%;
  inset-block-end: 50%;
  translate: 0 50%;
  border: 1px solid #ffffff52;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 18px, #ffffff31 19px 20px, transparent 21px 27px);
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle at 31% 27%, #fff1a5, #ffb777 34%, #d377eb 68%, #873ee0 86%);
  box-shadow: 0 0 46px #ffb8ca76, inset -15px -15px 30px #6a22a460;
  animation: drift 7s ease-in-out infinite alternate;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid #fff7c49c;
  border-radius: 50%;
  transform: rotate(-25deg) scaleY(.42);
}
@keyframes drift { to { transform: translateY(-8px); } }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cards a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 114px;
  padding: 13px 17px;
  border-radius: 20px;
  border: 1px solid #ffffffc9;
  color: #302645;
  text-decoration: none;
  box-shadow: var(--shadow);
  background: var(--tile, #eae0ff);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cards a:hover, .cards a:focus-visible { transform: translateY(-4px); box-shadow: 0 15px 24px #4d307e20; }
.cards .mint { --tile: #dff7ea; --mark: #187458; }
.cards .lilac { --tile: #eee3ff; --mark: #6535bd; }
.cards .sky { --tile: #e1f0ff; --mark: #285fa0; }
.cards .peach { --tile: #ffedd7; --mark: #9c4b1b; }
.cards b { font-size: clamp(26px, 2.9vw, 40px); font-weight: 850; line-height: 1.15; margin-block: 4px; overflow-wrap: anywhere; }
.tile-mark { color: var(--mark); font-weight: 800; line-height: 1; font-size: 18px; margin-block-end: 6px; }
.tile-label { font-size: 14px; font-weight: 650; }
.sheet, .ledger, section, article, details, .grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 17px;
  margin-block: 12px;
  box-shadow: var(--shadow);
}
.sheet, .ledger { margin: 0; min-width: 0; }
.sheet { padding: clamp(14px, 2vw, 24px); }
.ledger-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ledger-head h2 { margin: 0; }
.ledger-head .range { color: var(--muted); font-size: 13px; }
.chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-block-start: 13px; text-align: center; }
.chart div { min-width: 0; display: grid; justify-items: center; gap: 6px; }
.chart strong { color: var(--violet-dark); font-size: 14px; }
.chart small { font-size: 12px; overflow-wrap: anywhere; }
.chart progress {
  appearance: none;
  display: block;
  width: min(55%, 26px);
  height: 89px;
  writing-mode: vertical-lr;
  direction: rtl;
  background: #f3ecfe;
  border: none;
  border-radius: 9px;
  overflow: hidden;
  accent-color: #8050e8;
}
.chart progress::-webkit-progress-bar { background: #f3ecfe; border-radius: 9px; }
.chart progress::-webkit-progress-value { background: linear-gradient(#9d7af3,#7540de); border-radius: 9px; }
.chart progress::-moz-progress-bar { background: linear-gradient(#9d7af3,#7540de); border-radius: 9px; }
.networks { list-style: none; padding: 0; margin: 12px 0 0; }
.networks li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.networks li:last-child { border-bottom: 0; }
.networks i { width: 9px; height: 9px; background: #9463e6; border-radius: 3px; }
.networks li:nth-child(3n+2) i { background: #42a98b; }
.networks li:nth-child(3n+3) i { background: #dc8b4b; }
.networks b { padding: 0 8px; background: #f4effc; border-radius: 6px; color: #594297; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit,minmax(min(165px, 100%),1fr)); align-items: end; }
label { display: block; }
input, textarea, select, button, .button {
  font: inherit;
  max-width: 100%;
  border: 1px solid #c9bfdc;
  border-radius: 9px;
  padding: 6px 10px;
  background: white;
  color: var(--ink);
}
label input, label select, label textarea { width: 100%; display: block; margin-block: 4px 9px; }
button, .button { cursor: pointer; color: white; background: var(--violet); border: 1px solid transparent; padding: 7px 13px; text-decoration: none; }
button:hover, .button:hover { filter: brightness(.94); }
:focus-visible { outline: 2px solid #ae4d13; outline-offset: 3px; }
.inline { display: inline-block; }
aside { background: #def6e9; padding: 12px; border-radius: 10px; margin-block: 12px; }
aside[role=alert] { background: #ffedd7; color: #773f13; }
.body, pre { white-space: pre-wrap; overflow-wrap: anywhere; }
summary { font-weight: 700; cursor: pointer; color: var(--violet-dark); }
table { width: 100%; border-collapse: collapse; background: white; }
td, th { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: start; overflow-wrap: anywhere; }
th { background: #f8f4ff; font-weight: 650; color: #54446e; }
tr:last-child td { border-bottom: 0; }
.ledger { padding: 0; overflow: hidden; }
.ledger .ledger-head { padding: 16px 19px; }
.ledger > p { margin: 0; padding: 0 19px 16px; }
.scroll { overflow-x: auto; }
.status { display: inline-block; border-radius: 20px; padding: 2px 9px; color: #215f49; background: #e3f5eb; white-space: nowrap; }
.status.warn { color: #824316; background: #fff0db; }
.status.idle { color: #544965; background: #ede8f6; }

@media (max-width: 1080px) {
  .shell-inner { gap: 7px 15px; flex-wrap: wrap; }
  .shell nav { flex-basis: 100%; order: 3; }
}
@media (max-width: 760px) {
  .dashboard-grid, .insight-grid { grid-template-columns: minmax(0,1fr); }
  .hero { min-height: 212px; }
  .hero-art { opacity: .8; }
  .cards a { min-height: 101px; }
  .ledger table { min-width: 480px; }
  .panel > table { display: block; overflow-x: auto; }
}
@media (max-width: 420px) {
  .hero-art { inset-inline-end: -95px; opacity: .52; }
  .hero p { max-width: 195px; }
  .tile-label { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art::before { animation: none; }
  .cards a { transition: none; }
}
