﻿/* Rubiko kit page — kit layout + domain components (built on styles.css tokens) */

body.kit { background: var(--well); }

/* ---------- hero ---------- */
.k-hero { background: var(--backdrop); padding: 28px var(--gutter) 0; overflow: hidden; }
.k-hero-in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; }
.k-top { max-width: 1240px; margin: 0 auto 28px; display: flex; align-items: center; gap: 12px; }
.k-top .brand { color: var(--ink); padding: 0; }
.k-top .grow { flex: 1; }
.k-hero h1 { font-size: clamp(34px, 5.4vw, 66px); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
.k-hero h1 em { font-style: normal; background: var(--ink); color: var(--lime); padding: 0 .22em; border-radius: .3em; }
.k-hero p.lead { font-size: 16px; color: #3b4214; max-width: 46ch; margin: 16px 0 22px; line-height: 1.9; }
.k-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.k-hero .facts { display: flex; gap: 22px; margin: 26px 0 34px; flex-wrap: wrap; }
.k-hero .facts div { font-size: 12px; color: #4a5216; }
.k-hero .facts b { display: block; font-size: 22px; color: var(--ink); font-weight: 800; }
.k-stage { position: relative; align-self: end; background: var(--ink); border-radius: 36px 36px 0 0; padding: 26px 26px 0; min-height: 360px; }
.k-stage .bubbles { max-width: 380px; }
.k-stage .b3 { box-shadow: 0 0 0 6px var(--ink); }
.k-stage .b2 { background: #fff; color: var(--ink); }
.k-stage .float { position: absolute; background: var(--card); border-radius: 18px; padding: 10px 14px; box-shadow: var(--sh-float); font-size: 12px; display: flex; gap: 10px; align-items: center; }
.k-stage .float.f1 { top: 22px; inset-inline-start: -18px; animation: floaty 6s var(--ease-in-out) infinite alternate; }
.k-stage .float.f2 { bottom: 26px; inset-inline-end: -14px; animation: floaty 7s var(--ease-in-out) 1s infinite alternate-reverse; }
@keyframes floaty { to { translate: 0 -8px; } }

/* ---------- layout + nav ---------- */
.k-layout { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 210px 1fr; gap: 28px; padding: 28px var(--gutter) 60px; }
.k-nav { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: none; }
.k-nav ol { list-style: none; margin: 0; padding: 6px; position: relative; background: var(--card); border-radius: 22px; }
.k-nav a { display: flex; gap: 8px; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); position: relative; z-index: 1; transition: color .25s; white-space: nowrap; }
.k-nav a span { font-size: 11px; color: var(--muted-2); width: 18px; }
.k-nav a.on { color: #fff; font-weight: 700; } .k-nav a.on span { color: var(--lime); }
.k-nav .ind { position: absolute; left: 6px; right: 6px; top: 0; height: 36px; border-radius: 999px; background: var(--ink); transition: transform .5s var(--spring-soft); }

.k-sec { padding-top: 18px; margin-bottom: 42px; scroll-margin-top: 16px; }
.k-sec > header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.k-sec > header .n { font-size: 13px; font-weight: 800; background: var(--ink); color: var(--lime); border-radius: 999px; padding: 2px 10px; }
.k-sec > header h2 { font-size: 26px; font-weight: 800; }
.k-sec > header p { font-size: 13px; color: var(--muted); flex-basis: 100%; }
.k-grid { display: grid; gap: 12px; grid-template-columns: repeat(12, 1fr); }
.k-grid > * { grid-column: span 12; min-width: 0; }
.k-grid > .s3 { grid-column: span 3; } .k-grid > .s4 { grid-column: span 4; } .k-grid > .s5 { grid-column: span 5; } .k-grid > .s6 { grid-column: span 6; }
.k-grid > .s7 { grid-column: span 7; } .k-grid > .s8 { grid-column: span 8; } .k-grid > .s9 { grid-column: span 9; }
.demo { background: var(--card); border-radius: var(--r-card); padding: 18px; position: relative; min-width: 0; }
.demo.dark { background: var(--ink); color: var(--on-dark); }
.demo.flat { background: transparent; padding: 0; }
.cap { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 14px; letter-spacing: .01em; }
.cap::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lavender); }
.demo.dark .cap { color: var(--on-dark-muted); }
.cap .role { margin-inline-start: auto; font-weight: 600; font-size: 11px; background: var(--track); color: var(--text-2); padding: 2px 9px; border-radius: 999px; }
.demo.dark .cap .role { background: var(--ink-3); color: var(--on-dark); }
.wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: grid; gap: 12px; align-content: start; }
.note { font-size: 12px; color: var(--muted); line-height: 1.8; }
.note b { color: var(--text); }
.hr { height: 1px; background: var(--line); margin: 14px 0; }

/* reveal (with fail-safe in JS) */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform 1s var(--spring); }
.rv.in { opacity: 1; transform: none; }

