@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
/* Manako — design tokens and shared components (prototype, round 1) */

:root {
  --cream: #FDF6ED;
  --sand: #E8DED0;
  --sand-soft: #F4ECE1;
  --cocoa: #655349;
  --cocoa-press: #54443B;
  --sage: #A8B5A0;
  --rose: #D7B4B3;
  --muted: #7A6A5E;
  --ink: #4A3F35;
  --error: #B5483B;
  --warn: #E0A84F;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 10px;
  --pill: 999px;
  --shadow: 0 4px 20px rgba(101, 83, 73, .07);
  --shadow-lg: 0 18px 48px rgba(101, 83, 73, .13);
  --font: 'Vazirmatn', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.5; font-weight: 800; color: var(--cocoa); }
h1 { font-size: clamp(1.65rem, 5.2vw, 2.7rem); }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 720px; }
.stack > * + * { margin-top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- prototype bar ---------- */
.proto-bar {
  background: var(--ink); color: var(--cream); font-size: .78rem;
  display: flex; gap: 12px; justify-content: center; align-items: center;
  padding: 6px 12px; flex-wrap: wrap;
}
.proto-bar a { color: var(--cream); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.6em;
  border-radius: var(--pill); border: 1.5px solid var(--cocoa);
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--cocoa); color: var(--cream); }
.btn-primary:hover { background: var(--cocoa-press); }
.btn-secondary { background: transparent; color: var(--cocoa); }
.btn-secondary:hover { background: rgba(101, 83, 73, .06); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-danger { background: var(--error); border-color: var(--error); color: #fff; }
.btn-lg { min-height: 58px; font-size: 1.08rem; padding: .8em 2.2em; }
.btn-sm { min-height: 36px; padding: .3em 1em; font-size: .875rem; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.link { font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(253, 246, 237, .93); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 32px; width: auto; }
.brand .tagline { display: none; font-size: .78rem; color: var(--muted); border-inline-start: 1px solid var(--sand); padding-inline-start: 12px; }
.nav { display: none; gap: 26px; }
.nav a { text-decoration: none; font-weight: 600; }
.nav a:hover, .nav a.active { text-decoration: underline; text-underline-offset: 8px; text-decoration-color: var(--rose); text-decoration-thickness: 2px; }
.header-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--cocoa); position: relative;
}
.icon-btn:hover { background: var(--sand-soft); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn .dot { position: absolute; top: 9px; inset-inline-end: 9px; width: 9px; height: 9px; background: var(--rose); border-radius: 50%; border: 2px solid var(--cream); }
.icon-btn.cart-btn { background: var(--sand-soft); }
.icon-btn.cart-btn:hover { background: var(--sand); }
.icon-btn .cart-count[hidden] { display: none; }
.icon-btn .cart-count { position: absolute; top: -2px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--pill); background: var(--cocoa); color: var(--cream); font-size: .72rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--cream); line-height: 1; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .brand .tagline { display: inline; }
}

