/* =============================================
   MARSHMALLOW TECHNOLOGY — main.css
   Bootstrap 5.3 + Custom Design System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&family=Vazirmatn:wght@300;400;500;600;700&display=swap');

/* ─── CSS Variables ─────────────────────────── */
:root {
  --system-font: 'Inter', Arial, Helvetica, sans-serif;
  --navy:        #1a2a4a;
  --navy-deep:   #111e36;
  --navy-mid:    #243557;
  --gold:        #F5C518;
  --gold-hover:  #e0b010;
  --white:       #ffffff;
  --off-white:   #f4f6fb;
  --gray:        #6c757d;
  --gray-light:  #e8ecf4;
  --success:     #28a745;
  --danger:      #dc3545;
  --warning:     #ffc107;

  /* Theme defaults (light) */
  --bg:          var(--off-white);
  --bg-card:     #ffffff;
  --text:        var(--navy);
  --text-muted:  #555e75;
  --border:      #d0d9ef;
  --btn-bg:      var(--navy);
  --btn-text:    #ffffff;
  --btn-outline: var(--navy);
  --header-bg:   #ffffff;
  --footer-bg:   var(--navy-deep);
  --code-bg:     #1e2d4a;
  --light-blue-border: #002f72;
  --hover-border: #7fb3ff;
  --hover-shadow: 0 0 12px rgba(245,197,24,.22);
}

[data-theme="dark"] {
  --bg:          var(--navy);
  --bg-card:     var(--navy-mid);
  --text:        #e8ecf4;
  --text-muted:  #8fa3c8;
  --border:      #2e4070;
  --btn-bg:      var(--gold);
  --btn-text:    var(--navy-deep);
  --btn-outline: var(--gold);
  --header-bg:   var(--navy-deep);
  --footer-bg:   var(--navy-deep);
  --code-bg:     #0d1929;
  --hover-border: var(--gold);
  --hover-shadow: 0 0 12px rgba(245,197,24,.24);
}

/* ─── Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .3s, color .3s;
  overflow-x: hidden;
}

body[dir="rtl"],
html[dir="rtl"] body { font-family: 'Vazirmatn', 'Inter', sans-serif; text-align: right; }
html[lang="fa"] body,
html[lang="ar"] body,
html[lang="fa"] input,
html[lang="fa"] textarea,
html[lang="fa"] select,
html[lang="fa"] button,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select,
html[lang="ar"] button {
  font-family: 'Vazirmatn', 'Inter', sans-serif;
}

/* One type system: Persian/Arabic use Vazirmatn; every Latin-script UI uses sans-serif. */
html[lang="fa"],
html[lang="ar"] { --system-font: 'Vazirmatn', Tahoma, Arial, sans-serif; }
body,
button,
input,
textarea,
select,
option,
label,
table,
th,
td,
h1, h2, h3, h4, h5, h6,
p,
a,
.display-font,
.btn-marsh,
.btn-marsh-outline,
.nav-link-marsh,
.section-label,
.section-title,
.dash-logo,
.dash-stat-val {
  font-family: var(--system-font) !important;
  letter-spacing: 0;
}
.table {
  --bs-table-color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border);
  color: var(--text);
}
.table thead th {
  background: color-mix(in srgb, var(--bg-card) 88%, var(--gold) 12%);
  color: var(--text);
  border-color: var(--border);
  font-weight: 700;
}
[data-theme="light"] .table thead th {
  background: #eef3ff;
  color: var(--navy-deep);
}
[data-theme="dark"] .table thead th {
  background: #152440;
  color: #f8fbff;
}
code,
pre,
kbd,
.vscode-window,
.vscode-code,
.marsh-editor-code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}

h1, h2, h3, h4, h5, .display-font {
  font-family: 'Oswald', sans-serif;
  letter-spacing: .5px;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }

/* ─── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--navy-mid); border-radius: 3px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--gold); }

/* ─── Buttons ───────────────────────────────── */
.btn-marsh {
  display: inline-flex;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-bg);
  border-radius: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 1px;
  padding: .55rem 1.6rem;
  transition: all .25s;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
}
.btn-marsh:hover {
  background: transparent;
  color: var(--btn-outline);
  border-color: var(--hover-border);
  box-shadow: var(--hover-shadow);
}
.btn-marsh-outline {
  display: inline-flex;
  background: transparent;
  color: var(--btn-outline);
  border: 1px solid var(--btn-outline);
  border-radius: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 1px;
  padding: .55rem 1.6rem;
  transition: all .25s;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
}
.btn-marsh-outline:hover {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--hover-border);
  box-shadow: var(--hover-shadow);
}

/* ─── Header / Mega Menu ────────────────────── */
#main-header {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: var(--header-bg);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 18px rgba(26,42,74,.10);
  transition: background .3s;
}

