/* ==========================================================================
   Codexa — Design system (RTL-first, logical properties, light & dark)
   ========================================================================== */

:root {
  --font-body: 'IBM Plex Sans Arabic', 'Readex Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --bg: #f5f6fb;
  --bg-alt: #eceef7;
  --surface: #ffffff;
  --surface-2: #f5f6fb;
  --surface-3: #eceef7;
  --border: #e1e4ef;
  --border-strong: #cdd2e2;
  --text: #0e1124;
  --text-2: #464c68;
  --muted: #7a809c;

  --primary: #5b4cf0;
  --primary-hover: #4b3be0;
  --primary-2: #8b5cf6;
  --accent: #06b6d4;
  --primary-soft: rgba(91, 76, 240, .10);
  --accent-soft: rgba(6, 182, 212, .12);
  --grad: linear-gradient(135deg, #6d5dfc 0%, #8b5cf6 48%, #06b6d4 100%);
  --grad-text: linear-gradient(120deg, #6d5dfc 0%, #a855f7 45%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(109, 93, 252, .12), rgba(6, 182, 212, .10));

  --success: #16a34a; --success-soft: rgba(22, 163, 74, .12);
  --warning: #d97706; --warning-soft: rgba(217, 119, 6, .13);
  --danger: #dc2626;  --danger-soft: rgba(220, 38, 38, .10);
  --info: #2563eb;    --info-soft: rgba(37, 99, 235, .10);
  --purple: #9333ea;  --purple-soft: rgba(147, 51, 234, .10);
  --wa: #25d366;

  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow: 0 14px 34px -14px rgba(33, 30, 90, .20);
  --shadow-lg: 0 34px 70px -24px rgba(33, 30, 90, .32);
  --ring: 0 0 0 4px rgba(91, 76, 240, .18);

  --header-h: 74px;
  --container: 1220px;
  --sidebar-w: 272px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #070913;
  --bg-alt: #0b0e1d;
  --surface: #0f1326;
  --surface-2: #141a31;
  --surface-3: #1a2140;
  --border: #1f2744;
  --border-strong: #2d375c;
  --text: #eef0fd;
  --text-2: #b4b9d8;
  --muted: #7d84aa;

  --primary: #7b6dff;
  --primary-hover: #8f83ff;
  --primary-soft: rgba(123, 109, 255, .15);
  --accent-soft: rgba(34, 211, 238, .12);
  --grad-soft: linear-gradient(135deg, rgba(123, 109, 255, .16), rgba(6, 182, 212, .12));

  --success: #22c55e; --success-soft: rgba(34, 197, 94, .14);
  --warning: #f59e0b; --warning-soft: rgba(245, 158, 11, .14);
  --danger: #f87171;  --danger-soft: rgba(248, 113, 113, .13);
  --info: #60a5fa;    --info-soft: rgba(96, 165, 250, .13);
  --purple: #c084fc;  --purple-soft: rgba(192, 132, 252, .13);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 16px 36px -16px rgba(0, 0, 0, .6);
  --shadow-lg: 0 34px 70px -24px rgba(0, 0, 0, .75);
  --ring: 0 0 0 4px rgba(123, 109, 255, .25);
  color-scheme: dark;
}

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.65; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--text); line-height: 1.35; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -.025em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(123, 109, 255, .3); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 1000; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.text-gradient { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-muted { color: var(--muted) !important; }
.text-2 { color: var(--text-2); }
.text-center { text-align: center; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.fw-600 { font-weight: 600; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.d-block { display: block; }
@media (min-width: 641px) { .hide-desktop { display: none !important; } }
.grow { flex: 1 1 auto; min-width: 0; }
.hp-field { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- Buttons ---------------- */
.btn {
  --btn-bg: var(--surface-2); --btn-color: var(--text); --btn-border: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.35rem; border-radius: 13px; border: 1px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-color); font-weight: 600; font-size: .95rem; line-height: 1.2;
  transition: transform .18s ease, box-shadow .2s ease, background .2s, border-color .2s, color .2s;
  white-space: nowrap; text-decoration: none; position: relative; isolation: isolate;
}
.btn i { font-size: 1.15em; line-height: 1; }
.btn:hover { transform: translateY(-2px); color: var(--btn-color); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--grad); --btn-color: #fff; --btn-border: transparent; background-size: 160% 160%; box-shadow: 0 10px 24px -10px rgba(91, 76, 240, .7); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 14px 30px -10px rgba(91, 76, 240, .8); color: #fff; }
.btn-outline { --btn-bg: transparent; --btn-border: var(--border-strong); }
.btn-outline:hover { --btn-border: var(--primary); --btn-color: var(--primary); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); }
.btn-soft { --btn-bg: var(--primary-soft); --btn-color: var(--primary); --btn-border: transparent; }
.btn-light { --btn-bg: #fff; --btn-color: #1b1740; --btn-border: transparent; }
.btn-light:hover { color: #1b1740; }
.btn-glass { --btn-bg: rgba(255, 255, 255, .12); --btn-color: #fff; --btn-border: rgba(255, 255, 255, .25); backdrop-filter: blur(8px); }
.btn-glass:hover { color: #fff; --btn-bg: rgba(255, 255, 255, .2); }
.btn-whatsapp { --btn-bg: var(--wa); --btn-color: #fff; --btn-border: transparent; box-shadow: 0 10px 24px -12px rgba(37, 211, 102, .8); }
.btn-whatsapp:hover { color: #fff; }
.btn-danger { --btn-bg: var(--danger-soft); --btn-color: var(--danger); --btn-border: transparent; }
.btn-success { --btn-bg: var(--success); --btn-color: #fff; --btn-border: transparent; }
.btn-sm { padding: .55rem .95rem; font-size: .86rem; border-radius: 11px; }
.btn-xs { padding: .35rem .65rem; font-size: .78rem; border-radius: 9px; gap: .3rem; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; border-radius: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 40px; height: 40px; }
.btn-icon.btn-sm { width: 34px; height: 34px; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: .9rem;
  transition: .2s; position: relative;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn i { font-size: 1.2rem; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
.dot-count { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }

/* ---------------- Badges, tags, chips ---------------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.6; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.no-dot::before { display: none; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.tag { display: inline-block; padding: .18rem .6rem; border-radius: 8px; font-size: .76rem; background: var(--surface-3); color: var(--text-2); font-weight: 500; direction: ltr; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.1rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .9rem; transition: .2s; }
.chip:hover { color: var(--primary); border-color: var(--primary); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(91, 76, 240, .8); }
.chip .count { font-size: .75rem; opacity: .8; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; position: relative; }
.card-hover { transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; }
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.icon-box {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--grad-soft); color: var(--primary); position: relative; flex-shrink: 0;
}
.icon-box::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.icon-box.sm { width: 44px; height: 44px; border-radius: 13px; font-size: 1.3rem; }
.icon-box.solid { background: var(--grad); color: #fff; }
.icon-box.solid::after { display: none; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100; height: var(--header-h);
  transition: background .3s, border-color .3s, box-shadow .3s; border-bottom: 1px solid transparent;
}
.site-header.scrolled, body:not(.is-home) .site-header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; gap: 1.5rem; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; filter: drop-shadow(0 6px 14px rgba(91, 76, 240, .35)); }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; line-height: 1; }
.brand-name small { display: block; font-size: .62rem; font-weight: 500; color: var(--muted); letter-spacing: .12em; margin-top: 4px; text-transform: uppercase; }
.brand-logo { max-height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: .3rem; margin-inline-start: auto; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: .95rem; padding: .5rem .8rem; border-radius: 10px; position: relative; transition: .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after { content: ''; position: absolute; inset-inline: .8rem; bottom: .15rem; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-actions { display: flex; align-items: center; gap: .55rem; }
.menu-toggle { display: none; }
.mobile-nav {
  position: fixed; top: var(--header-h); inset-inline: 0; bottom: 0; background: var(--bg); z-index: 99;
  padding: 1.5rem 20px 2rem; overflow-y: auto; overscroll-behavior: contain; display: none; border-top: 1px solid var(--border);
}
@media (min-width: 1101px) { .mobile-nav { display: none !important; } }
.mobile-nav a.m-link { display: flex; align-items: center; justify-content: space-between; padding: 1rem .5rem; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 1.05rem; }
.mobile-nav a.m-link.active { color: var(--primary); }
.mobile-nav .m-actions { display: grid; gap: .7rem; margin-top: 1.5rem; }
body.nav-open { overflow: hidden; }
body.nav-open .mobile-nav { display: block; animation: fadeIn .25s ease; }
body.nav-open .site-header { background: var(--bg); border-bottom-color: var(--border); }

@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-actions { margin-inline-start: auto; }
  .menu-toggle { display: inline-grid; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .brand-name { font-size: 1.2rem; }
  .brand-name small { display: none; }
}
@media (max-width: 420px) { .hide-xs { display: none !important; } }

/* ---------------- Sections ---------------- */
main { display: block; }
.section { padding-block: 96px; position: relative; }
.section-sm { padding-block: 64px; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto 3.2rem; text-align: center; }
.section-head.start { margin-inline: 0; text-align: start; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: .35rem .95rem; border-radius: 99px; margin-bottom: 1rem; letter-spacing: .01em;
}
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.section-title { font-size: clamp(1.75rem, 3.6vw, 2.6rem); margin-bottom: .8rem; }
.section-sub { color: var(--text-2); font-size: 1.08rem; margin: 0; }
.section-foot { text-align: center; margin-top: 3rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding-block: 72px; } }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding-top: calc(var(--header-h) + 72px); padding-bottom: 90px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: blob 18s ease-in-out infinite alternate; }
.hero-bg .b1 { width: 520px; height: 520px; background: #6d5dfc; top: -160px; inset-inline-end: -120px; }
.hero-bg .b2 { width: 420px; height: 420px; background: #06b6d4; bottom: -180px; inset-inline-start: -120px; animation-delay: -6s; opacity: .35; }
.hero-bg .b3 { width: 300px; height: 300px; background: #c026d3; top: 30%; inset-inline-start: 38%; animation-delay: -12s; opacity: .18; }
[data-theme="light"] .hero-bg .blob { opacity: .28; }
[data-theme="light"] .hero-bg .b3 { opacity: .1; }
.grid-pattern {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .45;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 3.5rem; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1rem .45rem .8rem; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border); font-size: .88rem; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow-sm);
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--success); position: relative; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success); animation: pulse 2s infinite; }
.hero-title { font-size: clamp(2.2rem, 5.2vw, 3.9rem); line-height: 1.25; margin: 1.3rem 0 1.2rem; font-weight: 700; }
html[lang="en"] .hero-title { line-height: 1.1; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--text-2); max-width: 620px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2rem; list-style: none; color: var(--text-2); font-size: .92rem; font-weight: 500; }
.hero-points li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-points i { color: var(--success); font-size: 1.15rem; }
.hero-visual { position: relative; }
.code-window {
  background: #0c1024; border: 1px solid #252d52; border-radius: 20px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  overflow: hidden; direction: ltr; text-align: left; transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform .6s;
}
[dir="ltr"] .code-window { transform: perspective(1400px) rotateY(6deg) rotateX(3deg); }
.hero-visual:hover .code-window { transform: perspective(1400px) rotateY(0) rotateX(0); }
.code-bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid #1c2344; background: #0a0d1e; }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }
.code-bar em { margin-inline-start: auto; font-style: normal; color: #6b7399; font-size: .78rem; font-family: var(--font-mono); }
.code-body { padding: 22px 22px 26px; font-family: var(--font-mono); font-size: .88rem; line-height: 1.9; color: #c9d1f5; margin: 0; white-space: pre; overflow-x: auto; }
.code-body .ln { display: block; opacity: 0; transform: translateY(6px); animation: codeIn .5s ease forwards; }
.code-body .ln:nth-child(1) { animation-delay: .2s; } .code-body .ln:nth-child(2) { animation-delay: .45s; }
.code-body .ln:nth-child(3) { animation-delay: .7s; } .code-body .ln:nth-child(4) { animation-delay: .95s; }
.code-body .ln:nth-child(5) { animation-delay: 1.2s; } .code-body .ln:nth-child(6) { animation-delay: 1.45s; }
.code-body .ln:nth-child(7) { animation-delay: 1.7s; } .code-body .ln:nth-child(8) { animation-delay: 1.95s; }
.code-body .ln:nth-child(9) { animation-delay: 2.2s; } .code-body .ln:nth-child(10) { animation-delay: 2.45s; }
.tk-k { color: #c792ea; } .tk-v { color: #82aaff; } .tk-s { color: #c3e88d; } .tk-p { color: #f78c6c; } .tk-c { color: #5c6590; font-style: italic; } .tk-f { color: #ffcb6b; }
.cursor { display: inline-block; width: 8px; height: 1.1em; background: #7b6dff; vertical-align: -3px; animation: blink 1s step-end infinite; }
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: .55rem; padding: .6rem .95rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 600; font-size: .86rem; color: var(--text);
  animation: floaty 6s ease-in-out infinite; white-space: nowrap; z-index: 2;
}
.float-chip i { font-size: 1.2rem; }
/* The code window is always LTR, so chips sit on its (physically) empty right side. */
.float-chip.c1 { top: -22px; right: 14%; } .float-chip.c1 i { color: #22c55e; }
.float-chip.c2 { top: 26%; right: -34px; animation-delay: -2s; } .float-chip.c2 i { color: var(--primary); }
.float-chip.c3 { bottom: -20px; left: 14%; animation-delay: -4s; } .float-chip.c3 i { color: var(--accent); }
.float-chip.c4 { top: 58%; right: -42px; animation-delay: -3s; } .float-chip.c4 i { color: #f59e0b; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .hero { padding-top: calc(var(--header-h) + 48px); }
  .hero-visual { max-width: 560px; margin-inline: auto; width: 100%; }
}
@media (max-width: 560px) {
  .float-chip.c2, .float-chip.c4 { display: none; }
  .float-chip.c1 { right: 8px; }
  .code-body { font-size: .76rem; padding: 18px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------------- Tech marquee ---------------- */
.marquee { overflow: hidden; padding: 1.4rem 0; border-block: 1px solid var(--border); background: var(--surface); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-title { text-align: center; font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: .9rem; letter-spacing: .04em; }
.marquee-track { display: flex; gap: 1rem; width: max-content; animation: marquee 38s linear infinite; direction: ltr; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.tech-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; color: var(--text-2); white-space: nowrap; font-family: var(--font-head); }
.tech-chip i { font-size: 1.15rem; color: var(--primary); }

/* ---------------- Service cards ---------------- */
.service-card { display: flex; flex-direction: column; gap: 1rem; height: 100%; color: var(--text); overflow: hidden; }
.service-card:hover { color: var(--text); }
.service-card::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .3s; border-radius: inherit; z-index: 0; }
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; z-index: 1; }
.service-card h3 { font-size: 1.15rem; margin: 0; }
.service-card p { color: var(--text-2); font-size: .95rem; margin: 0; flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .92rem; color: var(--primary); }
.card-link i { transition: transform .25s; }
.card-hover:hover .card-link i { transform: translateX(4px); }
[dir="rtl"] .card-hover:hover .card-link i.flip { transform: scaleX(-1) translateX(4px); }

/* ---------------- Stats ---------------- */
.stats-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; }
.stat { text-align: center; padding: 1.8rem 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat-num { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; display: inline-block; }
.stat-label { color: var(--text-2); font-weight: 500; margin-top: .4rem; }

/* ---------------- Features ---------------- */
.feature { display: flex; gap: 1.1rem; align-items: flex-start; }
.feature h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.feature p { color: var(--text-2); font-size: .95rem; margin: 0; }

/* ---------------- Graduation band ---------------- */
.grad-band {
  position: relative; border-radius: 32px; padding: clamp(2rem, 5vw, 4rem); overflow: hidden; isolation: isolate; color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(139, 92, 246, .55), transparent 45%), radial-gradient(circle at 90% 90%, rgba(6, 182, 212, .45), transparent 45%), #140f3a;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
}
.grad-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, #000, transparent); -webkit-mask-image: linear-gradient(180deg, #000, transparent); }
.grad-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.grad-band p { color: rgba(255, 255, 255, .8); font-size: 1.05rem; }
.grad-band .eyebrow { background: rgba(255, 255, 255, .12); color: #fff; }
.check-list { list-style: none; display: grid; gap: .85rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; font-weight: 500; }
.check-list li i { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .95rem; background: var(--success-soft); color: var(--success); margin-top: 2px; }
.grad-band .check-list li i { background: rgba(255, 255, 255, .14); color: #7ef0c2; }
.grad-panel { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; padding: 1.8rem; backdrop-filter: blur(8px); }
.grad-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
@media (max-width: 900px) { .grad-band { grid-template-columns: 1fr; } }

/* ---------------- Portfolio ---------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.5rem; }
.pf-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; height: 100%; color: var(--text); }
.pf-card:hover { color: var(--text); }
.pf-media { aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: var(--grad-soft); }
.pf-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.pf-card:hover .pf-media img { transform: scale(1.06); }
.pf-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(139, 92, 246, .45), transparent 55%), radial-gradient(circle at 80% 90%, rgba(6, 182, 212, .4), transparent 50%), #17123f; }
.pf-placeholder i { font-size: 3.6rem; color: rgba(255, 255, 255, .85); }
.pf-placeholder::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 28px 28px; }
.pf-cat { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; background: rgba(10, 12, 30, .6); color: #fff; backdrop-filter: blur(8px); }
.pf-cat::before { display: none; }
.pf-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.pf-body h3 { font-size: 1.12rem; margin: 0; }
.pf-body p { color: var(--text-2); font-size: .93rem; margin: 0; flex: 1; }
.pf-item.is-hidden { display: none; }

/* ---------------- Process ---------------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; position: relative; }
.process::before { content: ''; position: absolute; top: 34px; inset-inline: 12%; height: 2px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }
.step { text-align: center; position: relative; }
.step-num { width: 68px; height: 68px; margin: 0 auto 1.2rem; border-radius: 22px; display: grid; place-items: center; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -12px rgba(91, 76, 240, .75); position: relative; }
.step h3 { font-size: 1.08rem; }
.step p { color: var(--text-2); font-size: .93rem; margin: 0; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; } .process::before { display: none; } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } }

/* ---------------- Slider & testimonials ---------------- */
.slider { position: relative; }
.slider-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3rem) / 3); gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .5rem .2rem 1.2rem; scroll-behavior: smooth; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * { scroll-snap-align: start; }
.slider-nav { display: flex; gap: .6rem; justify-content: center; margin-top: 1.5rem; }
@media (max-width: 980px) { .slider-track { grid-auto-columns: calc((100% - 1.5rem) / 2); } }
@media (max-width: 640px) { .slider-track { grid-auto-columns: 88%; } }
.testimonial { display: flex; flex-direction: column; gap: 1rem; height: 100%; }
.testimonial .quote-icon { font-size: 2.2rem; line-height: 1; color: var(--primary); opacity: .35; }
.testimonial p { color: var(--text-2); flex: 1; margin: 0; }
.stars { color: #f5b301; display: inline-flex; gap: 2px; }
.person { display: flex; align-items: center; gap: .8rem; }
.person strong { display: block; font-size: .98rem; }
.person small { color: var(--muted); }
.avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); flex-shrink: 0; overflow: hidden; font-size: .95rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; border-radius: 11px; font-size: .8rem; }
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 1.3rem; }

/* ---------------- Pricing ---------------- */
.price-card { display: flex; flex-direction: column; gap: 1.1rem; height: 100%; }
.price-card.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; box-shadow: var(--shadow); }
.price-card .popular { position: absolute; top: -13px; inset-inline-end: 22px; background: var(--grad); color: #fff; font-size: .76rem; font-weight: 700; padding: .3rem .85rem; border-radius: 99px; box-shadow: 0 8px 18px -8px rgba(91, 76, 240, .8); }
.price-card h3 { font-size: 1.2rem; margin: 0; }
.price-card .desc { color: var(--text-2); font-size: .93rem; margin: 0; }
.price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.price .note { color: var(--muted); font-size: .88rem; font-weight: 500; width: 100%; }
.price .amount { font-family: var(--font-head); font-size: 2.3rem; font-weight: 700; line-height: 1.1; }
.price .cur { color: var(--text-2); font-weight: 600; }
.price .custom { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; }
.price-card ul { list-style: none; display: grid; gap: .6rem; flex: 1; padding-top: 1rem; border-top: 1px dashed var(--border); }
.price-card li { display: flex; gap: .55rem; font-size: .93rem; color: var(--text-2); }
.price-card li i { color: var(--success); font-size: 1.1rem; margin-top: 2px; }
.pricing-group + .pricing-group { margin-top: 3.5rem; }
.pricing-group-title { display: flex; align-items: center; gap: .7rem; font-size: 1.35rem; margin-bottom: 1.6rem; }

/* ---------------- Blog ---------------- */
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; height: 100%; color: var(--text); }
.post-card:hover { color: var(--text); }
.post-cover { aspect-ratio: 16 / 9; background: var(--grad-soft); overflow: hidden; position: relative; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .84rem; }
.post-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.post-body h3 { font-size: 1.12rem; margin: 0; line-height: 1.5; }
.post-body p { color: var(--text-2); font-size: .93rem; margin: 0; flex: 1; }

/* ---------------- FAQ ---------------- */
.faq-list { display: grid; gap: .9rem; max-width: 860px; margin-inline: auto; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.15rem 1.4rem; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-family: var(--font-head); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { transition: transform .3s; color: var(--primary); font-size: 1.3rem; flex-shrink: 0; }
.faq-item[open] summary i { transform: rotate(180deg); }
.faq-item .faq-a { padding: 0 1.4rem 1.3rem; color: var(--text-2); }

/* ---------------- CTA ---------------- */
.cta-band { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(2.2rem, 5vw, 4rem); text-align: center; color: #fff; background: var(--grad); isolation: isolate; }
.cta-band::before { content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: rgba(255, 255, 255, .14); top: -240px; inset-inline-end: -120px; z-index: -1; }
.cta-band::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, .09); bottom: -200px; inset-inline-start: -100px; z-index: -1; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.cta-band p { color: rgba(255, 255, 255, .88); max-width: 640px; margin: 0 auto 2rem; font-size: 1.08rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero { position: relative; padding: calc(var(--header-h) + 64px) 0 64px; overflow: hidden; isolation: isolate; text-align: center; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.page-hero .hero-bg .blob { opacity: .28; }
[data-theme="light"] .page-hero .hero-bg .blob { opacity: .16; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: .8rem; }
.page-hero p { color: var(--text-2); max-width: 680px; margin: 0 auto; font-size: 1.08rem; }
.breadcrumb { display: inline-flex; align-items: center; gap: .5rem; font-size: .87rem; color: var(--muted); margin-bottom: 1rem; flex-wrap: wrap; justify-content: center; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: .9rem; }

/* ---------------- Prose (rich text) ---------------- */
.prose { color: var(--text-2); font-size: 1.05rem; line-height: 1.95; }
html[lang="en"] .prose { line-height: 1.8; }
.prose > *:first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin: 1.8em 0 .6em; }
.prose h2 { font-size: 1.6rem; } .prose h3 { font-size: 1.3rem; } .prose h4 { font-size: 1.1rem; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose img { border-radius: 16px; margin: 1.5em 0; }
.prose blockquote { margin: 1.5em 0; padding: 1rem 1.4rem; border-inline-start: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 12px 12px 0; }
[dir="rtl"] .prose blockquote { border-radius: 12px 0 0 12px; }
.prose pre { direction: ltr; text-align: left; background: #0c1024; color: #c9d1f5; padding: 1.1rem 1.3rem; border-radius: 14px; overflow-x: auto; font-size: .9rem; }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-3); padding: .1em .4em; border-radius: 6px; }
.prose pre code { background: none; padding: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-left { text-align: left; }
.prose .ql-direction-rtl { direction: rtl; }

/* ---------------- Detail layouts ---------------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.5rem; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 1.2rem; }
.contact-grid { grid-template-columns: 380px minmax(0, 1fr); }
@media (max-width: 980px) { .detail-grid, .contact-grid { grid-template-columns: 1fr; } .sticky-side { position: static; } }
.info-list { list-style: none; display: grid; gap: .9rem; }
.info-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .94rem; padding-bottom: .9rem; border-bottom: 1px dashed var(--border); }
.info-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.info-list span { color: var(--muted); }
.info-list strong { text-align: end; }
.cover-img { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-bottom: 2rem; background: var(--surface-2); }
.cover-img img { width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery a { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; display: block; border: 1px solid var(--border); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.05); }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 6, 15, .92); display: grid; place-items: center; padding: 2rem; animation: fadeIn .2s; cursor: zoom-out; }
.lightbox img { max-height: 90vh; max-width: 92vw; border-radius: 12px; box-shadow: var(--shadow-lg); }

/* ---------------- Contact ---------------- */
.contact-cards { display: grid; gap: 1rem; }
.contact-card { display: flex; gap: 1rem; align-items: center; color: var(--text); padding: 1.2rem 1.3rem; }
.contact-card:hover { color: var(--text); }
.contact-card small { color: var(--muted); display: block; font-size: .82rem; }
.contact-card strong { font-size: 1rem; word-break: break-word; }
.contact-card .icon-box.wa { background: rgba(37, 211, 102, .14); color: var(--wa); }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 680px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.form-label { font-weight: 600; font-size: .9rem; color: var(--text); display: flex; align-items: center; gap: .35rem; }
.form-label .req { color: var(--danger); }
.form-label .opt { color: var(--muted); font-weight: 400; font-size: .8rem; }
.form-control {
  width: 100%; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); transition: border-color .2s, box-shadow .2s; font-size: .95rem; line-height: 1.5; min-height: 48px;
}
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18'%3E%3Cpath fill='%237a809c' d='M12 15l-5-5h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left .8rem center; padding-inline-end: 2.4rem; }
[dir="ltr"] select.form-control { background-position: right .8rem center; }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.form-control[dir="ltr"], .form-control.ltr { text-align: left; }
[dir="rtl"] input[type="email"].form-control, [dir="rtl"] input[type="tel"].form-control, [dir="rtl"] input[type="url"].form-control { direction: ltr; text-align: right; }
.form-help { color: var(--muted); font-size: .82rem; }
.form-error { color: var(--danger); font-size: .83rem; font-weight: 500; display: flex; gap: .3rem; align-items: center; }
.form-error::before { content: '!'; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .7rem; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.form-section { padding-bottom: 1.6rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; }
.form-section-title { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; margin-bottom: 1.2rem; }
.form-section-title i { color: var(--primary); }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.5rem; }
.form-check { display: flex; gap: .65rem; align-items: flex-start; font-size: .93rem; cursor: pointer; color: var(--text-2); }
.form-check input { width: 19px; height: 19px; margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.input-wrap { position: relative; }
.input-wrap > i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 1rem; color: var(--muted); font-size: 1.15rem; pointer-events: none; }
.input-wrap .form-control { padding-inline-start: 2.8rem; }
.input-wrap .pw-toggle { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: .5rem; border: 0; background: none; color: var(--muted); width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; }
.input-wrap .pw-toggle:hover { color: var(--primary); }
.switch { display: inline-flex; align-items: center; gap: .75rem; cursor: pointer; font-weight: 500; font-size: .93rem; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 46px; height: 26px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .25s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: inset-inline-start .25s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { inset-inline-start: 23px; }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.file-drop { position: relative; border: 2px dashed var(--border-strong); border-radius: 16px; padding: 1.5rem; text-align: center; background: var(--surface-2); transition: .2s; cursor: pointer; }
.file-drop:hover, .file-drop.dragover { border-color: var(--primary); background: var(--primary-soft); }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop .fd-icon { font-size: 2rem; color: var(--primary); line-height: 1; }
.file-drop .fd-text { font-weight: 600; margin-top: .4rem; font-size: .93rem; }
.file-drop .fd-help { color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.file-drop .fd-list { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: .8rem; }
.file-drop .fd-list span { background: var(--surface); border: 1px solid var(--border); padding: .2rem .6rem; border-radius: 8px; font-size: .78rem; direction: ltr; }
.file-drop.compact { padding: .8rem 1rem; display: flex; align-items: center; gap: .8rem; text-align: start; }
.file-drop.compact .fd-icon { font-size: 1.4rem; }
.file-drop.compact .fd-text { margin: 0; font-size: .86rem; }
.file-drop.compact .fd-list { margin: 0; justify-content: flex-start; }
.range-row { display: flex; align-items: center; gap: 1rem; }
.range-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.range-row output { min-width: 52px; text-align: center; font-weight: 700; font-family: var(--font-head); background: var(--primary-soft); color: var(--primary); border-radius: 9px; padding: .25rem .4rem; }

/* ---------------- Alerts & toasts ---------------- */
.alert { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: 14px; border: 1px solid transparent; font-size: .94rem; margin-bottom: 1.2rem; }
.alert i { font-size: 1.25rem; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error, .alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert .alert-body { flex: 1; min-width: 0; word-break: break-word; }
.alert .alert-body p { margin: 0; color: var(--text-2); }
.toast-stack { position: fixed; top: calc(var(--header-h) + 14px); inset-inline-end: 18px; z-index: 300; display: grid; gap: .7rem; width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2); font-size: .93rem; }
.toast i.t-icon { font-size: 1.35rem; flex-shrink: 0; }
.toast.success i.t-icon { color: var(--success); } .toast.error i.t-icon { color: var(--danger); } .toast.warning i.t-icon { color: var(--warning); } .toast.info i.t-icon { color: var(--info); }
.toast .t-body { flex: 1; min-width: 0; word-break: break-word; }
.toast .t-close { border: 0; background: none; color: var(--muted); padding: 0; font-size: 1.1rem; }
.toast.hide { animation: toastOut .3s ease forwards; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 72px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand p { color: var(--text-2); font-size: .94rem; margin: 1.1rem 0 1.4rem; max-width: 340px; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1.1rem; }
.footer-links { list-style: none; display: grid; gap: .65rem; }
.footer-links a { color: var(--text-2); font-size: .93rem; }
.footer-links a:hover { color: var(--primary); }
.footer-contact { list-style: none; display: grid; gap: .85rem; }
.footer-contact li { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; color: var(--text-2); }
.footer-contact i { color: var(--primary); font-size: 1.15rem; margin-top: 2px; }
.footer-contact a { color: var(--text-2); }
.footer-contact a:hover { color: var(--primary); }
.social { display: flex; gap: .55rem; flex-wrap: wrap; }
.social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 1.15rem; transition: .2s; }
.social a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.footer-bottom nav { display: flex; gap: 1.2rem; }
.footer-bottom a { color: var(--muted); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------- Floating buttons ---------------- */
.float-wa { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 14px 30px -8px rgba(37, 211, 102, .65); transition: transform .25s; }
.float-wa:hover { color: #fff; transform: scale(1.08); }
.float-wa::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: pulse 2.4s infinite; }
.float-wa .wa-tip { position: absolute; inset-inline-start: calc(100% + 12px); white-space: nowrap; background: var(--surface); color: var(--text); font-size: .85rem; font-weight: 600; padding: .45rem .8rem; border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--border); opacity: 0; transform: translateX(-6px); transition: .25s; pointer-events: none; }
[dir="rtl"] .float-wa .wa-tip { transform: translateX(6px); }
.float-wa:hover .wa-tip { opacity: 1; transform: none; }
.to-top { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; font-size: 1.3rem; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .3s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--primary); border-color: var(--primary); }

/* ---------------- Empty state & pagination ---------------- */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty .empty-icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 24px; display: grid; place-items: center; font-size: 2.1rem; background: var(--grad-soft); color: var(--primary); }
.empty h3 { color: var(--text); font-size: 1.1rem; margin-bottom: .4rem; }
.empty p { margin: 0 auto; max-width: 420px; }
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.page-link { min-width: 42px; height: 42px; padding: 0 .8rem; border-radius: 12px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .9rem; }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------------- Request form page ---------------- */
.form-card { padding: clamp(1.4rem, 3vw, 2.4rem); }
.steps-side { list-style: none; display: grid; gap: 1.2rem; counter-reset: s; }
.steps-side li { display: flex; gap: .9rem; align-items: flex-start; color: var(--text-2); font-size: .94rem; }
.steps-side li::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; font-family: var(--font-head); }
.success-hero { text-align: center; max-width: 680px; margin: 0 auto; }
.success-icon { width: 96px; height: 96px; margin: 0 auto 1.5rem; border-radius: 30px; display: grid; place-items: center; font-size: 3rem; color: #fff; background: linear-gradient(135deg, #22c55e, #06b6d4); box-shadow: 0 20px 40px -16px rgba(34, 197, 94, .7); animation: pop .6s cubic-bezier(.2, .9, .3, 1.4); }
.copy-box { display: flex; gap: .5rem; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .45rem .45rem .45rem 1rem; direction: ltr; margin: .6rem 0 0; }
.copy-box code { flex: 1; font-family: var(--font-mono); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: var(--text-2); }

/* ---------------- Conversation (chat) ---------------- */
.chat { display: flex; flex-direction: column; gap: 1rem; max-height: 560px; overflow-y: auto; padding: .3rem .3rem 1rem; scroll-behavior: smooth; }
.chat.no-limit { max-height: none; }
.msg { display: flex; gap: .7rem; align-items: flex-end; max-width: 82%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; border-end-start-radius: 6px; padding: .8rem 1rem; font-size: .95rem; color: var(--text); word-break: break-word; min-width: 0; }
.msg.me .msg-bubble { background: var(--primary); border-color: transparent; color: #fff; border-end-start-radius: 18px; border-end-end-radius: 6px; }
.msg.me .msg-bubble a { color: #fff; text-decoration: underline; }
.msg-meta { font-size: .75rem; color: var(--muted); margin-top: .3rem; display: flex; gap: .5rem; }
.msg.me .msg-meta { justify-content: flex-end; }
.msg-files { display: grid; gap: .4rem; margin-top: .6rem; }
.msg-file { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .83rem; }
.msg.me .msg-file { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .25); color: #fff; }
.msg-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.chat-form { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: .5rem; display: grid; gap: .7rem; }
.chat-form textarea { min-height: 90px; }
.chat-form-row { display: flex; gap: .7rem; align-items: stretch; flex-wrap: wrap; }
.chat-form-row .file-drop { flex: 1 1 240px; }

/* ---------------- Files ---------------- */
.file-list { display: grid; gap: .6rem; }
.file-item { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .2s; }
.file-item:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.file-item .f-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1.3rem; flex-shrink: 0; }
.file-item .f-info { flex: 1; min-width: 0; }
.file-item .f-name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.file-item .f-meta { font-size: .78rem; color: var(--muted); display: flex; gap: .7rem; flex-wrap: wrap; }
.file-item .f-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* ---------------- Progress & timeline ---------------- */
.progress { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--grad); transition: width 1s cubic-bezier(.2, .8, .2, 1); position: relative; }
.progress-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shimmer 2.2s infinite; }
.progress.sm { height: 6px; }
.progress-label { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .45rem; color: var(--text-2); font-weight: 600; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; flex-shrink: 0; }
.ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; direction: ltr; }
.timeline { list-style: none; display: grid; gap: 0; position: relative; }
.timeline li { display: flex; gap: .9rem; align-items: flex-start; padding-bottom: 1.1rem; position: relative; }
.timeline li::before { content: ''; position: absolute; top: 28px; bottom: 0; inset-inline-start: 13px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .t-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; flex-shrink: 0; color: transparent; font-size: .9rem; position: relative; z-index: 1; }
.timeline li.done .t-dot { background: var(--success); border-color: var(--success); color: #fff; }
.timeline li.done::before { background: var(--success); }
.timeline .t-body { flex: 1; min-width: 0; padding-top: 2px; }
.timeline .t-title { font-weight: 600; font-size: .94rem; }
.timeline li.done .t-title { color: var(--text-2); }
.timeline .t-meta { font-size: .78rem; color: var(--muted); }
.timeline .t-actions { display: flex; gap: .3rem; }

/* ---------------- Updates feed ---------------- */
.feed { display: grid; gap: 1rem; }
.feed-item { display: flex; gap: 1rem; }
.feed-item .f-dot { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 1.15rem; flex-shrink: 0; }
.feed-item .f-content { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.2rem; }
.feed-item h4 { font-size: 1rem; margin: 0 0 .3rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.feed-item .f-text { color: var(--text-2); font-size: .93rem; }
.feed-item .f-when { font-size: .78rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: .3rem; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: .85rem 1.1rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; font-size: .93rem; text-decoration: none; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { background: var(--danger); color: #fff; border-radius: 99px; font-size: .7rem; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.tab-panel { display: none; animation: fadeIn .3s; }
.tab-panel.active { display: block; }

/* ==========================================================================
   Auth layout
   ========================================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 3rem clamp(2rem, 5vw, 4.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: radial-gradient(circle at 20% 15%, rgba(139, 92, 246, .6), transparent 45%), radial-gradient(circle at 85% 85%, rgba(6, 182, 212, .5), transparent 45%), #120d36; }
.auth-side::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 48px 48px; }
.auth-side .brand, .auth-side .brand:hover { color: #fff; }
.auth-side .brand-name small { color: rgba(255, 255, 255, .6); }
.auth-side h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.auth-side p { color: rgba(255, 255, 255, .78); font-size: 1.05rem; }
.auth-side .check-list li i { background: rgba(255, 255, 255, .14); color: #7ef0c2; }
.auth-side .auth-foot { font-size: .85rem; color: rgba(255, 255, 255, .6); }
.auth-main { display: flex; flex-direction: column; padding: 1.5rem clamp(1.2rem, 4vw, 3rem); background: var(--bg); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.auth-top .brand { visibility: hidden; }
.auth-box { width: 100%; max-width: 460px; margin: auto; padding-block: 2.5rem; }
.auth-box h1 { font-size: 1.9rem; margin-bottom: .4rem; }
.auth-box .lead { color: var(--text-2); margin-bottom: 2rem; }
.auth-box .form-group + .form-group { margin-top: 1.1rem; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.2rem 0 1.5rem; font-size: .9rem; flex-wrap: wrap; }
.auth-alt { text-align: center; margin-top: 1.8rem; color: var(--text-2); font-size: .93rem; }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-top .brand { visibility: visible; }
}

/* ==========================================================================
   Dashboard layout (admin + portal)
   ========================================================================== */
.dash { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; padding: 1.2rem 1rem; z-index: 60; scrollbar-width: thin; }
.sidebar-brand { padding: .3rem .6rem 1.4rem; }
.side-label { font-size: .72rem; font-weight: 700; color: var(--muted); padding: 1.1rem .8rem .5rem; letter-spacing: .06em; }
html[lang="en"] .side-label { text-transform: uppercase; }
.side-nav { display: grid; gap: .15rem; }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .68rem .85rem; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: .93rem; transition: .15s; position: relative; }
.side-link i { font-size: 1.22rem; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.side-link.active::before { content: ''; position: absolute; inset-inline-start: -1rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
[dir="rtl"] .side-link.active::before { border-radius: 4px 0 0 4px; }
.side-link .count { margin-inline-start: auto; background: var(--danger); color: #fff; border-radius: 99px; font-size: .7rem; font-weight: 700; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; }
.side-link .count.soft { background: var(--primary-soft); color: var(--primary); }
.sidebar-foot { margin-top: auto; padding-top: 1rem; }
.side-card { background: var(--grad); border-radius: 16px; padding: 1.1rem; color: #fff; font-size: .86rem; }
.side-card strong { display: block; font-size: .95rem; margin-bottom: .3rem; }
.side-card p { color: rgba(255, 255, 255, .85); margin: 0 0 .8rem; }
.dash-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; height: 70px; display: flex; align-items: center; gap: 1rem; padding: 0 clamp(1rem, 3vw, 2rem); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.topbar-title { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.sidebar-toggle { display: none; }
.dash-content { padding: clamp(1.2rem, 3vw, 2rem); flex: 1; }
.dash-backdrop { display: none; }
@media (max-width: 1024px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w); transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow-lg); }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .dash-backdrop { display: block; position: fixed; inset: 0; background: rgba(5, 6, 15, .55); z-index: 55; }
  .sidebar-toggle { display: inline-grid; }
}

.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .5rem; display: none; z-index: 70; }
.dropdown.open .dropdown-menu { display: block; animation: dropIn .2s ease; }
.dropdown-menu a, .dropdown-menu button.dd-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 10px; color: var(--text-2); font-size: .9rem; width: 100%; border: 0; background: none; text-align: start; }
.dropdown-menu a:hover, .dropdown-menu button.dd-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-menu .dd-head { padding: .6rem .8rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .4rem; }
.dropdown-menu .dd-head strong { display: block; font-size: .93rem; }
.dropdown-menu .dd-head small { color: var(--muted); font-size: .8rem; }
.notif-menu { width: min(370px, calc(100vw - 30px)); padding: 0; }
.notif-menu .dd-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; margin: 0; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex !important; gap: .75rem; padding: .85rem 1rem !important; border-radius: 0 !important; border-bottom: 1px solid var(--border); align-items: flex-start !important; }
.notif-item.unread { background: var(--primary-soft); }
.notif-item .n-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary); flex-shrink: 0; }
.notif-item .n-title { font-weight: 600; color: var(--text); font-size: .88rem; line-height: 1.45; }
.notif-item .n-body { font-size: .8rem; color: var(--muted); line-height: 1.45; }
.notif-item .n-time { font-size: .72rem; color: var(--muted); }
.notif-foot { display: block !important; text-align: center !important; padding: .8rem !important; font-weight: 600; color: var(--primary) !important; }
.user-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .25rem .35rem .25rem .7rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
[dir="rtl"] .user-chip { padding: .25rem .7rem .25rem .35rem; }
.user-chip .u-name { font-weight: 600; font-size: .88rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .user-chip .u-name { display: none; } .user-chip { padding: .25rem !important; } }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-header h1 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 0; }
.page-header p { color: var(--text-2); margin: .3rem 0 0; }
.page-header .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .88rem; margin-bottom: .6rem; }
.back-link:hover { color: var(--primary); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat-card { display: flex; gap: 1rem; align-items: center; padding: 1.25rem 1.3rem; color: var(--text); }
.stat-card:hover { color: var(--text); }
.stat-card .s-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.45rem; flex-shrink: 0; }
.stat-card .s-value { font-family: var(--font-head); font-size: 1.65rem; font-weight: 700; line-height: 1.15; direction: ltr; unicode-bidi: plaintext; }
.stat-card .s-label { color: var(--muted); font-size: .86rem; font-weight: 500; }
.s-violet { background: var(--primary-soft); color: var(--primary); } .s-cyan { background: var(--accent-soft); color: var(--accent); }
.s-green { background: var(--success-soft); color: var(--success); } .s-amber { background: var(--warning-soft); color: var(--warning); }
.s-rose { background: var(--danger-soft); color: var(--danger); } .s-blue { background: var(--info-soft); color: var(--info); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.panel + .panel { margin-top: 1.4rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 1.02rem; margin: 0; display: flex; align-items: center; gap: .55rem; }
.panel-head h2 i, .panel-head h3 i { color: var(--primary); font-size: 1.2rem; }
.panel-body { padding: 1.4rem; }
.panel-body.flush { padding: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.dash-grid.even { grid-template-columns: 1fr 1fr; }
.dash-grid > div { min-width: 0; display: grid; gap: 1.4rem; align-content: start; }
.dash-grid > div > .panel + .panel { margin-top: 0; }
@media (max-width: 1100px) { .dash-grid, .dash-grid.even { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: start; font-weight: 600; color: var(--muted); font-size: .8rem; padding: .85rem 1.2rem; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.unread td { background: color-mix(in srgb, var(--primary-soft) 70%, transparent); }
.table tr.unread td:first-child { box-shadow: inset -3px 0 0 var(--primary); }
[dir="ltr"] .table tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.table .t-title { font-weight: 600; color: var(--text); display: block; }
.table .t-sub { font-size: .8rem; color: var(--muted); }
.table .thumb { width: 56px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.table .row-actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: nowrap; }
.table form { display: inline; margin: 0; }

.list { display: grid; }
.list-item { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.4rem; border-bottom: 1px solid var(--border); color: var(--text); transition: background .15s; min-width: 0; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); color: var(--text); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-end { flex-shrink: 0; text-align: end; font-size: .8rem; color: var(--muted); display: grid; gap: .25rem; justify-items: end; }

.toolbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.search-form { display: flex; gap: .5rem; flex: 1 1 280px; max-width: 420px; }
.search-form .form-control { min-height: 42px; padding-block: .55rem; }
.pill-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.pill-tabs a { padding: .45rem .9rem; border-radius: 99px; font-size: .84rem; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); display: inline-flex; gap: .4rem; align-items: center; }
.pill-tabs a:hover { color: var(--primary); border-color: var(--primary); }
.pill-tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill-tabs a small { opacity: .7; font-weight: 700; }

.kv { display: grid; gap: .1rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); flex-shrink: 0; }
.kv dd { margin: 0; font-weight: 600; text-align: end; min-width: 0; word-break: break-word; }

.project-head { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.project-head .ph-main { flex: 1; min-width: 240px; }
.project-head h1 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin: .3rem 0 .6rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; color: var(--muted); font-size: .86rem; }
.meta-row span { display: inline-flex; align-items: center; gap: .35rem; }
.finance { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.finance div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1rem; }
.finance small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.finance strong { font-family: var(--font-head); font-size: 1.15rem; }
.finance .paid strong { color: var(--success); } .finance .due strong { color: var(--warning); }
@media (max-width: 560px) { .finance { grid-template-columns: 1fr; } }

.project-card { display: flex; flex-direction: column; gap: 1rem; color: var(--text); }
.project-card:hover { color: var(--text); }
.project-card h3 { font-size: 1.05rem; margin: 0; }
.project-card .pc-top { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; }
.project-card .pc-foot { display: flex; justify-content: space-between; gap: .8rem; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }

.welcome { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1.8rem 2rem; border-radius: var(--radius-lg); background: var(--grad); color: #fff; margin-bottom: 1.6rem; position: relative; overflow: hidden; isolation: isolate; }
.welcome::after { content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .1); top: -160px; inset-inline-end: -60px; z-index: -1; }
.welcome h1 { color: #fff; font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin: 0 0 .3rem; }
.welcome p { color: rgba(255, 255, 255, .85); margin: 0; }

.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: .4rem; max-height: 170px; overflow-y: auto; padding: .5rem; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.icon-picker label { cursor: pointer; }
.icon-picker input { position: absolute; opacity: 0; pointer-events: none; }
.icon-picker span { display: grid; place-items: center; height: 44px; border-radius: 10px; font-size: 1.3rem; color: var(--text-2); border: 1px solid transparent; }
.icon-picker span:hover { background: var(--surface-2); }
.icon-picker input:checked + span { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.lang-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .lang-pair { grid-template-columns: 1fr; } }
.lang-tag { font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 6px; background: var(--surface-3); color: var(--muted); }
.img-preview { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.img-preview img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; margin-bottom: .8rem; }
.gallery-edit label { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; display: block; }
.gallery-edit img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-edit .rm { position: absolute; inset-inline-end: 6px; top: 6px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 8px; padding: .1rem .45rem; font-size: .75rem; display: flex; gap: .3rem; align-items: center; }
.gallery-edit input:checked ~ img { opacity: .35; filter: grayscale(1); }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--border-strong) !important; }
.ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; background: var(--surface-2); }
.ql-container.ql-snow { border-radius: 0 0 12px 12px; background: var(--surface); min-height: 220px; font-family: var(--font-body) !important; font-size: .98rem !important; color: var(--text); }
.ql-editor { min-height: 220px; line-height: 1.8; }
.ql-editor.ql-blank::before { color: var(--muted) !important; font-style: normal !important; }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-fill { fill: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-picker { color: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-picker-options { background: var(--surface-2); }
.settings-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.settings-nav { display: grid; gap: .2rem; position: sticky; top: 90px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } .settings-nav { position: static; display: flex; overflow-x: auto; } }

/* ---------------- Minimal layout (errors, installer) ---------------- */
.minimal { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; position: relative; overflow: hidden; isolation: isolate; }
.minimal .hero-bg .blob { opacity: .3; }
.error-code { font-family: var(--font-head); font-size: clamp(5rem, 16vw, 9rem); font-weight: 700; line-height: 1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; }
.install-box { width: 100%; max-width: 820px; }
.req-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; }
.req-list li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.req-list .ok { color: var(--success); } .req-list .no { color: var(--danger); }

/* ---------------- Reveal on scroll ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------------- Animations ---------------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes blob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.1); } 100% { transform: translate(-30px, 20px) scale(.95); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes codeIn { to { opacity: 1; transform: none; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .float-wa, .to-top, .sidebar, .topbar { display: none !important; }
  body { background: #fff; color: #000; }
}