/* ---------- foundations ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.sw { border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: start; }
.sw i { display: block; height: 74px; }
.sw div { padding: 8px 12px 10px; font-size: 12px; line-height: 1.5; }
.sw b { display: block; font-size: 12.5px; }
.sw code { font-family: "Poppins", monospace; font-size: 11px; color: var(--muted); }
.type-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.type-row:last-child { border: 0; }
.type-row small { font-size: 11px; color: var(--muted); font-family: "Poppins"; }
.radii { display: flex; gap: 12px; flex-wrap: wrap; }
.radii div { width: 86px; height: 70px; background: var(--lav-faint); box-shadow: inset 0 0 0 1.5px var(--lavender); display: grid; place-items: end start; padding: 8px; font-size: 11px; font-weight: 600; }
.space { display: flex; align-items: flex-end; gap: 10px; }
.space div { background: var(--lime); border-radius: 4px; font-size: 10px; display: grid; place-items: end center; padding-bottom: 2px; }

/* ---------- motion ---------- */
.ease-lab { display: grid; gap: 8px; }
.ease-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; font-size: 12px; }
.ease-track { height: 40px; background: var(--track); border-radius: 999px; position: relative; overflow: hidden; }
.ease-track i { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); }
.ease-lab.go .ease-track i { transform: translateX(calc(-1 * (var(--w, 300px) - 40px))); }
.press-pad { height: 150px; border-radius: 26px; background: var(--lavender); display: grid; place-items: center; font-weight: 800; font-size: 18px; user-select: none; touch-action: manipulation; }
.principles { display: grid; gap: 8px; }
.principles div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.principles b { background: var(--lime); border-radius: 8px; padding: 0 7px; font-size: 12px; flex: none; }

/* ---------- signature extras ---------- */
.trio-sizes { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.trio { position: relative; flex: none; }
.trio i { position: absolute; border-radius: 50%; transition: transform .6s var(--spring-soft); }
.trio i { aspect-ratio: 1; }
.trio i:nth-child(1) { width: 60%; background: var(--lavender); top: 0; right: 0; }
.trio i:nth-child(2) { width: 48%; background: var(--ink); top: 10%; left: 2%; }
.trio i:nth-child(3) { width: 38%; background: var(--lime); bottom: 0; left: 30%; box-shadow: 0 0 0 2px var(--card); }
.on-ink .trio i:nth-child(2), .trio.on-ink i:nth-child(2) { background: #fff; }
.trio:hover i:nth-child(1) { transform: translate(4%, -4%); } .trio:hover i:nth-child(2) { transform: translate(-6%, -2%); } .trio:hover i:nth-child(3) { transform: translateY(8%); }
.trio.spin i { animation: orbit 1.4s var(--ease-in-out) infinite; }
.trio.spin i:nth-child(2) { animation-delay: -.45s; } .trio.spin i:nth-child(3) { animation-delay: -.9s; }
@keyframes orbit { 0%, 100% { translate: 0 0; } 33% { translate: -10% 8%; } 66% { translate: 8% -6%; } }
.trio.done i:nth-child(3) { transform: scale(1.18); }
.moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mood { background: var(--track); border-radius: 18px; padding: 16px; display: grid; justify-items: center; gap: 10px; font-size: 12px; font-weight: 600; }

/* ---------- inputs extras ---------- */
.otp { display: flex; gap: 8px; direction: ltr; }
.otp input { width: 48px; height: 56px; border-radius: 16px; border: 0; background: var(--track); text-align: center; font-size: 22px; font-weight: 700; outline: 0; transition: box-shadow .2s, background-color .2s, transform .35s var(--spring-pop); }
.otp input:focus { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
.otp input.filled { background: var(--lime-soft); }
.otp.ok input { background: var(--lime); }
.otp.shake { animation: shake .4s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rc { text-align: start; border-radius: 18px; padding: 14px; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; gap: 4px; position: relative; background: var(--card); }
.rc b { font-size: 13.5px; } .rc span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.rc::after { content: ""; position: absolute; top: 14px; inset-inline-end: 14px; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .3s var(--spring-pop), background-color .2s; }
.rc.on { box-shadow: inset 0 0 0 2px var(--ink); }
.rc.on::after { background: var(--lime); box-shadow: inset 0 0 0 5px var(--ink); }
.stepper { display: inline-flex; align-items: center; background: var(--track); border-radius: 999px; padding: 4px; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: grid; place-items: center; }
.stepper output { min-width: 44px; text-align: center; font-weight: 700; }
.slider { position: relative; padding-top: 30px; }
.slider input { width: 100%; appearance: none; height: 8px; border-radius: 8px; background: linear-gradient(to left, var(--ink) var(--p, 50%), var(--track) var(--p, 50%)); outline: 0; }
.slider input::-webkit-slider-thumb { appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--card), 0 2px 8px rgb(0 0 0 / .25); cursor: grab; transition: transform .3s var(--spring-pop); }
.slider input:active::-webkit-slider-thumb { transform: scale(1.15); }
.slider input::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--card); }
.slider .bub { position: absolute; top: 0; transform: translateX(50%); background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }

/* jalali date picker */
.dp { width: 300px; max-width: 100%; background: var(--card); border-radius: 22px; padding: 14px; box-shadow: var(--sh-pop); }
.dp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dp-head b { flex: 1; text-align: center; font-size: 14px; }
.dp-head button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--track); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.dp-grid .wd { font-size: 11px; color: var(--muted); padding: 4px 0; font-weight: 600; }
.dp-grid button { height: 36px; border-radius: 12px; font-size: 13px; font-weight: 500; position: relative; }
.dp-grid button:hover { background: var(--track); }
.dp-grid button.hol { color: var(--danger); }
.dp-grid button.today::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--lav-2); }
.dp-grid button.sel { background: var(--ink); color: var(--lime); font-weight: 700; }
.dp-grid button.inr { background: var(--lime-soft); border-radius: 0; }
.dp-grid button.has::before { content: ""; position: absolute; top: 5px; inset-inline-end: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--lime-2); }