.navbar-brand img { height: 64px; }
.brand-lockup {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: .6px;
  line-height: 1;
}
.brand-lockup:hover { color: var(--text); }
.brand-lockup img {
  width: auto;
  height: 64px;
  max-width: 280px;
  object-fit: contain;
  border-radius: 4px;
  background: transparent;
}
.theme-logo-dark { display: none; }
[data-theme="dark"] .theme-logo-light { display: none;}
[data-theme="dark"] .theme-logo-dark { display: inline-block; }
.brand-lockup span { display: none; font-size: 1rem; white-space: nowrap; }
.brand-lockup.logo-fallback { gap: .65rem; }
.brand-lockup.logo-fallback span { display: inline; }
.brand-lockup.logo-fallback img { display: none; }
.brand-lockup b { color: var(--gold); font-weight: 700; }
.footer-brand { color: #ffffff; }
.footer-brand:hover { color: #ffffff; }
.footer-brand img { background: #0b163000; height: 80px; max-width: 290px; }
.footer-slogan {
  color: var(--gold) !important;
  font-family: 'Vazirmatn', 'Inter', sans-serif;
  font-weight: 600;
  margin: .25rem 0 .35rem;
}

.nav-link-marsh {
  font-family: 'Oswald', sans-serif;
  font-size: .95rem;
  letter-spacing: .8px;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .5rem .9rem !important;
  border-radius: 5px;
  transition: background .2s, color .2s;
}
.nav-link-marsh:hover,
.nav-link-marsh.active {
  background: var(--btn-bg);
  color: var(--btn-text) !important;
  box-shadow: var(--hover-shadow);
  outline: 1px solid var(--hover-border);
  outline-offset: -1px;
}
.nav-link-marsh svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link-marsh i { font-size: 1rem; line-height: 1; }

/* Mega dropdown */
.has-mega::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -18px;
  right: -18px;
  height: 14px;
  background: transparent;
  pointer-events: auto;
}
.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 700px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(26,42,74,.18);
  padding: 1.5rem;
  display: none;
  z-index: 2000;
  animation: fadeDown .2s ease;
}
.mega-menu::before,
.login-switcher-menu::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-right: 0;
  border-bottom: 0;
  transform: rotate(45deg);
  top: -7px;
}
.mega-menu::before { left: calc(50% - 6px); }
.mega-menu.show { display: flex; gap: 2rem; flex-wrap: wrap; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mega-col h6 {
  font-family: 'Oswald', sans-serif;
  color: var(--gold);
  font-size: .85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .3rem;
}
.mega-col a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: .3rem 0;
  color: var(--text);
  font-size: .9rem;
  transition: color .2s, padding-left .2s;
}
.mega-col a:hover { color: var(--gold); padding-left: 4px; }
.mega-col a svg { width: 15px; height: 15px; }
.mega-menu-rich {
  min-width: min(920px, 92vw);
  display: none;
  grid-template-columns: 260px 1fr;
  gap: 1.2rem;
  padding: 1rem;
}
.mega-menu-rich.show {
  display: grid;
}
.mega-visual {
  background: var(--navy-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  min-height: 240px;
  color: #c5cfe8;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
}
.mega-visual img {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  width: calc(100% - 2rem);
  height: 100px;
  object-fit: contain;
  background: #0d1929;
  border-radius: 6px;
}
.mega-visual strong {
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
}
.mega-visual span {
  color: #8fa3c8;
  font-size: .84rem;
  line-height: 1.5;
}
.mega-content {
  min-width: 0;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem .8rem;
}
.mega-grid a {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .55rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
}
.mega-grid a:hover {
  border-color: var(--hover-border);
  box-shadow: var(--hover-shadow);
  background: rgba(245,197,24,.08);
  color: var(--text);
}
.mega-grid i {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--navy-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mega-grid b {
  display: block;
  font-size: .88rem;
  line-height: 1.25;
}
.mega-grid small {
  display: block;
  color: var(--text-muted);
  font-size: .75rem;
  line-height: 1.45;
}
.mobile-nav-dropdown {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .75rem;
  border-radius: 5px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: .8px;
}
.mobile-nav-dropdown.active,
.mobile-nav-dropdown:hover {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: var(--hover-shadow);
  outline: 1px solid var(--hover-border);
  outline-offset: -1px;
}
.mobile-nav-dropdown i {
  font-size: .75rem;
}
.mobile-subnav {
  padding: .35rem 0 .45rem 1rem;
}
[dir="rtl"] .mobile-subnav {
  padding-left: 0;
  padding-right: 1rem;
}
.mobile-subnav a {
  display: block;
  color: var(--text-muted);
  padding: .35rem .75rem;
  font-size: .9rem;
}
.mobile-subnav a:hover {
  color: var(--gold);
}

/* Theme + Lang buttons */
#theme-toggle {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .25s;
}
#theme-toggle:hover { opacity: .85; }

.lang-select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .35rem .65rem;
  font-size: .85rem;
  cursor: pointer;
  min-width: 118px;
}
.lang-switcher {
  position: relative;
}
.lang-toggle {
  min-width: 128px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .65rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
}
.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] {
  border-color: var(--gold);
  color: var(--text);
}
.lang-toggle .bi {
  margin-inline-start: auto;
  font-size: .72rem;
}
.lang-switcher-menu {
  min-width: 178px;
  padding: .4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(26,42,74,.2);
  z-index: 2050;
}
.lang-switcher-menu[data-bs-popper] {
  top: 100%;
  left: 50%;
  right: auto;
  margin-top: 12px !important;
  transform: translateX(-50%) !important;
}
.lang-switcher-menu::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -7px;
  width: 12px;
  height: 12px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-right: 0;
  border-bottom: 0;
  transform: translateX(-50%) rotate(45deg);
}
.lang-switcher-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  border-radius: 5px;
  color: var(--text);
  padding: .5rem .6rem;
  font-size: .86rem;
}
.lang-switcher-menu .dropdown-item:hover,
.lang-switcher-menu .dropdown-item:focus,
.lang-switcher-menu .dropdown-item.active,
.lang-switcher-menu .dropdown-item:active {
  background: rgba(245,197,24,.12);
  color: var(--gold);
}
.lang-flag {
  width: 20px;
  height: 14px;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 2px;
  background: #f5f5f5;
  box-shadow: inset 0 0 0 1px rgba(17,30,54,.18);
}
.flag-us { background: repeating-linear-gradient(to bottom, #b22234 0 7.7%, #fff 7.7% 15.4%); }
.flag-us::before { content: ''; position: absolute; top: 0; left: 0; width: 42%; height: 54%; background: #3c3b6e; }
.flag-af { background: linear-gradient(to right, #111 0 33.33%, #d32011 33.33% 66.66%, #007a36 66.66% 100%); }
.flag-sa { background: #006c35; }
.flag-sa::after { content: ''; position: absolute; left: 4px; right: 4px; top: 7px; height: 1.5px; background: #fff; border-radius: 2px; }
.flag-fr { background: linear-gradient(to right, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66% 100%); }
.flag-cn { background: #de2910; }
.flag-cn::before { content: '*'; position: absolute; left: 2px; top: -1px; color: #ffde00; font-size: 9px; line-height: 1; }
.flag-es { background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%); }
.flag-pt { background: linear-gradient(to right, #006600 0 42%, #ff0000 42% 100%); }
.flag-jp { background: #fff; }
.flag-jp::before { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #bc002d; left: 50%; top: 50%; transform: translate(-50%, -50%); }
[dir="rtl"] .lang-switcher-menu[data-bs-popper] {
  left: 50%;
  right: auto;
  transform: translateX(-50%) !important;
}

/* ─── Shared Hero – Animated Digital Network ───────────────── */
.hero-network-surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-network-surface > .container,
.hero-network-surface .legal-hero-grid {
  position: relative;
  z-index: 1;
}
.hero-network-surface .hero-plexus-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}
.hero-network-surface .vscode-window {
  position: relative;
  z-index: 1;
}

#home-hero {
  color: #f8fbff;
}
#home-hero .section-label {
  color: rgba(245,197,24,.95);
}
#home-hero .display-font {
  color: #ffffff !important;
}
#home-hero .section-desc {
  color: rgba(255,255,255,.82);
}
#home-hero .btn-marsh {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}
#home-hero .btn-marsh:hover {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(245,197,24,.28);
}
#home-hero .btn-marsh-outline {
  color: var(--gold);
  border-color: rgba(245,197,24,.9);
}
#home-hero .btn-marsh-outline:hover {
  background: rgba(245,197,24,.12);
  color: #ffffff;
  border-color: var(--gold);
}

/* ─── Hero – VS Code ────────────────────────── */
#home-hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.vscode-window {
  background: var(--code-bg);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem;
  border: 1px solid #2e4070;
}
.vscode-titlebar {
  background: #0d1929;
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.dot { width: 13px; height: 13px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28c840; }
.vscode-filename {
  color: #6b8cba;
  font-size: .8rem;
  margin-left: .5rem;
}
.vscode-body {
  display: flex;
  min-height: 340px;
}
.vscode-gutter {
  background: #0d1929;
  padding: 1rem .6rem;
  text-align: right;
  color: #3d5577;
  font-size: .78rem;
  line-height: 1.9;
  min-width: 38px;
  user-select: none;
}
.vscode-code {
  padding: 1rem 1.2rem;
  flex: 1;
  line-height: 1.9;
  overflow: hidden;
}
.code-line { display: block; white-space: pre; opacity: 0; animation: codeFadeIn .4s forwards; }
.code-line.visible { opacity: 1; }
.marsh-ltr-code,
.marsh-ltr-code *,
.api-code-snippet,
.api-code-snippet *,
.response-box pre,
.response-box pre * {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}
.marsh-ltr-code .vscode-code {
  overflow-x: auto;
}
#home-hero .vscode-window,
#home-hero .vscode-window *,
.vscode-gutter,
.vscode-code,
.code-line {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}

/* syntax colors */
.syn-kw  { color: #c792ea; }   /* keyword */
.syn-fn  { color: #82aaff; }   /* function */
.syn-str { color: #c3e88d; }   /* string */
.syn-num { color: #f78c6c; }   /* number */
.syn-cm  { color: #546e7a; font-style: italic; } /* comment */
.syn-tag { color: #f07178; }   /* tag */
.syn-at  { color: #89ddff; }   /* attr / symbol */
.syn-pl  { color: #ffffff; }   /* plain */
.syn-gold { color: #F5C518; }

@keyframes codeFadeIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cursor-blink {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--gold);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── Section Common ─────────────────────────── */
.marsh-section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.marsh-section-alt { background: var(--bg-card); }

.section-label {
  font-family: 'Oswald', sans-serif;
  font-size: .78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .4rem;
}
.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: .75rem;
}
.section-desc {
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ─── Cards ─────────────────────────────────── */
.marsh-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem;
  margin-top: 10px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  height: 100%;
}
.marsh-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(26,42,74,.18), var(--hover-shadow);
  border-color: var(--hover-border);
}
.marsh-card-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
[data-theme="dark"] .marsh-card-icon {
  background: linear-gradient(135deg, var(--gold) 0%, #d4a000 100%);
}
.marsh-card-icon svg { width: 24px; height: 24px; color: #fff; }
.marsh-card-icon i { font-size: 1.4rem; color: #fff; }
[data-theme="dark"] .marsh-card-icon svg { color: var(--navy-deep); }
[data-theme="dark"] .marsh-card-icon i { color: var(--navy-deep); }

.marsh-card h4 {
  font-family: 'Oswald', sans-serif;
  color: var(--text);
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.marsh-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

/* ─── API Hero ───────────────────────────────── */
#api-hero {
  min-height: 560px;
  background: var(--code-bg);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 7vw, 6rem) 0 clamp(3rem, 5vw, 4rem);
}
.api-float-code {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: rgba(130,170,255,.4);
  white-space: pre;
  animation: floatCode linear infinite;
  pointer-events: none;
}
@keyframes floatCode {
  0%   { transform: translateY(110%) rotate(-5deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-110%) rotate(5deg); opacity: 0; }
}

.api-hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
}
.api-page-section {
  padding: clamp(2.5rem, 4.5vw, 3.75rem) 0;
  overflow: visible;
}
.api-page-section + .api-page-section {
  padding-top: clamp(2rem, 3.5vw, 3rem);
}
.api-card {
  height: auto;
  min-height: 0;
  margin-top: 0;
  padding: clamp(1rem, 2vw, 1.35rem) !important;
  border-radius: 8px;
}
.api-card:hover {
  transform: none;
}
.api-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.api-stack > .marsh-card {
  margin-top: 0;
}
.api-endpoint {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  background: rgba(22, 28, 78, .98);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: .9rem 1rem;
  margin-top: 1rem;
  color: #fff;
}
.api-endpoint span {
  font-weight: 700;
  color: var(--gold);
}
.api-endpoint code {
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  word-break: break-all;
}
.feature-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .9rem;
  min-height: 118px;
}
.feature-box h3 {
  font-size: 1rem;
  margin-bottom: .45rem;
}
.feature-box p {
  margin-bottom: 0;
}
.api-step-list {
  padding-inline-start: 1.15rem;
  margin: 0;
  color: var(--text-muted);
}
.api-step-list li {
  margin-bottom: .65rem;
}
.api-step-list li:last-child {
  margin-bottom: 0;
}
.api-code-snippet {
  background: #0f172a;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 8px;
  padding: .9rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: .86rem;
  line-height: 1.55;
  direction: ltr;
  text-align: left;
  tab-size: 2;
  color: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.api-code-snippet code,
.api-code-snippet pre,
.api-code-snippet * {
  color: #e2e8f0;
}
.api-code-snippet-compact {
  font-size: .75rem;
  line-height: 1.65;
  margin-bottom: 0;
}
.api-demo-textarea {
  min-height: 150px;
  resize: vertical;
}
.response-box {
  background: #0f172a;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 8px;
  padding: .9rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: .84rem;
  color: #e2e8f0;
}
.response-box pre {
  margin: 0;
  max-height: 300px;
  overflow: auto;
  color: #e2e8f0;
}
[data-theme="light"] .api-code-snippet,
[data-theme="light"] .response-box,
[data-theme="dark"] .api-code-snippet,
[data-theme="dark"] .response-box {
  background: #0f172a;
  color: #e2e8f0;
}
.api-examples-section {
  padding-bottom: clamp(2.25rem, 4vw, 3.25rem);
}
@media (max-width: 991px) {
  #api-hero {
    min-height: auto;
  }
  .api-page-section {
    padding: 2.25rem 0;
  }
}
@media (max-width: 575px) {
  .api-card {
    padding: 1rem !important;
  }
  .api-endpoint {
    display: flex;
    width: 100%;
    padding: .75rem;
  }
  .api-code-snippet,
  .response-box {
    font-size: .78rem;
  }
}

/* ─── Forms ──────────────────────────────────── */
.form-floating label { color: var(--text-muted); }
.form-floating > label,
.form-floating > label::after {
  background: transparent !important;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  color: var(--text-muted);
}
.form-control, .form-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.form-control.invalid-char,
.form-select.invalid-char,
textarea.invalid-char {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220,53,69,.22) !important;
  animation: invalidShake .28s linear;
}
@keyframes invalidShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
}
.form-control:focus, .form-select:focus {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,197,24,.2);
}

/* ─── Toast ──────────────────────────────────── */
.toast-container {
  position: fixed !important;
  z-index: 1090 !important;
  right: auto !important;
  left: auto !important;
  inset-block-end: max(1rem, env(safe-area-inset-bottom)) !important;
  inset-inline-end: max(1rem, env(safe-area-inset-right)) !important;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  width: min(390px, calc(100vw - 2rem));
  padding: 0 !important;
}
.toast-marsh {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 14px 32px rgba(17,30,54,.22);
}
.toast-marsh .toast-header {
  min-height: 42px;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 92%, var(--text));
  color: var(--text);
}
.toast-marsh .toast-body { padding: .8rem; color: var(--text); font-size: .88rem; line-height: 1.6; text-align: start; }
.toast-marsh .toast-icon { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; margin-inline-end: .55rem; border-radius: 50%; font-size: .9rem; }
.toast-marsh .toast-title { font-size: .86rem; font-weight: 700; }
.toast-marsh .toast-close { margin-inline-start: auto; margin-inline-end: 0; }
.toast-marsh.toast-success { border-inline-start-color: var(--success); }
.toast-marsh.toast-success .toast-icon { background: rgba(40,167,69,.15); color: var(--success); }
.toast-marsh.toast-error { border-inline-start-color: var(--danger); }
.toast-marsh.toast-error .toast-icon { background: rgba(220,53,69,.14); color: var(--danger); }
.toast-marsh.toast-warning { border-inline-start-color: var(--warning); }
.toast-marsh.toast-warning .toast-icon { background: rgba(255,193,7,.16); color: #9a7100; }
.toast-marsh.toast-info { border-inline-start-color: #4a90e2; }
.toast-marsh.toast-info .toast-icon { background: rgba(74,144,226,.14); color: #2f70bd; }
[data-theme="dark"] .toast-marsh .toast-header { background: color-mix(in srgb, var(--bg-card) 86%, var(--code-bg)); }
[data-theme="dark"] .toast-marsh.toast-warning .toast-icon { color: var(--gold); }
html[dir="rtl"] .toast-container { inset-inline-end: max(1rem, env(safe-area-inset-left)) !important; }

/* ─── Footer ─────────────────────────────────── */
#main-footer {
  background: var(--footer-bg);
  color: #c5cfe8;
  padding: 3.5rem 0 1rem;
}
#main-footer .footer-logo img { height: 50px; filter: brightness(10); }
#main-footer p { font-size: .88rem; color: #8fa3c8; line-height: 1.7; }
.social-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid #2e4070;
  color: #8fa3c8;
  transition: all .2s;
  margin-right: 6px;
}
[dir="rtl"] .social-icons a { margin-right: 0; margin-left: 6px; }
.social-icons a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.social-icons a:hover { box-shadow: var(--hover-shadow); }
.footer-heading {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-link {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: #8fa3c8;
  font-size: .88rem;
  padding: .2rem 0;
  transition: color .2s;
}
.footer-link i {
  color: var(--gold);
  flex: 0 0 auto;
  margin: 0 !important;
  text-align: center;
  width: 1.1em;
}
.footer-link:hover {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(245,197,24,.24);
}
.footer-bottom {
  border-top: 1px solid #2e4070;
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: .82rem;
  color: #4e6690;
}
.footer-bottom-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}
.footer-copy {
  color: #4e6690;
  text-align: start;
}
.footer-legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}
.footer-legal-links-end { grid-column: 2; justify-content: flex-end; }
.footer-legal-links a {
  color: #8fa3c8;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.footer-legal-links a::before {
  content: "\F26E";
  font-family: "bootstrap-icons";
  color: var(--gold);
  font-size: .9rem;
}
.footer-legal-links a:hover {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(245,197,24,.24);
}
.admin-login-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 34px;
  padding: .35rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .8rem;
  white-space: nowrap;
}
.admin-login-link:hover { border-color: var(--gold); color: var(--gold); }
.login-switcher .admin-login-link { background: var(--bg-card); cursor: pointer; }
.login-switcher-menu { position: absolute; margin-top: 12px !important; min-width: 210px; padding: .45rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 14px 34px rgba(26,42,74,.2); }
.login-switcher-menu::before { right: 18px; }
.login-switcher .dropdown-toggle::after {
  margin-inline-start: .35rem;
  margin-inline-end: 0;
}
.login-switcher .admin-login-link i,
.login-menu-icon {
  flex: 0 0 auto;
  margin: 0 !important;
}
.login-switcher-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  border-radius: 5px;
  color: var(--text);
  padding: .55rem .65rem;
  font-size: .86rem;
}
.login-switcher-menu .dropdown-item:hover,
.login-switcher-menu .dropdown-item:focus { background: rgba(245,197,24,.1); color: var(--text); }
[dir="rtl"] .mega-menu::before { left: calc(50% - 6px); right: auto; }
[dir="rtl"] .login-switcher .dropdown-toggle::after {
  margin-inline-start: 0;
  margin-inline-end: .35rem;
}
[dir="rtl"] .login-switcher-menu .dropdown-item {
  direction: rtl;
  text-align: right;
}
[dir="ltr"] .login-switcher-menu .dropdown-item {
  direction: ltr;
  text-align: left;
}

/* Form direction is visual only; field names and values remain unchanged. */
:is(html[lang="fa"], html[lang="ar"]) input:not([type="checkbox"]):not([type="radio"]),
:is(html[lang="fa"], html[lang="ar"]) textarea,
:is(html[lang="fa"], html[lang="ar"]) select { direction: rtl; text-align: right; }
:is(html[lang="en"], html[lang="fr"], html[lang="zh"], html[lang="es"], html[lang="pt"], html[lang="ja"]) input:not([type="checkbox"]):not([type="radio"]),
:is(html[lang="en"], html[lang="fr"], html[lang="zh"], html[lang="es"], html[lang="pt"], html[lang="ja"]) textarea,
:is(html[lang="en"], html[lang="fr"], html[lang="zh"], html[lang="es"], html[lang="pt"], html[lang="ja"]) select { direction: ltr; text-align: left; }
:is(html[lang="fa"], html[lang="ar"]) input::placeholder,
:is(html[lang="fa"], html[lang="ar"]) textarea::placeholder { direction: rtl; text-align: right; }
:is(html[lang="en"], html[lang="fr"], html[lang="zh"], html[lang="es"], html[lang="pt"], html[lang="ja"]) input::placeholder,
:is(html[lang="en"], html[lang="fr"], html[lang="zh"], html[lang="es"], html[lang="pt"], html[lang="ja"]) textarea::placeholder { direction: ltr; text-align: left; }
[dir="rtl"] .form-floating > label { right: 0; left: auto; text-align: right; transform-origin: 100% 0; }
[dir="ltr"] .form-floating > label { left: 0; right: auto; text-align: left; transform-origin: 0 0; }
[dir="rtl"] .form-floating > .form-control:focus ~ label,
[dir="rtl"] .form-floating > .form-control:not(:placeholder-shown) ~ label,
[dir="rtl"] .form-floating > .form-select ~ label { transform: scale(.85) translateY(-.5rem) translateX(-.15rem); }
.auth-social-btn,
.auth-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.auth-remember {
  justify-content: flex-start;
}
[dir="rtl"] .auth-remember {
  justify-content: flex-end;
  direction: rtl;
}
.auth-action-icon {
  flex: 0 0 auto;
  margin: 0 !important;
}
[data-auth-code-field] { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.auth-page-layer { position: relative; z-index: 1; }
.hero-side,
.hero-top { display: none !important; }
.hero-main { margin-left: 0 !important; padding-top: 0 !important; min-height: 0 !important; }
.footer-bottom-divider {
  display: none;
}
.legal-doc-card {
  white-space: pre-wrap;
  line-height: 1.9;
  color: var(--text-muted);
}
.legal-page-hero {
  background: var(--code-bg);
  color: #ffffff;
  padding: 4.5rem 0;
  position: relative;
  overflow: hidden;
}
.legal-page-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -45% -10%;
  height: 220px;
  background: radial-gradient(circle, rgba(245,197,24,.16), transparent 64%);
}
.legal-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
}
.legal-hero-copy h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1;
  margin: .45rem 0 .8rem;
}
.legal-hero-copy p {
  color: #c5cfe8;
  max-width: 680px;
  line-height: 1.8;
  margin-bottom: .8rem;
}
.legal-hero-copy small {
  color: #8fa3c8;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.legal-hero-icon {
  width: 132px;
  height: 132px;
  border-radius: 20px;
  background: rgba(245,197,24,.12);
  border: 1px solid rgba(245,197,24,.45);
  color: var(--gold);
  display: grid;
  place-items: center;
  box-shadow: var(--hover-shadow);
}
.legal-hero-icon i {
  font-size: 4rem;
}
.legal-document-section {
  overflow: visible;
}
.legal-toc {
  position: sticky;
  top: 110px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}
.legal-toc strong {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .8rem;
}
.legal-toc strong i {
  color: var(--gold);
}
.legal-toc nav {
  display: grid;
  gap: .35rem;
}
.legal-toc a {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.4;
  padding: .42rem .45rem;
  border-radius: 6px;
}
.legal-toc a:hover {
  color: var(--text);
  background: rgba(245,197,24,.08);
  box-shadow: var(--hover-shadow);
}
.legal-toc a.active {
  color: var(--text);
  background: rgba(245,197,24,.08);
  box-shadow: inset 3px 0 0 var(--gold), var(--hover-shadow);
}
[dir="rtl"] .legal-toc a.active {
  box-shadow: inset -3px 0 0 var(--gold), var(--hover-shadow);
}
.legal-toc a span {
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: .76rem;
}
.legal-document {
  display: grid;
  gap: 1rem;
}
.legal-document-notice,
.legal-sources-card,
.legal-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.legal-document-notice {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  color: var(--text-muted);
}
.legal-document-notice i {
  color: var(--gold);
  font-size: 1.25rem;
}
.legal-document-notice p {
  margin: 0;
  line-height: 1.7;
}
.legal-section-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  padding: 1.1rem;
}
.legal-section-number {
  height: 56px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--code-bg);
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.legal-section-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .55rem;
}
.legal-section-heading i {
  color: var(--gold);
  font-size: 1.3rem;
}
.legal-section-heading h2 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--text);
}
.legal-section-copy p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: .75rem;
}
.legal-section-sources {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .8rem;
}
.legal-section-sources a,
.legal-source-grid a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #8fa3c8;
  font-size: .78rem;
}
.legal-section-sources a:hover,
.legal-source-grid a:hover {
  color: var(--gold);
}
.legal-sources-card {
  padding: 1.1rem;
}
.legal-sources-card h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.1rem;
  margin-bottom: .8rem;
}
.legal-sources-card h3 i {
  color: var(--gold);
}
.legal-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 1rem;
}

