/* Dashboards (dash.js): under the works, one card per admin panel, in that app's colours.
   Card: logo + «شوف لوحة تحكم تطبيق …», then the panel's own menu beside a preview window
   (and the panel on a phone) that follows the item under the mouse. Every item opens the panel on its section. */
.dash { position: relative; isolation: isolate; overflow: clip; background: var(--void);
  padding: clamp(96px, 14vh, 160px) clamp(16px, 5vw, 64px) clamp(88px, 13vh, 150px); }
.dash::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 520px; pointer-events: none;
  background: radial-gradient(50% 70% at 50% 0%, rgba(120, 8, 14, .22), transparent 70%); }
.dash-wrap { max-width: 1240px; margin: 0 auto; }

.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
.dash-eyebrow { margin: 0; font: 600 12px/1 Inter, sans-serif; letter-spacing: .32em; color: var(--red-hi); }
.dash-title { margin: 14px 0 0; font-weight: 400; line-height: 1.08; font-family: Lalezar, "IBM Plex Sans Arabic", sans-serif; font-size: clamp(40px, 5.4vw, 78px); }
.dash-title em { font-style: normal; font-family: "Aref Ruqaa", serif; font-weight: 700; color: var(--red); }
.dash-sub { margin: 14px 0 0; max-width: 34em; font-size: 15px; line-height: 1.7; color: var(--ash); text-wrap: pretty; }
.dash-count { margin: 0 0 6px; flex: none; font: 500 13px/1.4 Inter, sans-serif; color: var(--ash); direction: ltr; }
.dash-count b { color: var(--bone); font-weight: 600; }
.dash-list { display: grid; gap: clamp(28px, 4vw, 48px); }

/* ---------- one panel ---------- */
.dboard { position: relative; isolation: isolate; overflow: clip; border-radius: 36px; padding: clamp(20px, 3.2vw, 44px);
  background:
    radial-gradient(70% 60% at 100% 0%, var(--glow), transparent 70%),
    radial-gradient(45% 55% at 0% 100%, color-mix(in srgb, var(--acc2) 16%, transparent), transparent 70%),
    var(--tint);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06); }