/* ---------- feedback ---------- */
.toasts { position: fixed; z-index: 120; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(420px, calc(100vw - 24px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 12px 10px 10px; box-shadow: var(--sh-pop); font-size: 13px;
  opacity: 0; transform: translateY(20px) scale(.94); transition: opacity .25s var(--ease-out), transform .5s var(--spring-pop); }
.toast.show { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .2s, transform .3s var(--ease-out); }
.toast .ti { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--lime); color: var(--ink); }
.toast.err .ti { background: var(--danger); color: #fff; } .toast.info .ti { background: var(--lavender); }
.toast .grow { flex: 1; min-width: 0; }
.toast button { color: var(--lime); font-weight: 700; font-size: 12.5px; padding: 6px 10px; border-radius: 10px; }
.toast button:hover { background: var(--ink-3); }

.scrim { position: fixed; inset: 0; z-index: 100; background: rgb(20 20 22 / .45); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-out); backdrop-filter: blur(2px); }
.scrim.show { opacity: 1; pointer-events: auto; }
.dialog { position: fixed; z-index: 110; top: 50%; left: 50%; width: min(400px, calc(100vw - 32px)); background: var(--card); border-radius: 28px; padding: 24px; box-shadow: var(--sh-pop);
  transform: translate(-50%, -46%) scale(.94); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease-out), transform .5s var(--spring-soft); }
.dialog.show { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.dialog h3 { font-size: 18px; font-weight: 800; margin: 12px 0 6px; }
.dialog p { font-size: 13px; color: var(--muted); line-height: 1.9; }
.dialog .acts { display: flex; gap: 8px; margin-top: 18px; } .dialog .acts .btn { flex: 1; }
.dialog .di { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-bg); color: var(--danger); }
.sheet { position: fixed; z-index: 110; left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(560px, 100vw); background: var(--card); border-radius: 30px 30px 0 0; padding: 8px 20px 26px;
  transform: translateY(105%); transition: transform .5s var(--ease-ios); box-shadow: var(--sh-pop); max-height: 86vh; overflow: auto; touch-action: none; }