/* ─── Product badges ─────────────────────────── */
.product-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-deep);
  font-family: 'Oswald', sans-serif;
  font-size: .72rem;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: .5rem;
}
.product-detail-card {
  text-align: start;
  padding: 1.6rem 1.8rem;
}
.product-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  margin-bottom: 1rem;
}
[dir="rtl"] .product-card-head { flex-direction: row-reverse; }
.product-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--navy);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .product-card-icon {
  background: var(--gold);
  color: var(--navy-deep);
}
.product-card-icon i { font-size: 1.35rem; }
.product-detail-card h4 {
  margin-bottom: .65rem;
  min-height: 2.7rem;
}
.product-detail-card p {
  min-height: 5.3rem;
}
.product-detail-card .product-feature-list {
  width: 100%;
  margin: .7rem 0 0;
  padding-inline-start: 1.25rem;
}
.product-detail-card .product-feature-list li {
  margin-inline-start: 0;
}
.product-feature-list {
  color: var(--text-muted);
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: .7rem auto 0;
  padding: 0;
  text-align: start;
  line-height: 1.9;
  font-size: .9rem;
}
.product-feature-list li {
  margin-inline-start: 1.1rem;
}
.product-detail-card .btn-marsh-outline {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 1rem 0 0 !important;
  margin-inline-end: auto !important;
}
.products-built-grid {
  align-items: stretch;
}
.product-built-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  min-height: 320px;
}
.product-built-card .product-badge {
  align-self: flex-start;
  margin-bottom: .5rem;
}
.product-built-card .marsh-card-icon {
  flex-shrink: 0;
  margin-bottom: 1rem;
}
.product-built-card h4 {
  margin-bottom: .55rem;
}
.product-built-card p {
  margin-bottom: .75rem;
}
.product-built-card .product-feature-list {
  width: 100%;
  margin: .75rem 0 1.4rem;
  padding-inline-start: 1.25rem;
}
.product-built-card .product-feature-list li {
  margin-inline-start: 0;
}
.product-built-card .btn-marsh-outline {
  margin-top: auto !important;
}
.product-request-card {
  padding: 2rem 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  text-align: start;
}
.product-request-card .marsh-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 9px;
  margin-bottom: 1.2rem;
}
.product-request-card .product-badge {
  align-self: flex-start;
  margin-bottom: 1rem;
}
.product-request-card h4 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: .6rem;
}
.product-request-card p {
  font-size: .95rem;
  line-height: 1.65;
}
.product-request-card .product-feature-list {
  display: block;
  margin: 1rem 0 1.4rem;
  padding-inline-start: 1.25rem;
  line-height: 1.9;
}
.product-request-card .product-feature-list li {
  margin-inline-start: 0;
}
.product-request-card .btn-marsh {
  align-self: flex-start;
  margin-top: auto !important;
}
.product-request-custom {
  border: 2px dashed var(--gold);
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem;
}
.product-request-custom > i {
  font-size: 3rem;
}
.product-request-custom p {
  max-width: 500px;
}