/* faint dot grid in the corner, like the panel's glass */
.dboard::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(60% 50% at 100% 0%, #000, transparent 75%); mask: radial-gradient(60% 50% at 100% 0%, #000, transparent 75%); }

.dboard-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.dboard-logo { --s: clamp(88px, 9vw, 120px); display: grid; place-items: center; align-self: start; width: var(--s); height: var(--s); border-radius: 32%;
  background: radial-gradient(80% 80% at 50% 25%, color-mix(in srgb, var(--acc2) 30%, transparent), rgba(255, 255, 255, .03) 75%);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 24px 60px -24px var(--acc2), inset 0 1px 0 rgba(255, 255, 255, .12); }
.dboard-logo img { width: 48%; height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
/* an app whose logo is its icon: the icon itself is the tile */
.dboard-logo.is-icon { overflow: hidden; border-radius: 22.5%; background: none; border: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 60px -22px var(--acc2); }
.dboard-logo.is-icon img { width: 100%; height: 100%; filter: none; }
.dboard-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12.5px; }
.dboard-kicker span { padding: 4px 11px; border-radius: 999px; background: var(--acc); color: #0d110f; font-weight: 600; }
.dboard-kicker b { font: 500 12.5px Inter, sans-serif; letter-spacing: .08em; color: var(--ash); }
.dboard-title { margin: 12px 0 0; font: 600 clamp(26px, 3.1vw, 42px)/1.2 "IBM Plex Sans Arabic", sans-serif; text-wrap: balance; }
.dboard-title em { font-style: normal; font-family: "Aref Ruqaa", serif; font-weight: 700; color: var(--acc2); }
/* a Latin name written with its logo inside (se77en: the 77 is the logo) */
.dboard-title em.dboard-word { font-family: Inter, sans-serif; font-weight: 600; color: var(--bone); white-space: nowrap; unicode-bidi: isolate; }
.dboard-word img { display: inline-block; width: auto; height: 1.6em; margin: -.3em .02em -.3em .04em; vertical-align: -.5em;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--acc) 55%, transparent)); }
.dboard-about { margin: 12px 0 0; max-width: 60ch; font-size: 15px; line-height: 1.75; color: var(--ash); text-wrap: pretty; }
.dboard-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.dboard-facts li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px;
  color: rgba(255, 255, 255, .86); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.dboard-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.dboard-open { align-self: start; background: var(--acc); color: #0d110f; box-shadow: 0 12px 34px -12px var(--acc); }
.dboard-open:hover { box-shadow: 0 16px 40px -10px var(--acc); }

.dboard-body { display: grid; grid-template-columns: minmax(330px, 410px) minmax(0, 1fr); align-items: start; gap: clamp(20px, 3vw, 40px); margin-top: clamp(24px, 3.4vw, 40px); }

/* the panel's menu */
.dboard-menu { padding: 16px; border-radius: 26px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08); }
.dboard-menu-label { display: flex; align-items: center; gap: 8px; margin: 2px 6px 12px; font-size: 13px; font-weight: 600; color: var(--bone); }
.dboard-menu-label small { padding: 2px 8px; border-radius: 999px; font: 600 11px/1.5 Inter, sans-serif; color: var(--ash); background: rgba(255, 255, 255, .07); }
.dboard-menu ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; padding: 0; list-style: none; }
.dboard-menu a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.3; color: rgba(255, 255, 255, .8); transition: background .2s, color .2s; }
.dboard-menu a > svg:first-child { flex: none; width: 18px; height: 18px; color: var(--acc2); transition: color .2s; }
.dboard-menu a > svg:last-child { position: absolute; inset-inline-end: 10px; width: 12px; height: 12px; opacity: 0; transform: translate(-3px, 3px); transition: opacity .2s, transform .2s; }
.dboard-menu a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.dboard-menu a:hover > svg:last-child, .dboard-menu a:focus-visible > svg:last-child { opacity: .8; transform: none; }
.dboard-menu a.on { background: var(--acc); color: #0d110f; font-weight: 600; }
.dboard-menu a.on > svg:first-child { color: #0d110f; }
.dboard-menu a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* the preview: a browser window with the section, and the panel on a phone */
.dboard-preview { position: relative; display: block; padding-bottom: clamp(40px, 5vw, 64px); }
.dboard-window { display: block; overflow: hidden; border-radius: 18px; background: #111512; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .95), 0 0 0 7px rgba(255, 255, 255, .025); transition: transform .5s var(--ease), box-shadow .5s; }
.dboard-preview:hover .dboard-window { transform: translateY(-4px); box-shadow: 0 60px 110px -40px rgba(0, 0, 0, .95), 0 0 0 7px rgba(255, 255, 255, .04); }
.dboard-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; direction: ltr; background: #171c18; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.dboard-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.dboard-bar i:nth-child(2) { background: #febc2e; }
.dboard-bar i:nth-child(3) { background: #28c840; }
.dboard-url { margin: 0 auto; padding: 4px 14px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px;
  font: 500 12px/1.4 Inter, sans-serif; color: var(--ash); background: rgba(255, 255, 255, .06); transform: translateX(-24px); }
.dboard-url b { color: var(--acc); font-weight: 500; }
.dboard-screen { position: relative; display: block; aspect-ratio: 1280 / 800; background: #dff2e3; }
.dboard-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .45s var(--ease); }
.dboard-screen img.cur { opacity: 1; }
.dboard-phone { position: absolute; inset-inline-end: -1.5%; bottom: 0; width: 21%; min-width: 96px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .7)); transition: transform .5s var(--ease); }
.dboard-preview:hover .dboard-phone { transform: translateY(-8px) rotate(-1.5deg); }
.dboard-phone span { display: block; padding: 6px; border-radius: 30px; background: linear-gradient(150deg, #3a3f3b, #0d100e 60%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.dboard-phone img { display: block; width: 100%; height: auto; border-radius: 24px; }
.dboard-hint { position: absolute; inset-inline-start: 4px; bottom: 6px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); }
.dboard-hint::before { content: ""; width: 14px; height: 20px; border-radius: 8px; border: 1.5px solid currentColor; opacity: .8; }

/* the cards rise in when they come into view */
.dash .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.dash .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .dboard-body { grid-template-columns: 1fr; }
  .dboard-menu ul { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 860px) {
  .dboard-top { grid-template-columns: auto 1fr; align-items: start; }
  .dboard-open { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 600px) {
  .dash-head { flex-direction: column; align-items: flex-start; }
  .dash-count { display: none; }
  .dboard { border-radius: 28px; }
  .dboard-top { grid-template-columns: 1fr; }
  .dboard-logo { --s: 84px; }
  .dboard-open { justify-content: center; width: 100%; }
  .dboard-menu { padding: 12px; }
  .dboard-menu ul { grid-template-columns: 1fr 1fr; }
  .dboard-menu a { padding: 8px 10px; gap: 8px; font-size: 13px; }
  .dboard-phone { width: 30%; }
  .dboard-bar { height: 30px; gap: 5px; }
  .dboard-bar i { width: 8px; height: 8px; }
  .dboard-url { font-size: 10.5px; }
}
@media (hover: none) { .dboard-hint { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .dash .reveal { opacity: 1; transform: none; transition: none; }
  .dboard-window, .dboard-phone, .dboard-screen img { transition: none; }
}