.sheet.show { transform: none; }
.sheet .handle { display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 6px auto 14px; cursor: grab; }
.skel { background: linear-gradient(90deg, var(--track) 0%, #fafafa 40%, var(--track) 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.ring { width: 92px; height: 92px; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg) scaleY(-1); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--track); } .ring .fg { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--spring); }
.ring b { font-size: 20px; font-weight: 800; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 22px 10px; }
.empty h4 { font-size: 15px; font-weight: 800; } .empty p { font-size: 12.5px; color: var(--muted); max-width: 32ch; line-height: 1.8; }
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 18px; padding: 12px 14px; font-size: 13px; line-height: 1.8; }
.banner .ic { margin-top: 3px; }
.banner.warn { background: var(--warn-bg); color: #6b4500; } .banner.danger { background: var(--danger-bg); color: #8c2a23; } .banner.info { background: var(--lav-faint); color: #3f3596; } .banner.ok { background: var(--ok-bg); color: #1f5a35; }
.banner b { display: block; }

/* async button states */
.btn .lbl { display: inline-flex; align-items: center; gap: 8px; }
.btn .lbl, .btn .spin, .btn .ok { transition: opacity .2s, transform .4s var(--spring-pop); }
.btn .spin, .btn .ok { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.8); }
.btn.loading .lbl, .btn.done .lbl { opacity: 0; transform: scale(.9); }
.btn.loading .spin { opacity: 1; transform: none; }
.btn.done .ok { opacity: 1; transform: none; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.btn .ok path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .4s var(--ease-out) .1s; }
.btn.done .ok path { stroke-dashoffset: 0; }

/* ---------- navigation demos ---------- */
.mini-side { background: var(--ink); color: var(--on-dark); border-radius: 24px; padding: 14px 8px; width: 220px; max-width: 100%; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); } .crumbs b { color: var(--text); }
.tabs-line { display: flex; gap: 22px; border-bottom: 1px solid var(--line); position: relative; overflow-x: auto; scrollbar-width: none; }
.tabs-line button { height: 42px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs-line button.on { color: var(--ink); }
.tabs-line .bar-ind { position: absolute; bottom: -1px; left: 0; height: 3px; border-radius: 3px; background: var(--ink); transition: transform .45s var(--spring-soft), width .45s var(--spring-soft); }
.pager { display: flex; gap: 6px; align-items: center; }
.pager button { min-width: 36px; height: 36px; border-radius: 12px; font-weight: 600; font-size: 13px; }
.pager button.on { background: var(--ink); color: #fff; }
.pager button:hover:not(.on) { background: var(--track); }
.dots-pg { display: flex; gap: 6px; } .dots-pg i { width: 8px; height: 8px; border-radius: 8px; background: var(--line-2); transition: width .4s var(--spring-soft), background-color .2s; }
.dots-pg i.on { width: 24px; background: var(--ink); }

/* phone frame */
.phone { width: 340px; max-width: 100%; margin: 0 auto; background: var(--ink); border-radius: 44px; padding: 10px; box-shadow: var(--sh-float); }
.phone .scr { background: var(--well); border-radius: 35px; height: 680px; overflow-y: auto; overflow-x: hidden; position: relative; scrollbar-width: none; }
.phone .sbar { display: flex; justify-content: space-between; padding: 12px 22px 4px; font-size: 12px; font-weight: 700; font-family: "Poppins"; direction: ltr; }
.phone .scr-in { padding: 6px 14px 90px; }
.phone .tabbar { position: absolute; display: flex; inset-inline: 10px; bottom: 10px; height: 60px; border-radius: 22px; }
.phone .ph-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.phone .ph-head h3 { font-size: 20px; font-weight: 800; flex: 1; }

/* ---------- data ---------- */
.kpi { display: grid; gap: 6px; }
.kpi .t { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.spark { width: 100%; height: 46px; overflow: visible; }
.spark path.l { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.4s var(--ease-out); }
.spark path.a { fill: var(--lime-soft); opacity: 0; transition: opacity .8s .6s; }
.in .spark path.l { stroke-dashoffset: 0; } .in .spark path.a { opacity: 1; }
.line-chart { position: relative; }
.line-chart svg { width: 100%; height: 190px; overflow: visible; }
.line-chart .gl { stroke: var(--line); stroke-dasharray: 3 5; }
.line-chart .ln { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .hit { fill: transparent; cursor: pointer; }
.line-chart .pt { fill: var(--card); stroke: var(--ink); stroke-width: 2.5; opacity: 0; transition: opacity .2s; }
.line-chart .hit:hover + .pt { opacity: 1; }
.donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 20; transition: stroke-width .3s var(--spring-soft); cursor: pointer; }
.donut circle:hover { stroke-width: 26; }
.donut .lg { display: grid; gap: 6px; font-size: 12.5px; }
.donut .lg span { display: flex; gap: 8px; align-items: center; }
.donut .lg i { width: 10px; height: 10px; border-radius: 3px; }

/* table extras */
.th-sort { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--muted); font-size: 12px; }
.th-sort .ic { width: 14px; height: 14px; opacity: .4; transition: transform .3s var(--spring-soft), opacity .2s; }
.th-sort.asc .ic, .th-sort.desc .ic { opacity: 1; } .th-sort.asc .ic { transform: rotate(180deg); }
.tbl-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tbl-bar .search { background: var(--track); height: 40px; flex: 1; min-width: 180px; }
.bulk { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 16px; padding: 8px 8px 8px 14px; margin-bottom: 10px; font-size: 13px;
  transform: translateY(-6px); opacity: 0; height: 0; padding-block: 0; overflow: hidden; transition: all .4s var(--spring-soft); }
.bulk.show { transform: none; opacity: 1; height: 50px; padding-block: 8px; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell b { display: block; font-size: 13px; } .who-cell span { font-size: 11.5px; color: var(--muted); }

/* ---------- domain: course / term / syllabus ---------- */
.course-card { border-radius: var(--r-card); padding: 18px; background: var(--card); display: grid; gap: 12px; position: relative; overflow: hidden; }
.course-card .cc-top { display: flex; gap: 12px; align-items: center; }
.course-card .cc-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--lavender); }
.course-card h4 { font-size: 16px; font-weight: 800; }
.course-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.terms { display: flex; align-items: center; gap: 0; padding: 6px 0; overflow-x: auto; scrollbar-width: none; }
.term { display: grid; justify-items: center; gap: 6px; min-width: 84px; position: relative; text-align: center; }
.term .node { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--track); color: var(--muted); position: relative; z-index: 1; font-weight: 800; font-size: 15px; }
.term.done .node { background: var(--ink); color: var(--lime); }
.term.now .node { background: var(--lime); color: var(--ink); box-shadow: 0 0 0 6px var(--lime-soft); animation: pulse 2.2s var(--ease-in-out) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgb(218 241 101 / .25); } }
.term.lock .node { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.term small { font-size: 11.5px; font-weight: 600; } .term span { font-size: 10.5px; color: var(--muted); }
.term + .term::before { content: ""; position: absolute; top: 21px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.term.done + .term::before { background: var(--ink); }
.syl { display: grid; gap: 6px; }
.syl-item { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; background: var(--track); border-radius: 16px; padding: 10px 12px; transition: transform .35s var(--spring-soft), box-shadow .2s, background-color .2s; }
.syl-item .h { color: var(--muted-2); cursor: grab; } .syl-item .no { width: 28px; height: 28px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.syl-item b { font-size: 13px; display: block; } .syl-item span { font-size: 11.5px; color: var(--muted); }
.syl-item.dragging { background: var(--card); box-shadow: var(--sh-float); transform: scale(1.02); z-index: 2; position: relative; }
.syl-item.st-done { background: var(--lime-soft); } .syl-item.st-done .no { background: var(--lime); }
.syl-item.st-half .no { background: var(--lavender); } .syl-item.st-left .no { background: var(--warn-bg); color: var(--warn); }
.mark3 { display: inline-flex; background: var(--card); border-radius: 999px; padding: 3px; gap: 2px; }
.mark3 button { height: 28px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--muted); transition: background-color .25s, color .25s, transform .35s var(--spring-soft); }
.mark3 button:active { transform: scale(.92); }
.mark3 button.on[data-s="done"] { background: var(--ink); color: var(--lime); }
.mark3 button.on[data-s="half"] { background: var(--lavender); color: var(--ink); }
.mark3 button.on[data-s="left"] { background: var(--warn-bg); color: var(--warn); }
.ver { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.ver i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.ver.cur i { background: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.level-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.level-name .chip.on { background: var(--lime); color: var(--ink); }

/* ---------- domain: schedule ---------- */
.week { display: grid; grid-template-columns: 46px repeat(7, minmax(84px, 1fr)); grid-template-rows: 34px repeat(14, 30px); gap: 0; position: relative; min-width: 680px; font-size: 11.5px; }
.week-wrap { overflow-x: auto; scrollbar-width: thin; }
.week .dh { grid-row: 1; text-align: center; font-weight: 700; font-size: 12px; padding-top: 6px; }
.week .dh.today { color: var(--ink); } .week .dh.today span { background: var(--lime); border-radius: 999px; padding: 1px 8px; }
.week .hr-l { grid-column: 1; font-size: 10.5px; color: var(--muted); transform: translateY(-7px); }
.week .cell { border-top: 1px solid var(--line); border-inline-start: 1px dashed var(--line); }
.week .ev { margin: 2px 3px; border-radius: 12px; padding: 5px 8px; font-size: 11px; line-height: 1.4; overflow: hidden; position: relative; z-index: 1; transition: transform .35s var(--spring-soft), box-shadow .2s; cursor: pointer; }
.week .ev:hover { transform: translateY(-2px); box-shadow: var(--sh-float); }
.week .ev b { display: block; font-size: 11.5px; }
.week .ev.cls { background: var(--ink); color: #fff; } .week .ev.cls b { color: var(--lime); }
.week .ev.cls2 { background: var(--lavender); color: var(--ink); }
.week .ev.mtg { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.week .ev.free { background: repeating-linear-gradient(135deg, var(--lime-soft) 0 6px, transparent 6px 12px); box-shadow: inset 0 0 0 1.5px var(--lime-2); color: #4f5c00; font-weight: 700; display: grid; place-items: center; text-align: center; }
.week .ev.conflict { background: repeating-linear-gradient(135deg, var(--danger-bg) 0 6px, #fff 6px 12px); box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--danger); }
.week .ev.cancel { background: var(--track); color: var(--muted); text-decoration: line-through; }
.week .ev.busy { background: repeating-linear-gradient(135deg, #d9d9dc 0 2px, transparent 2px 7px); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); display: grid; place-items: center; font-weight: 700; }
.week .now { position: absolute; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.week .now::before { content: ""; position: absolute; inset-inline-start: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.sess { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: var(--card); border-radius: 20px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.sess time { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--track); font-weight: 800; font-size: 14px; line-height: 1.2; text-align: center; }
.sess time small { font-size: 10px; font-weight: 600; color: var(--muted); }
.sess.next time { background: var(--lime); } .sess.held time { background: var(--ink); color: #fff; } .sess.held time small { color: var(--on-dark-muted); }
.sess.cancel { opacity: .75; } .sess.cancel b.title { text-decoration: line-through; }
.sess b.title { font-size: 14px; display: block; } .sess .sub { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* attendance */
.att { display: grid; gap: 6px; }
.att-row { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 18px; padding: 8px 8px 8px 10px; transition: background-color .3s; }
.att-row .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-row .nm small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.att4 { display: inline-flex; background: var(--track); border-radius: 999px; padding: 3px; gap: 2px; flex: none; }
.att4 button { width: 32px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--muted); transition: background-color .2s, color .2s, transform .35s var(--spring-pop); }
.att4 button.on { transform: scale(1.05); }
.att4 button.on[data-a="p"] { background: var(--lime); color: var(--ink); }
.att4 button.on[data-a="a"] { background: var(--danger); color: #fff; }
.att4 button.on[data-a="l"] { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn); }
.att4 button.on[data-a="e"] { background: var(--lavender); color: var(--ink); }
.att-row.is-a { background: #fff6f5; }
.att-sum { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- domain: enrolment / finance ---------- */
.steps { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.step i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--track); font-style: normal; font-weight: 800; font-size: 12px; transition: background-color .3s, color .3s, transform .4s var(--spring-pop); }
.step.done i { background: var(--ink); color: var(--lime); } .step.now i { background: var(--lime); color: var(--ink); transform: scale(1.12); } .step.now { color: var(--ink); }
.step + .step::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--line-2); }
.step.done + .step::before { background: var(--ink); }
.wiz-body { min-height: 230px; position: relative; overflow: hidden; }
.wiz-pane { position: absolute; inset: 0; transition: transform .5s var(--ease-ios), opacity .35s var(--ease-out); }
.wiz-pane.hidden-r { transform: translateX(-30%); opacity: 0; pointer-events: none; }
.wiz-pane.hidden-l { transform: translateX(30%); opacity: 0; pointer-events: none; }
.person { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: var(--track); }
.person .grow { flex: 1; min-width: 0; } .person b { font-size: 14px; display: block; } .person span { font-size: 12px; color: var(--muted); }
.link-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 4px 18px; }
.link-line::before { content: ""; width: 2px; height: 20px; background: var(--line-2); border-radius: 2px; }

.inv { display: grid; gap: 10px; }
.inv-total { display: flex; align-items: baseline; gap: 8px; }
.inv-total b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.inv-lines { display: grid; gap: 6px; font-size: 13px; }
.inv-lines div { display: flex; justify-content: space-between; gap: 10px; }
.inv-lines .disc { color: var(--ok); }
.inst { display: grid; gap: 0; }
.inst-row { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; position: relative; }
.inst-row .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line-2); margin-inline: auto; position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--card); }
.inst-row:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 11px; top: 50%; height: 100%; width: 2px; background: var(--line); }
.inst-row.paid .dot { background: var(--ink); } .inst-row.due .dot { background: var(--lime); box-shadow: 0 0 0 4px var(--card), 0 0 0 7px var(--lime-soft); }
.inst-row.over .dot { background: var(--danger); } .inst-row.part .dot { background: conic-gradient(var(--ink) 0 50%, var(--line-2) 0); }
.inst-row.waived .dot { background: var(--lavender); }
.inst-row b { font-size: 13.5px; display: block; } .inst-row span.s { font-size: 11.5px; color: var(--muted); }
.inst-row .amt { font-weight: 700; font-size: 13.5px; }
.inst-row.waived .amt { text-decoration: line-through; color: var(--muted); }
.plan-card { border-radius: 20px; padding: 16px; display: grid; gap: 8px; box-shadow: inset 0 0 0 1.5px var(--line-2); position: relative; text-align: start; transition: box-shadow .25s, transform .35s var(--spring-soft); background: var(--card); }
.plan-card.on { box-shadow: inset 0 0 0 2px var(--ink); }
.plan-card.on::after { content: "انتخاب شد"; position: absolute; top: 12px; inset-inline-end: 12px; background: var(--lime); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.plan-card b { font-size: 14px; } .plan-card .mini-bars { display: flex; gap: 4px; align-items: flex-end; height: 34px; }
.plan-card .mini-bars i { flex: 1; border-radius: 6px; background: var(--lavender); }
.plan-card .mini-bars i:first-child { background: var(--ink); }
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method button { border-radius: 16px; padding: 12px 6px; display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .2s, background-color .2s, transform .35s var(--spring-soft); }
.method button.on { background: var(--ink); color: #fff; box-shadow: none; } .method button.on .ic { color: var(--lime); }
.cheque { border-radius: 18px; padding: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 6px; position: relative; overflow: hidden; }
.cheque::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--line-2)); }
.cheque .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cheque b { font-size: 14px; }
.money-words { font-size: 12px; color: var(--muted); min-height: 18px; }

/* swap */
.swap-card { border-radius: 22px; background: var(--card); padding: 16px; display: grid; gap: 12px; }
.swap-flow { display: flex; align-items: center; gap: 10px; }
.swap-flow .arr { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 10px); position: relative; }
.suggest { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; background: var(--track); }
.suggest .grow { flex: 1; } .suggest b { font-size: 13px; display: block; } .suggest span { font-size: 11.5px; color: var(--muted); }

/* ---------- meetings ---------- */
.avail { display: grid; grid-template-columns: 58px repeat(12, 1fr); gap: 3px; font-size: 11px; align-items: center; user-select: none; }
.avail .d { font-weight: 700; font-size: 12px; } .avail .h { text-align: center; color: var(--muted); font-size: 10px; }
.avail button { height: 28px; border-radius: 8px; background: var(--track); transition: background-color .2s, transform .3s var(--spring-pop); }
.avail button.on { background: var(--lime); } .avail button.off { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); }
.avail button:hover { transform: scale(1.08); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.slot { border-radius: 16px; padding: 10px 12px; background: var(--track); text-align: start; display: grid; gap: 2px; transition: transform .35s var(--spring-soft), background-color .2s, box-shadow .2s; }
.slot b { font-size: 13.5px; } .slot span { font-size: 11px; color: var(--muted); }
.slot.best { background: var(--lime-soft); box-shadow: inset 0 0 0 1.5px var(--lime-2); }
.slot.on { background: var(--ink); color: #fff; } .slot.on span { color: var(--on-dark-muted); }
.slot.in { animation: slotIn .6s var(--spring-pop) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes slotIn { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.topic-add { display: flex; gap: 8px; background: var(--ink); border-radius: 20px; padding: 6px; }
.topic-add input { flex: 1; background: none; border: 0; outline: 0; color: #fff; padding: 0 12px; font-size: 14px; min-width: 0; }
.topic-add input::placeholder { color: var(--on-dark-muted); }
.topics { display: grid; gap: 6px; margin-top: 10px; }
.topic { display: flex; gap: 10px; align-items: center; background: var(--track); border-radius: 16px; padding: 10px 12px; transition: transform .45s var(--spring-soft), opacity .3s, background-color .3s; }
.topic.new { animation: topicIn .7s var(--spring-pop); background: var(--lime-soft); }
@keyframes topicIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.topic .grow { flex: 1; min-width: 0; } .topic b { font-size: 13px; display: block; } .topic span { font-size: 11px; color: var(--muted); }
.topic.old { box-shadow: inset 3px 0 0 var(--warn); }
.topic.gone { opacity: 0; transform: translateX(-40px) scale(.95); }
.req { border-radius: 22px; background: var(--card); padding: 16px; display: grid; gap: 10px; }
.req .times { display: flex; gap: 6px; flex-wrap: wrap; }
.req .times .chip { height: 30px; font-size: 12px; }
.req .times .chip.on { background: var(--lime); color: var(--ink); }
.req-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-cell { display: grid; grid-template-columns: 50px 1fr; gap: 8px; align-items: center; font-size: 12px; }
.fb-bar { height: 26px; border-radius: 8px; background: var(--ok-bg); position: relative; overflow: hidden; }
.fb-bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: repeating-linear-gradient(135deg, #c9c9cd 0 2px, #e4e4e7 2px 6px); }
.fb-bar i.mine { background: var(--ink); }
.fb-bar i.out { background: repeating-linear-gradient(135deg, var(--line) 0 2px, #fff 2px 6px); }

/* notifications + sms + audit */
.notif { display: grid; gap: 2px; }
.nt { display: flex; gap: 12px; padding: 10px; border-radius: 16px; align-items: flex-start; transition: background-color .2s; }
.nt:hover { background: var(--track); }
.nt .icon-dot { width: 36px; height: 36px; }
.nt .grow { flex: 1; min-width: 0; font-size: 13px; line-height: 1.7; } .nt .grow span { display: block; font-size: 11.5px; color: var(--muted); }
.nt.unread::after { content: ""; flex: none; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--lime-2); box-shadow: 0 0 0 3px var(--lime-soft); }
.var-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.var-chips button { height: 28px; padding: 0 10px; border-radius: 999px; background: var(--lav-faint); color: var(--info); font-size: 12px; font-weight: 700; }
.var-chips button:hover { background: var(--lav-soft); }
.sms-prev { background: var(--track); border-radius: 22px; padding: 16px; }
.sms-bubble { background: var(--card); border-radius: 18px 18px 6px 18px; padding: 12px 14px; font-size: 13px; line-height: 1.9; box-shadow: 0 1px 2px rgb(0 0 0 / .06); white-space: pre-wrap; }
.sms-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; }
.audit { display: grid; gap: 0; }
.au { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 10px 0; align-items: start; font-size: 12.5px; position: relative; }
.au:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 15px; top: 40px; bottom: -4px; width: 2px; background: var(--line); }
.au .grow { line-height: 1.8; } .au del { color: var(--danger); } .au ins { color: var(--ok); text-decoration: none; font-weight: 700; }
.au time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.role-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.role-chips .chip { height: 26px; font-size: 11.5px; padding: 0 10px; }
.role-chips .chip.on { background: var(--lavender); color: var(--ink); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .grow { flex: 1; min-width: 0; } .set-row b { font-size: 13.5px; display: block; } .set-row span { font-size: 12px; color: var(--muted); }

/* parent */
.kids { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.kid { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 700; white-space: nowrap; transition: background-color .25s, color .25s; }
.kid.on { background: var(--ink); color: #fff; }
.ro-tag { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--track); padding: 3px 10px; border-radius: 999px; }

footer.k-foot { max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter) 40px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line-2); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .k-grid > .s3 { grid-column: span 6; } .k-grid > .s4, .k-grid > .s5 { grid-column: span 6; } .k-grid > .s7, .k-grid > .s8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .k-hero-in { grid-template-columns: 1fr; }
  .k-stage { min-height: 300px; }
  .k-layout { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .k-nav { position: sticky; top: 0; z-index: 40; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter); background: rgb(226 226 226 / .88); backdrop-filter: blur(10px); max-height: none; overflow-x: auto; }
  .k-nav ol { display: flex; gap: 4px; background: none; padding: 0; }
  .k-nav a { background: var(--card); height: 34px; }
  .k-nav a.on { background: var(--ink); }
  .k-nav .ind { display: none; }
  .k-sec { scroll-margin-top: 64px; }
}
@media (max-width: 640px) {
  .k-grid > .s3, .k-grid > .s4, .k-grid > .s5, .k-grid > .s6, .k-grid > .s7, .k-grid > .s8, .k-grid > .s9 { grid-column: span 12; }
  .k-sec > header h2 { font-size: 21px; }
  .demo { padding: 14px; }
  .method { grid-template-columns: repeat(3, 1fr); }
  .avail { grid-template-columns: 44px repeat(12, 1fr); gap: 2px; }
  .avail button { height: 24px; border-radius: 6px; }
  .k-stage .float { display: none; }
  .type-row { grid-template-columns: 1fr; gap: 2px; }
}

