/* hoota — هوتة | design system
   Registered trademark identity (docs/BRAND.md): deep teal #0D2B2E · desert gold #C79A5A · cream #F2EDE6 · ink #1A1A1A
   Type: Poppins (Latin) + Tajawal (Arabic). The logo is always an image — never typeset. */

:root {
  --brand-teal: #0D2B2E; --brand-gold: #C79A5A; --brand-cream: #F2EDE6; --brand-ink: #1A1A1A;
  --bg: #F8F5F0;
  --surface: #FFFFFF;
  --surface-2: #F2EDE6;
  --text: #1A1A1A;
  --muted: #5F625F;
  --border: #E6DED2;
  --border-strong: #D3C7B6;
  --primary: #0D2B2E;
  --primary-hover: #16403F;
  --primary-bright: #24585A;
  --primary-soft: #E4EBE9;
  --primary-contrast: #F2EDE6;
  --accent: #8E6A35;
  --gold: #C79A5A;
  --accent-soft: #F5ECDD;
  --success: #2F6B4F; --success-soft: #E3EFE7;
  --warning: #8E6A35; --warning-soft: #F5ECDD;
  --danger: #A23B2A;  --danger-soft: #F8E7E2;
  --shadow: 0 1px 2px rgba(13,43,46,.06);
  --shadow-lg: 0 10px 28px -8px rgba(13,43,46,.22), 0 2px 6px rgba(13,43,46,.06);
  --r-card: 14px; --r-ctl: 10px;
  --font-ar: "Tajawal", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-en: "Poppins", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-zh: "Poppins", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color-scheme: light;
}
html.dark {
  --bg: #081A1C;
  --surface: #0D2B2E;
  --surface-2: #123538;
  --text: #F2EDE6;
  --muted: #B9B2A7;
  --border: #1D4245;
  --border-strong: #2A5558;
  --primary: #C79A5A;
  --primary-hover: #D6AE74;
  --primary-bright: #D6AE74;
  --primary-soft: #2A3A33;
  --primary-contrast: #0D2B2E;
  --accent: #D6AE74;
  --gold: #C79A5A;
  --accent-soft: #33301F;
  --success: #7FBF98; --success-soft: #16352A;
  --warning: #D6AE74; --warning-soft: #33301F;
  --danger: #E58B78;  --danger-soft: #3A211B;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 32px -8px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-ar); font-size: clamp(1rem, .96rem + .2vw, 1.0625rem); line-height: 1.85;
  -webkit-font-smoothing: antialiased; transition: background-color .3s ease, color .3s ease;
  min-height: 100vh; display: flex; flex-direction: column;
}
html:not(:lang(ar)) body { font-family: var(--font-en); line-height: 1.65; }
html:lang(zh) body { font-family: var(--font-zh); }
.num { font-variant-numeric: tabular-nums; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }

p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft); }
[hidden] { display: none !important; }
bdi, .ltr { unicode-bidi: isolate; }
.ltr { direction: ltr; display: inline-block; }

/* ---------- layout */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }
.section { padding-block: 64px; }
@media (min-width: 1024px) { .section { padding-block: 104px; } }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid-act { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
@media (min-width: 768px) { .grid-act { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; } }
.grid-kpi { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 16px; }

/* ---------- type */
.h-hero { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem); font-weight: 700; line-height: 1.2; }
.h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
.h3 { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.4rem); font-weight: 700; }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.bold { font-weight: 700; }
.eyebrow { font-size: .85rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.prose { max-width: 68ch; white-space: pre-line; }
.center { text-align: center; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-ctl); border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  background: var(--surface-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--primary-contrast); box-shadow: 0 6px 16px -8px var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; border-color: var(--border); }
.btn-outline:hover { border-color: var(--muted); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: var(--r-ctl); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 12px; background: transparent; border: 1px solid transparent; display: inline-grid; place-items: center; cursor: pointer; transition: background-color .2s; }
.icon-btn:hover { background: var(--surface-2); }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: .875rem; font-weight: 700; }
.help { font-size: .8rem; color: var(--muted); }
.err-text { font-size: .8rem; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--danger); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B6560' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 38px; }
html[dir="ltr"] .select { background-position: right 12px center; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ---------- surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
@media (min-width: 768px) { .card-pad { padding: 28px; } }
.divider { height: 1px; background: var(--border); border: 0; margin: 20px 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-green { background: var(--success-soft); color: var(--success); }
.b-amber { background: var(--warning-soft); color: var(--warning); }
.b-red { background: var(--danger-soft); color: var(--danger); }
.b-blue { background: var(--primary-soft); color: var(--primary); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: .9rem; font-weight: 500; cursor: pointer;
  transition: all .2s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--muted); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* ---------- header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--border); }