.site-footer { background: var(--cocoa); color: var(--cream); padding: 48px 0 28px; margin-top: 72px; }
.site-footer a { color: var(--cream); text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer-grid h4 { color: var(--cream); font-size: .95rem; margin-bottom: .6em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.footer-brand img { height: 34px; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(253, 246, 237, .15); margin-top: 32px; padding-top: 18px; font-size: .8rem; opacity: .7; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

/* ---------- customer tab bar (mobile) ---------- */
.tabbar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--cream); border-top: 1px solid var(--sand);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .74rem; padding: 4px; border-radius: var(--radius-sm); }
.tabbar a.active { color: var(--cocoa); font-weight: 800; }
.tabbar a.active svg { stroke-width: 2.2; }
.tabbar svg { width: 24px; height: 24px; }
body.has-tabbar { padding-bottom: 86px; }
@media (min-width: 900px) { .tabbar { display: none; } body.has-tabbar { padding-bottom: 0; } }

/* ---------- surfaces ---------- */
.card { background: #fff8f0; background: color-mix(in srgb, var(--cream) 55%, #fff); border: 1px solid var(--sand); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.panel { background: var(--sand); border-radius: var(--radius-lg); }
.panel-soft { background: var(--sand-soft); border-radius: var(--radius-lg); }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--rose); border-radius: 2px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: var(--pill); font-size: .78rem; font-weight: 700; color: var(--ink); background: var(--sand); white-space: nowrap; }
.badge-sage { background: var(--sage); }
.badge-rose { background: var(--rose); }
.badge-warn { background: var(--warn); }
.badge-error { background: var(--error); color: #fff; }
.badge-outline { background: transparent; border: 1px solid var(--sand); color: var(--muted); }
.badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- heartbeat player ---------- */
.player { display: flex; align-items: center; gap: 14px; }
.play-btn {
  flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--cocoa); color: var(--cream); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(101, 83, 73, .25); transition: transform .15s, background .2s;
}
.play-btn:hover { background: var(--cocoa-press); }
.play-btn:active { transform: scale(.95); }
.play-btn svg { width: 24px; height: 24px; }
.play-btn .i-pause { display: none; }
.player.playing .play-btn .i-play { display: none; }
.player.playing .play-btn .i-pause { display: block; }
.play-btn-xl { width: 96px; height: 96px; }
.play-btn-xl svg { width: 40px; height: 40px; }
.wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 56px; direction: ltr; min-width: 0; }
.wave span { flex: 1; min-width: 2px; border-radius: 3px; background: var(--rose); transition: background .15s; }
.wave span.on { background: var(--cocoa); }
.wave-sm { height: 32px; gap: 2px; }
.wave-lg { height: 96px; gap: 4px; }
.player-time { font-size: .8rem; color: var(--muted); min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.player.playing .heart-beat { animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }

/* ---------- media placeholder ---------- */
.media { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #2b2420; aspect-ratio: 4 / 3; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media .media-play {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  border: 0; background: rgba(253, 246, 237, .92); color: var(--cocoa); display: grid; place-items: center; cursor: pointer;
}
.media .media-play svg { width: 30px; height: 30px; margin-inline-start: 4px; }
.media .media-tag { position: absolute; top: 12px; inset-inline-start: 12px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 700; font-size: .92rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: inherit; color: var(--cocoa);
  background: color-mix(in srgb, var(--cream) 40%, #fff);
  border: 1.5px solid var(--sand); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cocoa); box-shadow: 0 0 0 4px rgba(101, 83, 73, .1); }
.input::placeholder, .textarea::placeholder { color: #a99a8e; }
.input-xl { font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; min-height: 64px; direction: ltr; text-align: right; }
.textarea { min-height: 96px; resize: vertical; }
.field.error .input { border-color: var(--error); }
.field.error .hint { color: var(--error); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--cocoa); }
.counter { font-size: .78rem; color: var(--muted); text-align: left; }

/* chips (choice buttons) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1.5px solid var(--sand); background: transparent; border-radius: var(--pill); padding: 8px 18px; cursor: pointer; font-weight: 600; min-height: 44px; }
.chip[aria-pressed="true"] { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }

/* tabs */
.seg { display: inline-grid; grid-auto-flow: column; background: var(--sand); border-radius: var(--pill); padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: var(--pill); padding: 8px 22px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--cream); color: var(--cocoa); box-shadow: var(--shadow); }

/* ---------- product cards ---------- */
.product-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-card .thumb { background: var(--sand-soft); aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 18px; }
.product-card .thumb img { max-height: 100%; width: auto; }
.product-card .body { padding: 16px 18px 20px; display: grid; gap: 4px; }
.product-card .name { font-weight: 800; font-size: 1.05rem; }
.price { font-weight: 800; }
.price small { font-weight: 500; color: var(--muted); font-size: .8rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--sand-soft); border-radius: var(--radius); padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* ---------- breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .84rem; color: var(--muted); padding: 18px 0 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .6; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(74, 63, 53, .45); display: none; align-items: flex-end; justify-content: center; z-index: 50; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--cream); border-radius: var(--radius-xl); padding: 28px 24px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
@media (min-width: 640px) { .modal-backdrop { align-items: center; } }