/* ─── Project request wizard ───────────────────────────────────── */
.project-request-section { padding: 3rem 0 2.5rem; }
.project-request-section .col-xl-10 { display: flex; flex-direction: column; }
.project-request-heading { max-width: 720px; margin-inline: auto; }
.project-request-heading > p { color: var(--text-muted); }
.project-wizard-card { padding: clamp(1.1rem, 3vw, 2rem); padding-bottom: clamp(1rem, 2vw, 1.35rem); }
.project-stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0 0 2.25rem;
  list-style: none;
  margin-bottom: 10px;
}
.project-stepper::before {
  content: '';
  position: absolute;
  top: 22px;
  inset-inline: 11%;
  height: 2px;
  background: var(--border);
}
.project-step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  color: var(--text-muted);
}
.project-step-marker {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
}
.project-step strong,
.project-step small { display: block; }
.project-step strong { font-size: .9rem; color: var(--text); }
.project-step small { margin-top: .15rem; font-size: .72rem; line-height: 1.35; }
.project-step-check { display: none; }
.project-step.is-active .project-step-marker,
.project-step.is-complete .project-step-marker { border-color: var(--gold); background: var(--gold); color: var(--navy-deep); }
.project-step.is-active strong,
.project-step.is-complete strong { color: var(--text); }
.project-step.is-complete .project-step-marker > :first-child { display: none; }
.project-step.is-complete .project-step-check { display: inline; font-size: 1.25rem; }
.project-pane-title { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.4rem; }
.project-pane-title > i { width: 42px; height: 42px; flex: 0 0 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--code-bg); color: var(--gold); font-size: 1.15rem; }
.project-pane-title h2 { margin: 0; font-size: 1.35rem; }
.project-pane-title p { margin: .25rem 0 0; color: var(--text-muted); font-size: .9rem; }
.project-service-label { display: flex; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: .7rem; font-weight: 700; }
.project-required { color: var(--danger); font-size: .75rem; font-weight: 500; }
.project-service-option,
.project-budget-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 56px;
  padding: .75rem .85rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.project-service-option > i:first-child { color: var(--gold); font-size: 1.05rem; }
