:root {
  color-scheme: dark;
  --bg: #0a101b;
  --rail: #0d1523;
  --surface: #111b2b;
  --surface-2: #152235;
  --border: #243146;
  --text: #f2f6fd;
  --muted: #a9b9cd;
  --soft: #798da9;
  --accent: #65edca;
  --accent-ink: #061e1c;
  --accent-wash: #163b39;
  --violet: #b7aafd;
  --quote: #2a2540;
  --blue: #8fbaff;
  --warn: #f5be81;
  --danger: #ffa69c;
  --shadow: 0 22px 58px #0003;
  --radius: 20px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf3fa;
  --rail: #f7faff;
  --surface: #ffffff;
  --surface-2: #eef4fb;
  --border: #d1dfed;
  --text: #13263c;
  --muted: #455c74;
  --soft: #526b87;
  --accent: #077b67;
  --accent-ink: #ffffff;
  --accent-wash: #d5f5ec;
  --violet: #6147af;
  --quote: #efe8f8;
  --blue: #235ba2;
  --warn: #8a4a10;
  --danger: #a4362f;
  --shadow: 0 16px 42px #25456523;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 290px;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Vazirmatn, Tahoma, Arial, sans-serif;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button[disabled] { opacity: .62; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
bdi, code { unicode-bidi: isolate; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar {
  height: 100dvh; position: sticky; inset-block-start: 0; display: flex; flex-direction: column;
  gap: 38px; padding: 27px 19px 21px; background: var(--rail); border-inline-end: 1px solid var(--border);
}
.brand { display: flex; gap: 12px; align-items: center; padding-inline: 8px; }
.brand strong { display: block; font-size: 1.03rem; letter-spacing: -.018em; }
.brand small { display: block; color: var(--soft); font: 700 .59rem/1.5 Arial, sans-serif; letter-spacing: .18em; text-align: right; }
.brand-mark {
  flex: 0 0 auto; inline-size: 44px; block-size: 44px; position: relative; border-radius: 13px;
  background: linear-gradient(145deg,#126d62 0%,#235f72 55%,#6740a2 100%);
  border: 1px solid #7aecd563; box-shadow: inset 0 0 12px #bddfff28;
}
.brand-mark i { position: absolute; display: block; background: #a3ffe5; block-size: 3px; border-radius: 5px; inset-inline-start: 10px; }
.brand-mark i:nth-child(1) { inset-block-start: 12px; inline-size: 22px; }
.brand-mark i:nth-child(2) { inset-block-start: 20px; inline-size: 15px; }
.brand-mark i:nth-child(3) { inset-block-start: 28px; inline-size: 19px; }
.brand-mark.small { transform: scale(.78); margin-inline: -4px; }
#desktop-nav { display: grid; gap: 7px; }
.nav-link {
  color: var(--muted); border: 1px solid transparent; border-radius: 12px; background: transparent;
  text-align: start; width: 100%; padding: 10px 11px; display: flex; gap: 12px; align-items: center; font-size: .89rem;
}
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.active { background: var(--accent-wash); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 23%, transparent); font-weight: 700; }
.nav-icon { inline-size: 21px; text-align: center; font: 700 1.27rem/1 Arial, sans-serif; }
.sidebar-profile { margin-block-start: auto; padding: 12px 9px 0; border-top: 1px solid var(--border); }
.sidebar-profile:empty { display: none; }
.profile { display: flex; align-items: center; gap: 11px; min-width: 0; }
.profile > div { min-width: 0; }
.profile strong { display: block; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .88rem; }
.profile small { color: var(--muted); font-size: .77rem; }
.avatar {
  inline-size: 40px; block-size: 40px; display: grid; flex: 0 0 auto; place-items: center;
  background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); border-radius: 13px; font-weight: 700;
}
.workspace { min-width: 0; }
.topbar {
  min-height: 69px; display: flex; justify-content: space-between; align-items: center;
  padding: 12px clamp(18px, 4vw, 52px); border-bottom: 1px solid var(--border);
  background: color-mix(in srgb,var(--rail) 80%, transparent);
}
.crumb { color: var(--muted); font-size: .91rem; }
.mobile-brand { display: none; }
.top-actions { display: flex; gap: 9px; align-items: center; }
.icon-button {
  display: inline-grid; place-items: center; flex: 0 0 auto; inline-size: 40px; block-size: 40px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; color: var(--text);
  font: 500 1.35rem/1 Arial, sans-serif;
}
.icon-button:hover { border-color: var(--accent); color: var(--accent); }
.screen { max-width: 1370px; margin: 0 auto; padding: 28px clamp(18px, 4vw, 52px) 55px; }
.screen:focus { outline: none; }
.page-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.page-title h1 { font-size: clamp(1.45rem,2.6vw,2.05rem); letter-spacing: -.035em; }
.page-title p, .muted { color: var(--muted); }
.muted { font-size: .9rem; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 241px;
  display: flex; align-items: center; padding: 28px 34px; border-radius: 25px;
  background: radial-gradient(ellipse at 2% 20%,#21497e 0,transparent 58%),linear-gradient(112deg,#113534,#0d2630 52%,#111e38);
  color: #f1fafe; border: 1px solid #3c758280; box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .3; z-index: -1;
  background-image: linear-gradient(#6adbc026 1px,transparent 1px),linear-gradient(90deg,#6adbc026 1px,transparent 1px);
  background-size: 30px 30px; mask-image: linear-gradient(90deg,#000 15%,transparent 68%);
}
.hero-copy { z-index: 1; max-width: 66%; }
.hero h1 { font-size: clamp(1.55rem, 4vw, 2.56rem); line-height: 1.3; letter-spacing: -.04em; }
.hero p { color: #bcddd9; margin: 9px 0 20px; font-size: .96rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hero .primary { background: #65edca; color: #06221d; border-color: #65edca; }
.hero .secondary { background: #112d38b8; color: #ebfafc; border-color: #5caaa775; }
.orbit {
  position: absolute; inset-inline-end: clamp(22px,6vw,92px); inset-block-start: 50%;
  width: 190px; aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; color: #6affd0;
}
.orbit span { position: absolute; inset: 0; border: 1px solid #62f3cf45; border-radius: 50%; }
.orbit span:nth-child(2) { inset: 20px; border-color: #7cdcf77a; }
.orbit span:nth-child(3) { inset: 41px; border-style: dashed; border-color: #67dcd787; }
.orbit span:nth-child(4) { inset: 65px; display: grid; place-items: center; background: #34d3bc23; border-color: #8affd991; font: 700 2rem Arial, sans-serif; box-shadow: 0 0 38px #42ffe352; }
.orbit i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #91ffe2; box-shadow: 0 0 12px #7affdf; inset-inline-start: 16px; inset-block-start: 34px; }
.orbit i:last-child { inset-inline-start: auto; inset-inline-end: 24px; inset-block-start: auto; inset-block-end: 36px; background: #bbaaff; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-block: 17px 22px; }
.metric, .card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 18px;
}
.metric { display: flex; align-items: center; gap: 12px; min-width: 0; }
.metric-icon, .slot-icon {
  flex: 0 0 auto; inline-size: 44px; block-size: 44px; display: grid; place-items: center;
  color: var(--accent); background: var(--accent-wash); border-radius: 12px; font-size: 1.26rem;
}
.metric:nth-child(2) .metric-icon, .slot-icon.blue { background: color-mix(in srgb, var(--blue) 16%, var(--surface)); color: var(--blue); }
.metric:nth-child(3) .metric-icon, .slot-icon.violet { background: color-mix(in srgb,var(--violet) 16%,var(--surface)); color: var(--violet); }
.metric strong { display: block; font-size: clamp(1.03rem, 2vw, 1.45rem); line-height: 1.25; overflow-wrap: anywhere; }
.metric small { color: var(--muted); font-size: .82rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 15px; align-items: start; }
.stack { display: grid; gap: 15px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.card-heading h2, .card h2 { font-size: 1.08rem; }
.card h3 { font-size: .98rem; }
.section-title { margin-bottom: 12px; }
.list { display: grid; }
.list-row {
  display: flex; gap: 11px; align-items: center; justify-content: space-between; padding: 12px 0;
  border-top: 1px solid var(--border); min-width: 0;
}
.list-row:first-child { border-top: 0; }
.list-row > .row-label { display: flex; gap: 11px; align-items: center; min-width: 0; flex: 1; }
.row-label div { min-width: 0; }
.row-label strong { display: block; font-size: .93rem; font-weight: 700; overflow-wrap: anywhere; }
.row-label small { color: var(--muted); font-size: .8rem; display: block; }
.row-meta { text-align: end; flex: 0 0 auto; }
.row-meta .tag { margin-bottom: 5px; }
.tag {
  display: inline-flex; align-items: center; padding: 4px 9px; white-space: nowrap; border-radius: 999px;
  color: var(--accent); background: var(--accent-wash); font-size: .76rem; font-weight: 700;
}
.tag.info { color: var(--blue); background: color-mix(in srgb,var(--blue) 13%,var(--surface)); }
.tag.warn { color: var(--warn); background: color-mix(in srgb,var(--warn) 13%,var(--surface)); }
.tag.danger { color: var(--danger); background: color-mix(in srgb,var(--danger) 13%,var(--surface)); }
.tag.demo-label { color: var(--violet); background: color-mix(in srgb,var(--violet) 14%,var(--surface)); }
.button {
  display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 8px 13px; border: 1px solid transparent; text-align: center;
  font-weight: 700; font-size: .87rem; line-height: 1.5;
}
.button.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.button.secondary { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.button.ghost { color: var(--accent); background: transparent; padding-inline: 4px; }
.button.danger { color: var(--danger); background: color-mix(in srgb,var(--danger) 11%,var(--surface)); border-color: color-mix(in srgb,var(--danger) 28%,var(--border)); }
.button:hover { filter: brightness(1.13); }
.button.block { width: 100%; }
.quick-grid, .action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.admin-menu { width: min(100%, 760px); }
.button.admin-menu-tile { min-height: 58px; font-size: clamp(.84rem, 2.8vw, 1rem); }
.admin-menu-back { grid-column: 1 / -1; }
.quick { min-height: 80px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-align: right; padding: 9px 10px; }
.quick span { color: var(--accent); display: block; font-size: 1.18rem; }
.quick strong { display: block; font-size: .82rem; }
.quick:hover { border-color: var(--accent); }
.offer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.offer { display: flex; flex-direction: column; justify-content: space-between; min-height: 206px; gap: 18px; }
.offer .slot-icon { margin-block-end: 10px; }
.offer h2 { font-size: 1.19rem; }
.offer-price { display: block; color: var(--accent); font-weight: 700; margin-top: 5px; font-size: 1.04rem; }
.offer-trial { border-color: color-mix(in srgb, var(--violet) 40%, var(--border)); }
.notice { background: var(--surface-2); border: 1px solid var(--border); padding: 11px 13px; color: var(--muted); border-radius: 12px; margin-bottom: 15px; font-size: .91rem; }
.empty { padding: 22px 3px; text-align: center; color: var(--muted); }
.empty .button { margin-top: 11px; }
.segments { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.segment { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; color: var(--muted); padding: 6px 11px; font-size: .88rem; }
.segment.active { background: var(--accent-wash); color: var(--accent); border-color: color-mix(in srgb,var(--accent) 28%,var(--border)); }
.account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.data-box { background: var(--surface-2); border: 1px solid var(--border); padding: 10px 12px; border-radius: 12px; min-width: 0; }
.data-box small { color: var(--muted); display: block; font-size: .82rem; }
.data-box strong { display: block; font-size: .93rem; overflow-wrap: anywhere; }
.data-box.wide { grid-column: 1 / -1; }
.dialog { position: fixed; width: min(570px,calc(100% - 32px)); max-height: 85dvh; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); padding: 0; }
.dialog::backdrop { background: #050b15b8; backdrop-filter: blur(4px); }
.dialog-inner { padding: 16px; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--border); }
.dialog-header h2 { font-size: 1.12rem; }
.dialog-content { padding-top: 13px; }
.workflow-message, .workflow-form {
  display: grid; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 14px;
}
.workflow-copy { margin: 0; white-space: pre-wrap; line-height: 1.85; overflow-wrap: anywhere; }
.workflow-formatted blockquote {
  position: relative; margin: 4px 0 12px; padding: 7px 28px 7px 11px;
  background: var(--quote); border-left: 3px solid var(--violet); border-radius: 5px;
}
.workflow-formatted > blockquote:first-child { width: fit-content; max-width: 100%; }
.workflow-formatted blockquote::before {
  content: "❞"; position: absolute; inset-inline-start: 8px; top: 2px; color: var(--violet); font-size: 1.2rem;
}
.workflow-formatted code {
  direction: ltr; unicode-bidi: isolate; color: var(--blue); font-size: .95em;
}
.workflow-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.workflow-actions > .button { flex: 1 1 auto; white-space: normal; text-align: center; }
.workflow-field { display: grid; gap: 6px; font-size: .86rem; color: var(--muted); }
.workflow-input, .workflow-file {
  width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; font: inherit;
}
.workflow-input { resize: vertical; }
.workflow-input:focus-visible, .workflow-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.workflow-file { position: relative; display: flex; align-items: center; gap: 9px; }
.workflow-file-input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.workflow-file-button { flex: none; font-weight: 700; color: var(--accent); }
.workflow-file-name { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-image { display: block; width: min(100%, 400px); margin-inline: auto; border-radius: 12px; }
.workflow-media { display: grid; gap: 9px; justify-items: center; }
.meter { width: 100%; height: 9px; border: 0; border-radius: 12px; display: block; overflow: hidden; accent-color: var(--accent); background: var(--surface-2); margin-block: 6px 13px; }
.meter::-webkit-progress-bar { background: var(--surface-2); }
.meter::-webkit-progress-value { background: var(--accent); border-radius: 9px; }
.meter::-moz-progress-bar { background: var(--accent); }
.conversation { display: grid; gap: 8px; margin: 12px 0; }
.bubble { padding: 9px 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.bubble.staff { border-color: color-mix(in srgb,var(--accent) 25%,var(--border)); }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; }
.bubble small { color: var(--muted); }
.search { display: flex; gap: 7px; margin-bottom: 15px; }
.search input { min-width: 0; flex: 1; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.paging { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; padding-top: 12px; }
.gate { max-width: 520px; padding: 35px 22px; margin: 12vh auto; color: var(--muted); text-align: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.gate h1 { color: var(--text); font-size: 1.35rem; margin-bottom: 9px; }
.gate p { margin-bottom: 12px; }
.gate .button { margin: 4px; }
.loader { display: inline-block; width: 27px; height: 27px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: rotate .8s linear infinite; }
@keyframes rotate { to { transform: rotate(1turn); } }
.toast { z-index: 6; position: fixed; inset-inline-end: 27px; inset-block-end: 25px; max-width: min(365px,calc(100% - 34px)); padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; color: var(--text); box-shadow: var(--shadow); }
.mobile-nav { display: none; }
@media (max-width: 1040px) {
  .shell { grid-template-columns: 194px minmax(0,1fr); }
  .sidebar { padding-inline: 13px; }
  .metric { padding-inline: 12px; }
  .metric-icon { inline-size: 36px; block-size: 36px; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 58px; padding: max(8px,env(safe-area-inset-top)) 16px 8px; }
  .mobile-brand { display: flex; align-items: center; gap: 5px; font-size: .93rem; }
  .crumb { display: none; }
  .screen { padding: 14px 13px 104px; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 4; justify-content: center; gap: 1px;
    padding: 6px 7px max(8px,env(safe-area-inset-bottom)); background: var(--rail); border-top: 1px solid var(--border);
  }
  .mobile-nav:empty { display: none; }
  .mobile-nav .nav-link { display: grid; place-items: center; gap: 5px; flex: 1; padding: 6px 2px; font-size: .69rem; text-align: center; border-radius: 9px; }
  .hero { min-height: 192px; padding: 20px 17px; border-radius: 19px; }
  .hero-copy { max-width: 76%; }
  .hero p { margin: 7px 0 13px; font-size: .86rem; }
  .orbit { inset-inline-end: -27px; transform: translateY(-50%) scale(.60); }
  .orbit span:nth-child(4) { box-shadow: 0 0 20px #42ffe345; }
  .metrics { gap: 7px; margin: 11px 0 14px; }
  .metric { padding: 9px 7px; border-radius: 13px; align-items: start; gap: 5px; flex-direction: column; }
  .metric-icon { inline-size: 29px; block-size: 29px; border-radius: 9px; font-size: .92rem; }
  .metric strong { font-size: .99rem; }
  .metric small { font-size: .73rem; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .card { padding: 13px; border-radius: 15px; }
  .offer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .offer { min-height: 164px; }
  .slot-icon { inline-size: 39px; block-size: 39px; }
  .row-meta .button { padding-inline: 8px; }
  .toast { inset-block-end: 68px; inset-inline-end: 12px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms !important; scroll-behavior: auto !important; } }