/* ---------- skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--sand) 25%, var(--sand-soft) 50%, var(--sand) 75%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- motion helpers ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* partner clinics marquee */
.marquee { overflow: hidden; direction: ltr; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 14px; width: max-content; animation: marquee 42s linear infinite; padding: 6px 0; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.clinic { direction: rtl; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 22px; border: 1px solid var(--sand); border-radius: var(--pill); background: color-mix(in srgb, var(--cream) 50%, #fff); white-space: nowrap; }
.clinic .lg { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--cream); flex: none; }
.clinic .lg svg { width: 24px; height: 24px; }
.clinic b { display: block; font-size: .92rem; line-height: 1.5; }
.clinic small { color: var(--muted); font-size: .76rem; }

/* ---------- the "thread" (logo motif) ---------- */
.thread { position: absolute; pointer-events: none; color: var(--rose); opacity: .55; }

/* ---------- workspace layouts (colleague / admin) ---------- */
.ws { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.ws-side { background: var(--cocoa); color: var(--cream); padding: 18px 14px; display: none; }
.ws-side .brand img { height: 28px; }
.ws-side nav { display: grid; gap: 2px; margin-top: 28px; }
.ws-side nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); text-decoration: none; color: var(--cream); opacity: .78; font-size: .93rem; }
.ws-side nav a:hover { opacity: 1; background: rgba(253, 246, 237, .08); }
.ws-side nav a.active { opacity: 1; background: rgba(253, 246, 237, .14); font-weight: 700; }
.ws-side nav .count { background: var(--rose); color: var(--ink); border-radius: var(--pill); font-size: .72rem; font-weight: 800; padding: 0 8px; }
.ws-side nav a.soon { opacity: .38; cursor: not-allowed; }
.ws-side nav a.soon:hover { background: transparent; }
.ws-side nav a.logout { margin-top: 18px; border-top: 1px solid rgba(253, 246, 237, .15); border-radius: 0; padding-top: 16px; }
.ws-side.open { display: block; position: fixed; inset-block: 0; inset-inline-start: 0; width: 260px; z-index: 40; overflow-y: auto; box-shadow: var(--shadow-lg); }
.ws-main { min-width: 0; }
.ws-top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--sand); background: var(--cream); position: sticky; top: 0; z-index: 10; }
.ws-content { padding: 22px 20px 48px; }
@media (min-width: 1000px) {
  .ws { grid-template-columns: 248px 1fr; }
  .ws-side { display: block; position: sticky; top: 0; height: 100vh; }
  .ws-content { padding: 28px 32px 56px; }
}
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--sand); overflow-x: auto; }
.tabs-line a { padding: 12px 16px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2.5px solid transparent; }
.tabs-line a.active { color: var(--cocoa); border-color: var(--cocoa); font-weight: 800; }

.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1100px) { .stat-grid { grid-template-columns: repeat(5, 1fr); } }
.stat { padding: 18px; border-radius: var(--radius); background: color-mix(in srgb, var(--cream) 50%, #fff); border: 1px solid var(--sand); text-decoration: none; display: grid; gap: 4px; transition: border-color .2s; }
.stat:hover { border-color: var(--cocoa); }
.stat .num { font-size: 2rem; font-weight: 900; line-height: 1.2; }
.stat .lbl { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat.alert { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--cream)); }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: start; font-weight: 700; color: var(--muted); font-size: .8rem; padding: 10px 12px; border-bottom: 1px solid var(--sand); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--sand); vertical-align: middle; }
.table tr:hover td { background: var(--sand-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--sand); border-radius: var(--radius); background: color-mix(in srgb, var(--cream) 50%, #fff); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* player: always inside its frame, smaller buttons */
.player { min-width: 0; }
.wave span { min-width: 0; }
.play-btn-xl { width: 64px; height: 64px; }
.play-btn-xl svg { width: 26px; height: 26px; }
.wave-lg { height: 72px; gap: 3px; }