.project-service-option > i:last-child { margin-inline-start: auto; opacity: 0; }
.btn-check:checked + .project-service-option,
.btn-check:checked + .project-budget-option { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--bg-card)); color: var(--text); }
.btn-check:checked + .project-service-option > i:last-child { opacity: 1; color: var(--gold); }
.project-service-option:hover,
.project-budget-option:hover { border-color: var(--hover-border); transform: translateY(-1px); }
.project-budget-option { justify-content: center; font-family: 'Oswald', sans-serif; font-size: 1.05rem; font-weight: 700; }
.project-upload { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; border: 1px dashed var(--border); border-radius: 8px; padding: 1rem; background: var(--code-bg); color: var(--text); cursor: pointer; text-align: center; }
.project-upload:hover { border-color: var(--gold); }
.project-upload > i { color: var(--gold); font-size: 2rem; }
.project-upload span { color: var(--text-muted); font-size: .8rem; }
.project-upload input { max-width: 100%; margin-top: .4rem; font-size: .78rem; }
.project-file-name { color: var(--gold); min-height: 1.2em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-payment-note { display: flex; gap: .75rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--gold) 60%, var(--border)); border-radius: 8px; background: color-mix(in srgb, var(--gold) 10%, var(--bg-card)); }
.project-payment-note > i { color: var(--gold); font-size: 1.2rem; }
.project-payment-note strong,
.project-payment-note span { display: block; }
.project-payment-note span { margin-top: .2rem; color: var(--text-muted); font-size: .88rem; }
.project-legal-box { padding: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--code-bg); }
.project-legal-box .form-check { padding-inline-start: 1.65rem; }
.project-legal-box .form-check-input { margin-inline-start: -1.65rem; }
.project-wizard-actions { display: flex; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.project-wizard-actions [data-wizard-next],
.project-wizard-actions [data-wizard-submit] { margin-inline-start: auto; }
.project-wizard-pane { min-width: 0; border: 0; padding: 0; margin: 0; }
.project-wizard-pane .form-control,
.project-wizard-pane .form-select { background-color: var(--bg-card); color: var(--text); }
.project-wizard-pane .form-floating > label { color: var(--text-muted); }
.project-wizard-pane .form-floating .form-control.is-invalid {
  padding-inline-end: 2.8rem;
}
[dir="rtl"] .project-wizard-pane .form-floating .form-control.is-invalid {
  padding-inline-start: 2.8rem;
  padding-inline-end: 0.75rem;
}
.project-wizard-pane .form-check-label { color: var(--text); font-size: .88rem; line-height: 1.55; }
.is-shaking { animation: project-shake .38s ease-in-out; }
@keyframes project-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@media (max-width: 767px) {
  .toast-container { inset-inline: 1rem !important; width: auto; }
  .project-request-section { padding: 2rem 0 2rem; }
  .project-wizard-card { padding: 1rem; }
  .project-stepper { grid-template-columns: 1fr; gap: .7rem; margin-bottom: 1.5rem; }
  .project-stepper::before { top: 23px; bottom: 23px; inset-inline-start: 22px; inset-inline-end: auto; width: 2px; height: auto; }
  .project-step { gap: .55rem; }
  .project-step small { font-size: .7rem; }
  .project-pane-title { gap: .65rem; margin-bottom: 1rem; }
  .project-pane-title > i { width: 38px; height: 38px; flex-basis: 38px; }
  .project-pane-title h2 { font-size: 1.15rem; }
  .project-service-label { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .project-wizard-actions { flex-direction: column-reverse; }
  .project-wizard-actions [data-wizard-next],
  .project-wizard-actions [data-wizard-submit],
  .project-wizard-actions [data-wizard-back] { width: 100%; margin-inline: 0; }
  .project-payment-note { align-items: flex-start; }
}

/* ─── Dashboard ──────────────────────────────── */
.dash-sidebar {
  width: 240px;
  background: var(--navy-deep);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: width .3s;
  overflow-x: hidden;
}
[dir="rtl"] .dash-sidebar { left: auto; right: 0; }
.dash-main { margin-left: 240px; transition: margin .3s; }
[dir="rtl"] .dash-main { margin-left: 0; margin-right: 240px; }

.dash-sidebar.collapsed { width: 64px; }
.dash-sidebar.collapsed + .dash-main { margin-left: 64px; }
[dir="rtl"] .dash-sidebar.collapsed + .dash-main { margin-right: 64px; }

.dash-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: .7rem 1rem;
  color: #8fa3c8;
  font-size: .9rem;
  transition: all .2s;
  white-space: nowrap;
}
.dash-nav-link:hover, .dash-nav-link.active {
  background: var(--gold);
  color: var(--navy-deep);
  border-radius: 6px;
}
.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dash-stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-stat-icon svg { width: 22px; height: 22px; color: var(--navy-deep); }
.dash-stat-val { font-family: 'Oswald', sans-serif; font-size: 1.6rem; color: var(--text); }
.dash-stat-lbl { font-size: .8rem; color: var(--text-muted); }
.logo-upload-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  height: 100%;
}
.logo-preview-frame {
  min-height: 110px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--code-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem;
  margin-bottom: .8rem;
}
.logo-preview-frame img {
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
}
.legal-textarea {
  min-height: 260px;
  line-height: 1.65;
}
.legal-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.legal-editor-head strong {
  display: block;
  color: var(--text);
  font-family: 'Oswald', sans-serif;
  letter-spacing: .02em;
}
.legal-editor-head span,
.legal-editor-source-help {
  color: var(--text-muted);
  font-size: .86rem;
}
.legal-icon-field {
  min-width: 220px;
}
.legal-editor-lang,
.legal-editor-clause {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt);
  padding: .85rem;
}
.legal-editor-lang-title {
  color: var(--text);
  font-weight: 700;
  font-size: .88rem;
  margin-bottom: .65rem;
}
.legal-editor-lang textarea:not(.legal-textarea) {
  min-height: 95px;
}
.legal-editor-source-help {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .25rem 0 .85rem;
}
.legal-editor-clause {
  margin-top: .85rem;
}
.legal-editor-clause summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-weight: 800;
}
.legal-editor-clause summary span {
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
}
.legal-editor-clause summary i {
  color: var(--gold);
}
.legal-editor-clause-meta {
  margin-top: .85rem;
  margin-bottom: .85rem;
}
.legal-editor-clause .legal-textarea {
  min-height: 150px;
}