.site-header .bar { height: 68px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 32px; width: auto; display: block; }
.brand .logo-light { display: none; }
html.dark .brand .logo-dark { display: none; }
html.dark .brand .logo-light { display: block; }
.brand-tagline { font-family: "Poppins", sans-serif; font-size: .72rem; letter-spacing: .18em; color: var(--accent); text-transform: none; }
/* brand pattern band (gold motifs on deep teal) */
.brand-band { position: relative; background: var(--brand-teal); color: var(--brand-cream); overflow: hidden; }
.brand-band::before { content: ""; position: absolute; inset: 0; background: url(/assets/img/brand/pattern-gold.png) center / 760px auto repeat; opacity: .12; pointer-events: none; }
.brand-band > * { position: relative; }
.nav { display: none; gap: 4px; margin-inline-start: 24px; }
.nav a { padding: 8px 14px; border-radius: 10px; font-size: .95rem; color: var(--muted); transition: color .2s, background-color .2s; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.lang-btn { font-weight: 700; font-size: .85rem; }
.lang-menu { position: relative; }
.lang-pop { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 170px; padding: 6px; z-index: 50; box-shadow: var(--shadow-lg); display: grid; }
.lang-pop[hidden] { display: none; }
.lang-pop button { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; padding: 10px 12px; border-radius: var(--r-ctl); cursor: pointer; text-align: start; font-size: .95rem; }
.lang-pop button:hover { background: var(--surface-2); }
.lang-pop button.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.hide-mobile { display: none !important; }
@media (min-width: 900px) { .nav { display: flex; } .hide-mobile { display: inline-flex !important; } .show-mobile { display: none !important; } }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 92vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .3s ease; display: flex; flex-direction: column; }
html[dir="ltr"] .drawer { transform: translateX(105%); }
.drawer.start { inset-inline-end: auto; inset-inline-start: 0; transform: translateX(105%); }
html[dir="ltr"] .drawer.start { transform: translateX(-105%); }
.drawer.open { transform: none !important; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--border); }
.mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 12px; font-weight: 500; }
.mobile-nav a:hover { background: var(--surface-2); }

.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal { background: var(--surface); border-radius: 20px; width: min(760px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateY(12px); transition: transform .25s ease; }
.modal-backdrop.open .modal { transform: none; }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- hero */
.hero { position: relative; overflow: hidden; padding-block: 72px 56px; }
@media (min-width: 1024px) { .hero { padding-block: 120px 96px; } }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 640px; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; inset-inline-start: -160px; top: 120px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.search-panel { margin-top: 36px; padding: 10px; display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .search-panel { grid-template-columns: 1.3fr 1fr 1fr auto; align-items: center; } }
.search-panel .input, .search-panel .select { border-color: transparent; background: var(--surface-2); }
.stat-strip { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.stat-strip b { display: block; font-size: 1.6rem; }

/* ---------- program card */
.p-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s; }
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.p-media { position: relative; aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.p-card:hover .p-media img { transform: scale(1.03); }
.p-media .badge { position: absolute; top: 12px; inset-inline-start: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text); backdrop-filter: blur(6px); }
.p-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .84rem; color: var(--muted); }
.p-meta span { display: inline-flex; align-items: center; gap: 5px; }
.p-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.price b { font-size: 1.2rem; }
.placeholder-art { width: 100%; height: 100%; display: grid; place-items: center; color: var(--primary); background:
  radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 60%),
  radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%), var(--surface-2); }

/* ---------- activity tiles */
.tile { display: flex; flex-direction: column; gap: 12px; padding: 16px; transition: transform .2s ease-out, border-color .2s; }
.tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.tile-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }

/* ---------- misc */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .tile-icon { margin: 0 auto 14px; }
.toast-wrap { position: fixed; bottom: 20px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 90; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: .92rem; box-shadow: var(--shadow-lg); animation: toastIn .25s ease; pointer-events: auto; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.alert { padding: 14px 16px; border-radius: 12px; font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: var(--primary-soft); color: var(--primary); }
.alert-warn { background: var(--warning-soft); color: var(--warning); }
.alert-ok { background: var(--success-soft); color: var(--success); }
.alert-err { background: var(--danger-soft); color: var(--danger); }
.steps { display: flex; gap: 8px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.steps i.on { background: var(--primary); }
.counter { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; }
.counter button { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; }
.counter span { min-width: 32px; text-align: center; font-weight: 700; }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list-check li { display: flex; gap: 10px; align-items: flex-start; }
.list-check li svg { flex: none; margin-top: 5px; color: var(--success); }
.list-x li svg { color: var(--danger); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 28px; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 9.5px; top: 22px; bottom: -6px; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.gallery { display: grid; gap: 8px; grid-template-columns: 1fr; border-radius: 20px; overflow: hidden; }
.gallery .main { aspect-ratio: 16/9; background: var(--surface-2); }
@media (min-width: 900px) { .gallery.multi { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 21/9; } .gallery.multi .main { grid-row: span 2; aspect-ratio: auto; } }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.thumb-sm { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.sticky-side { position: sticky; top: 92px; }
.detail-layout { display: grid; gap: 32px; }
@media (min-width: 1000px) { .detail-layout { grid-template-columns: 1fr 380px; align-items: start; } }
.browse-layout { display: grid; gap: 28px; }
@media (min-width: 900px) { .browse-layout { grid-template-columns: 270px 1fr; align-items: start; } }
.filters-side { display: none; }
@media (min-width: 900px) { .filters-side { display: block; position: sticky; top: 92px; } }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination button { min-width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.pagination button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.date-strip button { flex: none; width: 62px; padding: 8px 0; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: center; line-height: 1.3; }
.date-strip button small { display: block; font-size: .7rem; color: var(--muted); }
.date-strip button b { font-size: 1.05rem; }
.date-strip button.active { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }
.date-strip button.active small { color: inherit; opacity: .85; }

/* ---------- footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 48px 32px; margin-top: 40px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-size: .9rem; margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--muted); font-size: .92rem; padding-block: 4px; }
.footer-grid a:hover { color: var(--text); }

/* ---------- dashboard */
.dash { display: grid; min-height: calc(100vh - 69px); }
@media (min-width: 1000px) { .dash { grid-template-columns: 260px 1fr; } }
.dash-side { border-inline-end: 1px solid var(--border); padding: 20px 12px; background: var(--surface); display: none; }
@media (min-width: 1000px) { .dash-side { display: block; position: sticky; top: 69px; height: calc(100vh - 69px); overflow-y: auto; } }
.dash-side a, .side-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: .95rem; margin-bottom: 2px; transition: background-color .2s, color .2s; }
.dash-side a:hover, .side-link:hover { background: var(--surface-2); color: var(--text); }
.dash-side a.active, .side-link.active { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); }
.dash-side .count { margin-inline-start: auto; font-size: .75rem; background: var(--accent-soft); color: var(--accent); padding: 0 8px; border-radius: 999px; }
.dash-main { padding: 24px 16px 64px; min-width: 0; }
@media (min-width: 768px) { .dash-main { padding: 32px 36px 80px; } }
.dash-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); scrollbar-width: none; }
@media (min-width: 1000px) { .dash-tabs { display: none; } }
.dash-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: .88rem; color: var(--muted); border: 1px solid var(--border); }
.dash-tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.kpi { padding: 18px 20px; border-top: 3px solid var(--gold); }
.kpi .k svg { color: var(--gold); }
.kpi .v { font-size: 1.7rem; font-weight: 700; margin-top: 4px; }
.kpi .k { color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: start; font-weight: 700; color: var(--muted); font-size: .8rem; padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
@media (max-width: 699px) {
  .table.stack-mobile thead { display: none; }
  .table.stack-mobile, .table.stack-mobile tbody, .table.stack-mobile tr, .table.stack-mobile td { display: block; width: 100%; }
  .table.stack-mobile tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table.stack-mobile tr:last-child { border-bottom: 0; }
  .table.stack-mobile td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: end; }
  .table.stack-mobile td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; text-align: start; }
  .table.stack-mobile td.actions-cell { padding-top: 8px; }
  .table.stack-mobile td.actions-cell > .row { width: 100%; justify-content: flex-start !important; }
}
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.img-grid .it { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.img-grid .it img { width: 100%; height: 100%; object-fit: cover; }
.img-grid .it .acts { position: absolute; inset: auto 6px 6px; display: flex; gap: 4px; justify-content: space-between; }
.img-grid .it .acts button { border: 0; border-radius: 8px; padding: 4px 8px; font-size: .72rem; cursor: pointer; background: rgba(0,0,0,.6); color: #fff; }
.img-grid .it.cover { outline: 2px solid var(--primary); outline-offset: -2px; }
.dropzone { border: 1.5px dashed var(--border); border-radius: 14px; padding: 24px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .2s, background-color .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.plan-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.plan-card .amount { font-size: 2.2rem; font-weight: 700; }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.auth-wrap { min-height: calc(100vh - 69px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(520px, 100%); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--surface-2); border-radius: 14px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- motion */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.rtl-flip { transition: transform .2s; }
html[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