.customer-account-photo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.customer-account-photo.is-large {
  width: 64px;
  height: 64px;
}
.customer-account-actions {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.customer-product-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  flex-wrap: wrap;
  max-width: 260px;
}
.icon-action {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color .2s, color .2s, background .2s;
}
.icon-action:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245,197,24,.08);
}
.icon-action.is-danger {
  color: #ef6b73;
}
.icon-action.is-success {
  color: #5dd39e;
}
.customer-account-modal {
  background: var(--bg-card);
  color: var(--text);
  max-height: calc(100vh - 1.5rem);
  overflow: hidden;
}
.customer-account-modal .modal-header,
.customer-account-modal .modal-footer {
  border-color: var(--border);
  background: transparent;
  flex: 0 0 auto;
}
.customer-account-modal .modal-body {
  color: var(--text);
  overflow-y: auto;
}
.customer-account-modal .modal-title,
.customer-account-modal .form-label,
.customer-account-modal .form-check-label,
.customer-account-modal small,
.customer-account-modal .form-text {
  color: var(--text);
}
.customer-account-modal .form-control,
.customer-account-modal .form-select,
.customer-account-modal textarea {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.customer-account-modal .form-control:focus,
.customer-account-modal .form-select:focus,
.customer-account-modal textarea:focus {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--gold);
  box-shadow: 0 0 0 .2rem rgba(245,197,24,.12);
}
.customer-account-modal .btn-close {
  filter: var(--modal-close-filter, none);
}
[data-theme="dark"] .customer-account-modal .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}
.dashboard-embedded-body {
  background: var(--bg);
  color: var(--text);
  min-height: auto;
}
.customer-account-embedded {
  background: transparent;
}
.license-admin-page {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding: clamp(.8rem, 1.4vw, 1.15rem);
}
.license-admin-page .dash-toolbar {
  align-items: flex-end;
  gap: .85rem;
  margin-bottom: .85rem;
}
.license-admin-page .dash-toolbar > div {
  min-width: 0;
}
.license-admin-page .section-label {
  margin-bottom: .2rem !important;
}
.license-admin-page .section-title {
  line-height: 1.05;
}
.license-admin-page .dash-toolbar p:last-child {
  max-width: 620px;
}
.license-admin-page .btn-marsh {
  flex: 0 0 auto;
  min-height: 38px;
  padding-block: .48rem;
}
.license-table-card {
  padding: .95rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(17,30,54,.08);
}
[data-theme="dark"] .license-table-card {
  box-shadow: 0 14px 32px rgba(0,0,0,.16);
}
.license-table {
  min-width: 860px;
}
.license-table thead th {
  padding: .72rem .85rem;
  white-space: nowrap;
  font-size: .78rem;
  letter-spacing: 0;
  vertical-align: middle;
  border-color: var(--border);
}
.license-table tbody td {
  padding: .78rem .85rem;
  vertical-align: middle;
  border-color: var(--border);
  color: var(--text);
}
.license-table tbody tr:last-child td {
  border-bottom-width: 0;
}
.license-table small {
  line-height: 1.45;
}
.license-table code {
  direction: ltr;
  display: inline-block;
  max-width: 180px;
  overflow-wrap: anywhere;
  text-align: left;
  color: #c92872;
}
[data-theme="dark"] .license-table code {
  color: #ff7ab6;
}
[dir="rtl"] .license-table code {
  direction: ltr;
  text-align: left;
}
@media (max-width: 767px) {
  .license-admin-page {
    padding: .75rem;
  }
  .license-admin-page .dash-toolbar {
    align-items: stretch;
  }
  .license-admin-page .dash-toolbar .btn-marsh {
    width: 100%;
    justify-content: center;
  }
  .license-table-card {
    padding: .7rem;
  }
}
.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 0;
}
.customer-detail-grid > div,
.customer-feature-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: .85rem;
}
.customer-detail-grid dt {
  color: var(--text-muted);
  font-size: .76rem;
  margin-bottom: .25rem;
}
.customer-detail-grid dd {
  color: var(--text);
  margin: 0;
  overflow-wrap: anywhere;
}
.customer-feature-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  height: 100%;
}
.customer-feature-card span {
  display: block;
  color: var(--text-muted);
  font-size: .82rem;
  margin-top: .15rem;
}
.customer-license-card {
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
}
.customer-license-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}
.customer-license-label {
  color: var(--text-muted);
  font-size: .78rem;
  margin-top: .75rem;
  margin-bottom: .3rem;
}
.customer-license-input {
  background-color: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  letter-spacing: .04em;
}
.customer-license-input:focus {
  background-color: var(--bg-card);
  border-color: var(--gold);
  color: var(--text);
  box-shadow: 0 0 0 .2rem rgba(245,197,24,.12);
}
.customer-license-help {
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.45;
  margin-top: .35rem;
}
.customer-license-check {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .75rem;
  padding-inline-start: 0;
}
.customer-license-check .form-check-input {
  margin: 0;
}
.license-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .85rem;
  align-items: stretch;
}
.license-detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: .85rem .95rem;
}
.license-detail-grid span {
  display: block;
  color: var(--text-muted);
  font-size: .76rem;
  line-height: 1.35;
}
.license-detail-grid strong,
.license-detail-grid code {
  display: block;
  color: var(--text);
  font-size: .95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.license-detail-grid code {
  direction: ltr;
  text-align: left;
  color: #d63384;
}
[data-theme="dark"] .license-detail-grid code {
  color: #ff7ab6;
}
[dir="rtl"] .customer-account-table,
[dir="rtl"] .customer-detail-grid,
[dir="rtl"] .customer-feature-card,
[dir="rtl"] .license-detail-grid {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .license-detail-grid code {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .form-control.is-invalid,
[dir="rtl"] .was-validated .form-control:invalid {
  background-position: left calc(.375em + .1875rem) center;
  padding-left: calc(1.5em + .75rem);
  padding-right: .75rem;
}
[dir="rtl"] textarea.form-control.is-invalid,
[dir="rtl"] .was-validated textarea.form-control:invalid {
  background-position: left calc(.375em + .1875rem) top .75rem;
}
[dir="rtl"] .form-select.is-invalid,
[dir="rtl"] .was-validated .form-select:invalid {
  background-position: left .75rem center, center left 2.25rem;
  padding-left: 4.125rem;
  padding-right: .75rem;
}
[dir="ltr"] .form-control.is-invalid,
[dir="ltr"] .was-validated .form-control:invalid {
  background-position: right calc(.375em + .1875rem) center;
}
[dir="rtl"] .modal-header .btn-close {
  margin: calc(-.5 * var(--bs-modal-header-padding-y)) auto calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x));
}

/* Customer portal is an authenticated application shell, not a public page. */
.customer-portal-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}
.customer-portal-app {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}
.customer-portal-sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: 1.15rem .85rem;
  background: var(--navy-deep);
  border-right: 1px solid var(--border);
}
.customer-portal-profile {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .75rem .55rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(143,163,200,.22);
  background: transparent;
  color: inherit;
  text-align: start;
}
.customer-portal-profile img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--bg-card);
}
.customer-avatar-initial,
.customer-photo-preview .customer-avatar-initial {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(245,197,24,.12);
  color: var(--gold);
  font-weight: 800;
}
.customer-portal-profile strong {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.customer-portal-profile strong { color: #fff; font-size: .9rem; line-height: 1.45; }
.customer-portal-profile > div { min-width: 0; flex: 1 1 auto; }
.customer-portal-menu-toggle { cursor: pointer; }
.customer-portal-menu-chevron { margin-inline-start: auto; font-size: .72rem; transition: transform .18s ease; }
.customer-portal-menu-toggle[aria-expanded="true"] .customer-portal-menu-chevron,
.customer-portal-nav-toggle[aria-expanded="true"] .customer-portal-menu-chevron { transform: rotate(180deg); }
.customer-portal-nav {
  display: grid;
  gap: .35rem;
}
.customer-portal-nav-group { min-width: 0; }
.customer-portal-nav a,
.customer-portal-nav-toggle {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 42px;
  width: 100%;
  padding: .65rem .75rem;
  color: #b4c3dd;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
  text-align: start;
  transition: background .18s, border-color .18s, color .18s;
}
.customer-portal-nav-toggle { cursor: pointer; }
.customer-portal-nav a > i:first-child,
.customer-portal-nav-toggle > i:first-child {
  width: 18px;
  text-align: center;
}
.customer-portal-nav a:hover,
.customer-portal-nav a.active {
  color: var(--navy-deep);
  border-color: var(--gold);
  background: var(--gold);
}
.customer-portal-nav-toggle:hover,
.customer-portal-nav-toggle[aria-expanded="true"] { color: #fff; background: rgba(143,163,200,.12); }
.customer-portal-subnav {
  display: none;
  gap: .28rem;
  margin: .2rem 0 .35rem;
  padding-inline-start: .7rem;
}
.customer-portal-subnav.is-open { display: grid; }
.customer-portal-subnav a { min-height: 36px; padding: .48rem .65rem; font-size: .83rem; }
.customer-profile-menu .customer-portal-subnav { padding: .25rem .4rem 0; }
.customer-portal-subnav a.active { color: var(--navy-deep); background: var(--gold); border-color: var(--gold); }
.customer-portal-logout {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(143,163,200,.22);
}
.customer-portal-logout .btn-marsh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.customer-portal-panel {
  min-width: 0;
  min-height: 100vh;
}
.customer-portal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  padding: .8rem 1.35rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.customer-portal-tools {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.customer-portal-tools .lang-select {
  width: auto;
  min-width: 118px;
  height: 38px;
}
.customer-portal-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
}
.customer-portal-content {
  padding: 1.35rem;
}
.customer-portal-section {
  display: none;
}
.customer-portal-section.is-active {
  display: block;
}
.customer-portal-section-head {
  margin-bottom: 1rem;
}
.customer-portal-section-head h2 {
  margin: 0;
  color: var(--text);
  font-family: Oswald, sans-serif;
  font-size: 1.55rem;
}
.customer-portal-section-head p {
  margin: .25rem 0 0;
  color: var(--text-muted);
  font-size: .88rem;
}
.customer-product-card small {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.customer-profile-card-head,
.customer-request-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.customer-profile-card-head img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--bg-card);
}
.customer-profile-card-head .customer-avatar-initial {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  font-size: 1.35rem;
}
.customer-photo-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
}
.customer-photo-preview {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
}
.customer-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.customer-photo-preview .customer-avatar-initial {
  width: 100%;
  height: 100%;
  border: 0;
}
.customer-profile-card-head span,
.customer-profile-details dt { color: var(--text-muted); font-size: .82rem; }
.customer-profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: 1.35rem 0 0;
}
.customer-profile-details > div {
  min-width: 0;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
}
.customer-profile-details dt { margin-bottom: .25rem; }
.customer-profile-details dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.customer-profile-card-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.customer-password-field { position: relative; }
.customer-password-field .form-control { padding-inline-end: 3.05rem; }
.customer-password-field > label { padding-inline-end: 3.05rem; }
.customer-password-toggle {
  position: absolute;
  z-index: 4;
  inset-inline-end: .55rem;
  top: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  transform: translateY(-50%);
}
.customer-password-toggle:hover { color: var(--gold); }
.customer-portal-modal { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.customer-portal-modal .modal-header,
.customer-portal-modal .modal-footer { border-color: var(--border); }
.customer-portal-modal .btn-close { filter: var(--modal-close-filter, none); }
[data-theme="dark"] .customer-portal-modal .btn-close { filter: invert(1) grayscale(1) brightness(2); }
[dir="rtl"] .customer-portal-app {
  grid-template-columns: minmax(0, 1fr) 270px;
}
[dir="rtl"] .customer-portal-sidebar {
  grid-column: 2;
  border-right: 0;
  border-left: 1px solid var(--border);
}
[dir="rtl"] .customer-portal-panel {
  grid-column: 1;
  grid-row: 1;
}
[dir="rtl"] .customer-portal-profile,
[dir="rtl"] .customer-portal-nav a,
[dir="rtl"] .customer-portal-nav-toggle,
[dir="rtl"] .customer-portal-topbar,
[dir="rtl"] .customer-portal-section,
[dir="rtl"] .customer-portal-modal {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .customer-portal-modal .modal-header {
  flex-direction: row-reverse;
}
[dir="rtl"] .customer-portal-modal .btn-close {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

@media (max-width: 767px) {
  .customer-portal-app,
  [dir="rtl"] .customer-portal-app {
    display: flex;
    flex-direction: column;
  }
  .customer-portal-sidebar,
  [dir="rtl"] .customer-portal-sidebar {
    min-height: auto;
    border: 0;
    border-bottom: 1px solid var(--border);
    padding: .75rem;
  }
  .customer-portal-profile { padding-bottom: .65rem; }
  .customer-portal-nav { gap: .25rem; }
  .customer-portal-nav a,
  .customer-portal-nav-toggle { min-height: 38px; padding: .5rem .6rem; font-size: .8rem; }
  .customer-portal-subnav { margin-bottom: .2rem; }
  .customer-portal-logout { display: block; margin-top: .15rem; padding-top: .75rem; }
  .customer-portal-topbar {
    min-height: 64px;
    padding: .65rem .8rem;
  }
  .customer-portal-topbar .section-label,
  .customer-portal-topbar .section-title {
    display: none;
  }
  .customer-portal-tools { margin-inline-start: auto; }
  .customer-portal-content { padding: .85rem; }
  .customer-profile-details { grid-template-columns: 1fr; }
  .customer-request-intro { align-items: flex-start; flex-direction: column; }
}

/* ─── Scroll animations ──────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .55s, transform .55s; }
.reveal.visible { opacity: 1; transform: none; }

/* ─── Utility ────────────────────────────────── */
.text-gold { color: var(--gold) !important; }
.bg-navy   { background: var(--navy) !important; }
.border-gold { border-color: var(--gold) !important; }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 991px) {
  .mega-menu { min-width: 90vw; }
  .mega-menu-rich { display: none !important; }
  .brand-lockup span { font-size: .9rem; }
  .dash-sidebar { width: 64px; }
  .dash-sidebar .nav-label { display: none; }
  .dash-main { margin-left: 64px; }
}
/* ─── Persian and Arabic typography ──────────────────────────────── */
/* Keep every UI control consistent when the document language changes. */
html[lang="fa"] body *,
html[lang="ar"] body * {
  font-family: 'Vazirmatn', 'Inter', sans-serif !important;
  letter-spacing: normal;
}

/* Code and editor source views should remain monospaced. */
html[lang="fa"] body :is(pre, pre *, code, code *, kbd, samp),
html[lang="ar"] body :is(pre, pre *, code, code *, kbd, samp) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace !important;
}

@media (max-width: 767px) {
  .marsh-section { padding: 3rem 0; }
  .marsh-section.project-request-section { padding: 2rem 0 2rem; }
  #home-hero { min-height: auto; padding: 3rem 0; }
  .dash-sidebar { display: none; }
  .dash-main { margin-left: 0 !important; margin-right: 0 !important; }
  .vscode-window { font-size: .72rem; }
  .brand-lockup img { height: 64px; max-width: 280px; }
  .footer-brand img { height: 80px; max-width: 290px; }
  .brand-lockup span { max-width: 280px; white-space: normal; line-height: 1.05; }
  .footer-bottom-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .footer-copy { text-align: center; }
  .footer-legal-links-end { justify-content: center; }
  .footer-bottom-divider {
    display: block;
    height: 1px;
    width: 100%;
    background: #2e4070;
  }
  .subscribe-form { flex-direction: column; }
  .legal-page-hero { padding: 3rem 0; }
  .legal-hero-grid { grid-template-columns: 1fr; }
  .legal-hero-icon { width: 92px; height: 92px; }
  .legal-hero-icon i { font-size: 2.7rem; }
  .legal-editor-head { flex-direction: column; }
  .legal-icon-field { width: 100%; min-width: 0; }
  .customer-detail-grid { grid-template-columns: 1fr; }
  .customer-feature-card { align-items: stretch; flex-direction: column; }
  .legal-toc { position: static; }
  .legal-section-card { grid-template-columns: 1fr; }
  .legal-section-number { width: 64px; }
  .legal-source-grid { grid-template-columns: 1fr; }
}
