/* ======================================================================
   FanaGaam — Final Release Hardening Layer
   Local typography, PDF pagination, chart clipping and mobile safeguards.
   This file is loaded after the approved base, branding and quality layers.
   ====================================================================== */

/* Locally bundled Inter family — SIL Open Font License 1.1.
   The font files and license notice are included in project/fonts/. */
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-SemiBold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-ExtraBold.otf") format("opentype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

/* Vazirmatn Variable — Local Persian Font */

@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn[wght].woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

html.fg-lang-en,
html.fg-lang-en body,
html.fg-lang-en body *:not(code):not(pre):not(.mono):not(.font-mono) {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif !important;
  font-variant-numeric: lining-nums tabular-nums;
}
html.fg-lang-en code,
html.fg-lang-en pre,
html.fg-lang-en .mono,
html.fg-lang-en .font-mono {
  font-family: "Cascadia Code", "JetBrains Mono", Consolas, monospace !important;
}

/* Public footer: keep the exact institutional wording readable in both locales. */
.public-footer-complex .footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.public-footer-complex .public-footer-org {
  color: var(--text-1);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.8;
  text-align: start;
}
.public-footer-complex .footer-copy {
  line-height: 1.8;
  unicode-bidi: isolate;
}
html.fg-lang-en .public-footer-complex .footer-bottom-content {
  direction: ltr;
}
@media (max-width: 767px) {
  .public-footer-complex .footer-bottom-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .public-footer-complex .public-footer-org,
  .public-footer-complex .footer-copy {
    text-align: center;
  }
}

/* Radar chart: keep long labels inside the card and don't clip the SVG viewport. */
.radar-chart-card {
  min-width: 0;
  overflow: visible !important;
}
.radar-chart-card > div,
.radar-chart-card .radar-svg {
  overflow: visible !important;
}
.radar-chart-card .radar-svg {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-inline: auto;
}
.radar-data-note {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border: 1px solid #A8B9C1;
  border-radius: 10px;
  background: #F0F5F6;
  color: #334955;
  font-size: 12px;
  line-height: 1.8;
  font-weight: 700;
}
html[data-theme="dark"] .radar-data-note {
  border-color: #45616C;
  background: #122A35;
  color: #C8D8DE;
}

/* Mobile title and sidebars: preserve words, avoid overlap, keep every item reachable. */
@media (max-width: 767px) {
  .view-header { min-width: 0; flex-wrap: wrap; gap: 10px; }
  .view-header > * { min-width: 0; }
  .view-title {
    max-width: 100%;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
    hyphens: none;
    line-height: 1.55;
    text-wrap: balance;
  }
  #sideNavMain,
  #sideNavProject {
    box-sizing: border-box;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    scrollbar-width: none;
  }
  #sideNavMain::-webkit-scrollbar,
  #sideNavProject::-webkit-scrollbar { width: 0; height: 0; }
  #sideNavMain .drawer-header-mobile,
  #sideNavProject .drawer-header-mobile {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg-2);
  }
  #sideNavMain .nav-item,
  #sideNavProject .nav-item { min-height: 42px; }
  .profile-activity-item {
    min-width: 0;
    align-items: flex-start;
    gap: 10px;
  }
  .profile-activity-item > svg { flex: 0 0 16px; margin-top: 4px; }
  .profile-activity-body {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .profile-activity-title { line-height: 1.7; overflow-wrap: anywhere; }
  .activity-delete { z-index: 2; }
}

/* Print/PDF: keep the result value stable, remove all fake caret/stripe artifacts. */
@media print {
  * { caret-color: transparent !important; }
  html, body {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    background: #fff !important;
  }
  html.fg-lang-en,
  html.fg-lang-en body,
  html.fg-lang-en body *:not(code):not(pre):not(.mono):not(.font-mono) {
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  }
  html.fg-lang-fa,
  html.fg-lang-fa body,
  html.fg-lang-fa body *:not(code):not(pre):not(.mono):not(.font-mono) {
    font-family: "Vazirmatn", system-ui, sans-serif !important;
  }
  .result-hero::before,
  .result-hero::after,
  .trl-gauge-number::before,
  .trl-gauge-number::after {
    display: none !important;
    content: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .result-hero { border-inline-start: 0 !important; }
  .trl-gauge-number,
  #resultTrlNumber {
    color: #142B3B !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #142B3B !important;
    text-shadow: none !important;
    caret-color: transparent !important;
    cursor: default !important;
    outline: none !important;
    border: 0 !important;
  }
  .print-extended-report,
  #printExtendedReport { overflow: visible !important; }
  .print-section {
    page-break-inside: auto !important;
    break-inside: auto !important;
    overflow: visible !important;
  }
  .print-section::before { display: none !important; content: none !important; }
  .print-section-title {
    page-break-after: avoid !important;
    break-after: avoid-page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .print-subsection-title {
    page-break-after: avoid !important;
    break-after: avoid-page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .print-question-card {
    page-break-inside: avoid !important;
    break-inside: avoid-page !important;
    overflow: visible !important;
  }
  .print-question-header,
  .print-question-answer,
  .print-interpretation,
  .print-evidence-line {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .print-subsection-title + .print-question-card {
    page-break-before: avoid !important;
    break-before: avoid-page !important;
  }
  .radar-chart-card,
  .radar-chart-card .radar-svg,
  .radar-chart-card > div {
    overflow: visible !important;
  }
  .radar-chart-card .radar-svg {
    width: 100% !important;
    max-width: 400pt !important;
    height: auto !important;
    margin: 0 auto 16pt !important;
  }
.radar-chart-card .radar-svg text {
    font-family: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif !important;
    font-size: 11pt !important;
    font-weight: 800 !important;
}
  .radar-data-note { color: #334955 !important; background: #F0F5F6 !important; }
  .print-header,
  .print-section,
  .print-question-card,
  .criterion-row,
  .metric-card {
    box-shadow: none !important;
  }
}

/* Final print overlay guard.
   Legacy .modal-backdrop.open uses !important after the generic print rule;
   this later, more-specific rule prevents welcome/auth/notification overlays
   from being repeated on every PDF page. */
@media print {
  html body .modal-backdrop,
  html body .modal-backdrop.open,
  html body .modal-backdrop.open .modal,
  html body .stage-intro-backdrop,
  html body .stage-intro-backdrop.open,
  html body .local-workspace-backdrop,
  html body .local-workspace-backdrop.open,
  html body #welcomeModal,
  html body #welcomeModal.open,
  html body #localWorkspaceModal,
  html body #stageIntroModal,
  html body #aiChatPanel,
  html body #aiChatTrigger,
  html body .ai-chat-panel,
  html body .ai-chat-trigger,
  html body .toast-container,
  html body .notif-panel,
  html body .mobile-drawer-backdrop,
  html body .tour-overlay,
  html body .cmd-palette {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html.modal-open,
  body.modal-open,
  body.scroll-locked {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* Remove the detached global print header. The report cover and result hero
   already carry their own branded headings; printing this standalone header
   before a keep-together result hero created an otherwise blank A4 page. */
@media print {
  html body > .print-header,
  html body .print-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
}

/* Do not emit a trailing empty sheet after the last section of long bilingual reports. */
@media print {
  #view-result,
  #printExtendedReport,
  #printExtendedReport > .print-section:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  #printExtendedReport > .print-section:last-child {
    margin-bottom: 0 !important;
  }
}

/* A legacy comparison-table pagination rule applies to its hidden view as
   well. Neutralize that forced break in print; otherwise Chromium can append
   a completely blank page after the final report section. */
@media print {
  html body #view-compare .card:has(.comparison-table) {
    display: none !important;
    page-break-before: auto !important;
    break-before: auto !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }
}

/* The application layout reserves 130px for floating/mobile controls on
   screen. That reserved screen-only space must not be carried into print,
   where it can spill onto an otherwise empty trailing A4 page. */
@media print {
  html body .app-layout {
    padding-bottom: 0 !important;
  }
}

/* ================================================================
   Accessibility contrast hardening — WCAG AA text contrast
   Preserve status surfaces; adjust only foreground colors.
   ================================================================ */
[data-theme="light"] .badge-has-data {
  color: #065F46 !important;
}
[data-theme="dark"] .badge-has-data {
  color: #6EE7B7 !important;
}

/* Selected answer states: white text on bright success/warning/danger
   fills fell below 4.5:1. Dark ink preserves the color-coded meanings. */
.q-answers-vertical .ans-btn.ans-achieved.active {
  color: #003D2B !important;
}
.q-answers-vertical .ans-btn.ans-partial.active {
  color: #422006 !important;
}
.q-answers-vertical .ans-btn.ans-not-achieved.active {
  color: #0F172A !important;
}
/* Slate N/A passes at 4.76:1 with its current white foreground. Keep it explicit. */
.q-answers-vertical .ans-btn.ans-na.active {
  color: #FFFFFF !important;
}
/* The brand state changes by theme. */
[data-theme="light"] .q-answers-vertical .ans-btn.ans-unknown.active {
  color: #FFFFFF !important;
}
[data-theme="dark"] .q-answers-vertical .ans-btn.ans-unknown.active {
  color: #081522 !important;
}


/* ======================================================================
   FanaGaam — Final Public Navigation + Lighter Internal Geometry
   Approved follow-up: anchored landing navigation and quieter workspace.
   ====================================================================== */
.fg-landing .fg-topbar {
  width: min(1320px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(12px, 1.8vw, 26px);
  row-gap: 9px;
  padding-block: 8px;
}
.fg-section-nav {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 16%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, var(--bg-2) 76%, transparent);
  box-shadow: 0 5px 18px rgba(20, 43, 59, .045);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fg-section-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--text-1);
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.fg-section-nav a:hover {
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 8%, var(--bg-2));
}
.fg-section-nav a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 58%, transparent);
  outline-offset: 2px;
  color: var(--text-0);
}
.fg-section-nav a:active { background: color-mix(in srgb, var(--brand-primary) 13%, var(--bg-2)); }
html.fg-lang-en .fg-section-nav { direction: ltr; }
html.fg-lang-en .fg-section-nav a { font-size: 12px; }
.fg-landing #publicAbout,
.fg-landing #publicMethod,
.fg-landing #publicCriteria,
.fg-landing #publicPreview,
.fg-landing #publicFaq {
  scroll-margin-top: 50px;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 980px) {
  .fg-landing #publicAbout,
  .fg-landing #publicMethod,
  .fg-landing #publicCriteria,
  .fg-landing #publicPreview,
  .fg-landing #publicFaq {
    scroll-margin-top: 5px;
  }
}

@media (max-width: 980px) {
  .fg-landing .fg-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    padding-block: 9px 7px;
  }

  .fg-section-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
    justify-content: center;

    /* Increased vertical separation on responsive layouts. */
    margin-top: 32px !important;
  }
}

/* ============================================================
   RESPONSIVE NAVIGATION — CENTERED LAST ROW
   First row: three evenly spaced links.
   Second row: two links centered as a group.
   Narrow phones: two-column layout with centered last item.
   ============================================================ */

@media (max-width: 720px) {

  .fg-landing .fg-topbar {
    column-gap: 8px;
    row-gap: 7px;
  }

  .fg-section-nav {
    width: 100%;
    max-width: 100%;

    display: grid;

    /* Three equal columns, represented by six tracks. */
    grid-template-columns: repeat(6, minmax(0, 1fr));

    align-items: stretch;
    justify-content: stretch;

    gap: 4px;
    padding: 5px;

    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;

    scroll-snap-type: none;
    box-sizing: border-box;
  }

  .fg-section-nav a {
    min-width: 0;
    min-height: 38px;

    /* Each link occupies one third of the navigation width. */
    grid-column: span 2;

    padding: 7px 8px;

    font-size: 11.5px;
    line-height: 1.35;

    white-space: normal;
    text-align: center;

    overflow-wrap: anywhere;
    word-break: normal;

    box-sizing: border-box;
  }

  /* Center the two links in the second row. */
  .fg-section-nav a:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .fg-section-nav a:nth-child(5) {
    grid-column: 4 / span 2;
  }

  html.fg-lang-en .fg-section-nav a {
    font-size: 11px;
  }
}

/* Narrow phones: two columns and a centered final link. */
@media (max-width: 390px) {

  .fg-section-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .fg-section-nav a {
    grid-column: span 2;
    padding-inline: 7px;
    font-size: 10.8px;
  }

  /* Reset the fourth link to normal grid placement. */
  .fg-section-nav a:nth-child(4) {
    grid-column: auto;
  }

  /* Center the fifth link on its own row. */
  .fg-section-nav a:nth-child(5) {
    grid-column: 2 / span 2;
  }

  html.fg-lang-en .fg-section-nav a {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fg-section-nav a {
    transition: none !important;
  }
}

/* ======================================================================
   FINAL CLIENT DELIVERY POLISH — 12 Nov 2026
   Fixed geometry, accessible evidence selection, bilingual inputs and charts.
   ====================================================================== */

/* Screening options: one stable card height per viewport, independent of text length. */
.screening-options-column .option-item {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: start !important;
  height: 154px !important;
  min-height: 154px !important;
  max-height: 154px !important;
  box-sizing: border-box !important;
  padding: 18px 22px !important;
  gap: 14px !important;
  margin: 0 0 12px !important;
  overflow: visible !important;
}
.screening-options-column .option-dot {
  grid-column: 1;
  grid-row: 1;
  align-self: start !important;
  justify-self: start;
  margin: 2px 0 0 !important;
}
.screening-options-column .option-body {
  grid-column: 2;
  grid-row: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
}
.screening-options-column .option-letter {
  align-self: flex-start !important;
  width: 100% !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  line-height: 1.35 !important;
  text-align: start !important;
}
html[dir="rtl"] .screening-options-column .option-letter { text-align: right !important; }
html[dir="ltr"] .screening-options-column .option-letter { text-align: left !important; }
.screening-options-column .option-text {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  text-align: center !important;
  line-height: 1.65 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
@media (max-width: 767px) {
  .screening-options-column .option-item {
    height: 178px !important;
    min-height: 178px !important;
    max-height: 178px !important;
    padding: 16px 15px !important;
    grid-template-columns: 26px minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  .screening-options-column .option-text { font-size: 12.5px !important; line-height: 1.65 !important; }
}
@media (max-width: 380px) {
  .screening-options-column .option-item {
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    padding-inline: 12px !important;
  }
  .screening-options-column .option-text { font-size: 12px !important; }
}

/* Shared TRL evidence: modest icon sizes and a clearly bounded upload action. */
.trl-evidence-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas: "icon content" "drop drop";
  align-items: start;
  gap: 12px 14px;
  margin: 22px 0 26px;
  padding: 20px;
  border: 1px solid var(--line-bright);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--bg-2), color-mix(in srgb, var(--brand-primary) 4%, var(--bg-2)));
  box-shadow: 0 8px 24px rgba(20,43,59,.06);
  min-width: 0;
}
.trl-evidence-card-icon {
  grid-area: icon;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, var(--line));
  border-radius: 13px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 9%, var(--bg-2));
}
.trl-evidence-card-icon svg { display: block; width: 22px !important; height: 22px !important; max-width: 22px; max-height: 22px; }
.trl-evidence-card-content { grid-area: content; min-width: 0; }
.trl-evidence-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-width: 0; }
.trl-evidence-card-heading h3 { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-0); font-weight: 900; }
.trl-evidence-card-content > p { margin: 7px 0 0; color: var(--text-1); font-size: 12.5px; line-height: 1.85; font-weight: 650; }
.trl-evidence-status { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; line-height: 1.4; font-weight: 850; white-space: nowrap; border: 1px solid transparent; }
.trl-evidence-status.is-recorded { color: #08764D; background: #E8F7EF; border-color: #B7E4CA; }
.trl-evidence-status.is-required { color: #9A3412; background: #FFF2E8; border-color: #F3C6A5; }
.trl-evidence-status.is-optional { color: var(--text-1); background: var(--bg-3); border-color: var(--line); }
.trl-evidence-file { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-3); min-width: 0; }
.trl-evidence-file strong { color: var(--text-0); font-size: 12px; }
.trl-evidence-file span { color: var(--text-1); font-size: 11.5px; overflow-wrap: anywhere; }
.trl-evidence-file small { color: var(--text-2); font-size: 10.5px; }
.trl-evidence-dropzone {
  grid-area: drop;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border: 1.5px dashed color-mix(in srgb, var(--brand-primary) 48%, var(--line-bright));
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-primary) 5%, var(--bg-2));
}
.trl-evidence-dropzone-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 12%, var(--bg-2)); }
.trl-evidence-dropzone-icon svg { display: block; width: 21px !important; height: 21px !important; max-width: 21px; max-height: 21px; }
.trl-evidence-dropzone-copy { display: grid; gap: 3px; min-width: 0; }
.trl-evidence-dropzone-copy strong { color: var(--text-0); font-size: 12.5px; line-height: 1.5; font-weight: 900; }
.trl-evidence-dropzone-copy span { color: var(--text-1); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.trl-evidence-upload-btn { min-height: 40px; padding: 9px 16px !important; white-space: nowrap; box-shadow: 0 5px 14px color-mix(in srgb, var(--brand-primary) 18%, transparent); }
.trl-evidence-card.has-evidence .trl-evidence-dropzone { border-style: solid; border-color: rgba(22,130,83,.35); background: rgba(22,130,83,.045); }
html[data-theme="dark"] .trl-evidence-status.is-recorded { color: #9AE6B4; background: rgba(22,130,83,.17); border-color: rgba(74,222,128,.28); }
html[data-theme="dark"] .trl-evidence-status.is-required { color: #FDBA8C; background: rgba(194,65,12,.15); border-color: rgba(251,146,60,.28); }
@media (max-width: 640px) {
  .trl-evidence-card { grid-template-columns: 40px minmax(0,1fr); gap: 10px; padding: 15px; }
  .trl-evidence-card-icon { width: 38px; height: 38px; }
  .trl-evidence-card-icon svg { width: 20px !important; height: 20px !important; }
  .trl-evidence-card-heading h3 { font-size: 14px; }
  .trl-evidence-dropzone { grid-template-columns: 34px minmax(0,1fr); padding: 12px; gap: 9px; }
  .trl-evidence-dropzone-icon { width: 34px; height: 34px; }
  .trl-evidence-upload-btn { grid-column: 1 / -1; width: 100%; }
}

/* Login and recovery fields: a slightly roomier card, with visibly Western glyphs in every field. */
#authScreen .auth-card { width: min(100%, 460px) !important; padding: 24px 30px 20px !important; }
#authScreen .auth-input,
#authUsername,
#authPassword,
#forgotPassInput,
#forgotRecoveryCode,
#newPasswordInput,
#confirmPasswordInput {
  direction: ltr !important;
  unicode-bidi: plaintext !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-variant-numeric: lining-nums tabular-nums !important;
  font-feature-settings: "lnum" 1, "tnum" 1 !important;
  letter-spacing: .01em;
}
#authScreen .auth-input { min-height: 46px; font-size: 14px; }
#forgotRecoveryCode { text-align: center !important; }
@media (max-width: 480px) {
  #authScreen .auth-card { width: 100% !important; padding: 20px 22px 18px !important; }
}
@media (max-height: 650px) {
  #authScreen .auth-card { padding-top: 14px !important; padding-bottom: 12px !important; }
  #authScreen .auth-input { min-height: 40px; }
}

/* The completion metric uses the same violet identity in its hint and its progress fill. */
#metricCompleteness.tooltip::after {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%) !important;
  border: 1px solid rgba(196,181,253,.72) !important;
  color: #FFFFFF !important;
  box-shadow: 0 16px 32px rgba(76,29,149,.32) !important;
}
#metricCompleteness.tooltip::before { border-bottom-color: #5B21B6 !important; }
#metricCompleteness .metric-bar-completion { background: linear-gradient(90deg, #8B5CF6, #6D28D9) !important; }

/* Radar: render real-data sectors as filled wedges when some criteria are still missing. */
.radar-partial-area { fill: url(#radarFill); stroke: none; opacity: .92; pointer-events: none; }
.radar-partial-segment { stroke: var(--brand-primary); stroke-width: 2.6; stroke-linecap: round; opacity: .95; vector-effect: non-scaling-stroke; }
html[data-theme="dark"] .radar-partial-area { opacity: .82; }

/* Trend tooltip: dedicated header row reserves a fixed space for the close control. */
.trend-tooltip {
  width: min(380px, calc(100vw - 24px)) !important;
  min-width: min(330px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  padding: 16px 18px !important;
  border-radius: 17px !important;
  line-height: 1.7 !important;
  box-sizing: border-box !important;
}
.trend-tooltip-header {
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.trend-tooltip-title {
  display: flex !important;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--text-0);
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.trend-tooltip-title svg { width: 19px !important; height: 19px !important; flex: 0 0 19px; }
.trend-tooltip-close {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 32px !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  border-radius: 9px !important;
  background: color-mix(in srgb, var(--brand-primary) 8%, var(--bg-2)) !important;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 24%, var(--line)) !important;
  color: var(--brand-primary) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  cursor: pointer;
}
.trend-tooltip-close:hover { background: color-mix(in srgb, var(--brand-primary) 16%, var(--bg-2)) !important; color: var(--text-0) !important; }
.trend-tooltip-row {
  display: grid !important;
  grid-template-columns: minmax(100px, 34%) minmax(0,1fr);
  align-items: start !important;
  gap: 12px !important;
  padding: 8px 0 !important;
  margin: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.7 !important;
}
.trend-tooltip-row > span:first-child { color: var(--text-1); font-weight: 800; }
.trend-tooltip-value {
  min-width: 0;
  text-align: start;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  font-size: 13px !important;
  line-height: 1.7 !important;
}
@media (max-width: 520px) {
  .trend-tooltip {
    width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    padding: 14px !important;
  }
  .trend-tooltip-row { grid-template-columns: minmax(82px, 34%) minmax(0,1fr); gap: 9px !important; font-size: 12px !important; }
  .trend-tooltip-title { font-size: 13px !important; }
}
/* Keep the entry animation from overriding the inline horizontal centering on mobile. */
.trend-tooltip { animation: trend-tooltip-fade-in .16s ease-out both !important; }
@keyframes trend-tooltip-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .trend-tooltip { animation: none !important; } }

/* Project identity: the original emblem remains untouched inside a geometric hexagonal tile. */
.project-card-icon {
  position: relative !important;
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 0 !important;
  clip-path: polygon(24% 2%, 76% 2%, 98% 50%, 76% 98%, 24% 98%, 2% 50%);
  background: linear-gradient(145deg, #E9F5F5 0%, #D5E9E9 54%, #F5FAFA 100%) !important;
  box-shadow: 0 7px 18px rgba(8,126,131,.16) !important;
}
.project-card-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  clip-path: polygon(24% 2%, 76% 2%, 98% 50%, 76% 98%, 24% 98%, 2% 50%);
  border: 1px solid rgba(8,126,131,.28);
  background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(8,126,131,.04));
  z-index: 0;
}
.project-card-icon img {
  position: relative;
  z-index: 1;
  display: block;
  width: 31px !important;
  height: 31px !important;
  object-fit: contain !important;
  filter: none !important;
}
html[data-theme="dark"] .project-card-icon { background: linear-gradient(145deg,#173F4A,#102B36 58%,#1D4A55) !important; box-shadow: 0 7px 18px rgba(0,0,0,.24) !important; }
html[data-theme="dark"] .project-card-icon::before { border-color: rgba(105,222,214,.30); background: linear-gradient(145deg,rgba(255,255,255,.08),rgba(66,197,192,.08)); }

/* Notification count sits between the bell and its label, shifted slightly left
   with balanced spacing on both sides (works in RTL and LTR). */
.nav-notifications { direction: inherit; gap: 8px !important; }
.nav-notifications > .nav-icon { order: 0 !important; flex: 0 0 20px !important; }
.nav-notifications > span:not(.notif-badge-sidebar) { order: 2 !important; }
.nav-notifications .notif-badge-sidebar {
  order: 1 !important;
  margin-inline: 0 !important;
  transform: translateX(-1px) !important;
  flex: 0 0 auto !important;
}
@media (max-width: 767px) {
  .nav-notifications { gap: 7px !important; }
  .nav-notifications .notif-badge-sidebar { transform: translateX(-1px) !important; }
}


/* Final employer feedback — 12 Nov 2026. */
/* Shared evidence is a required checkpoint for every TRL section. */
.trl-evidence-card.evidence-required {
  border-color: color-mix(in srgb, #C66B27 42%, var(--line-bright));
  background: linear-gradient(145deg, var(--bg-2), color-mix(in srgb, #D97706 3.5%, var(--bg-2)));
}
.trl-evidence-card .trl-evidence-status.is-required {
  color: #8A3B12;
  background: #FFF3E8;
  border-color: #EFC8A8;
}
.trl-evidence-card .trl-evidence-dropzone {
  background: color-mix(in srgb, var(--brand-primary) 3.5%, var(--bg-2));
  border-style: dashed;
}
html[data-theme="dark"] .trl-evidence-card .trl-evidence-status.is-required {
  color: #FED7AA;
  background: rgba(194,65,12,.18);
  border-color: rgba(251,146,60,.36);
}

/* The project emblem sits directly on the card's neutral surface — no hexagon tile. */
.project-card-icon {
  clip-path: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.project-card-icon::before { content: none !important; display: none !important; }
.project-card-icon img {
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  object-fit: contain !important;
  background: transparent !important;
  filter: none !important;
}
html[data-theme="dark"] .project-card-icon,
html[data-theme="light"] .project-card-icon {
  background: transparent !important;
  box-shadow: none !important;
}

/* English assessment option descriptions must start at the left edge on every wrapped line. */
html[lang="en"] .screening-options-column .option-text {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext !important;
  width: 100%;
  align-self: stretch;
}

/* Keep the bell at the RTL start, then the label, then the unread count at the far left. */
.nav-notifications { gap: 8px !important; }
.nav-notifications > .nav-icon { order: 0 !important; flex: 0 0 20px !important; }
.nav-notifications > span:not(.notif-badge-sidebar) { order: 1 !important; }
.nav-notifications .notif-badge-sidebar {
  order: 2 !important;
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
  flex: 0 0 auto !important;
}
@media (max-width: 767px) {
  .nav-notifications { gap: 7px !important; }
}

/* Ensure each real trend event stays represented by a distinct SVG circle. */
.trend-point {
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
  stroke-width: 2.6;
}
html[lang="en"] .screening-options-column .option-text { text-align: left !important; }

/* Final notification layout: RTL uses the far-left badge requested by the client;
   English retains a natural LTR row and is not forced into RTL. */
/* Bell + label stay together; unread count moves to the far inline end. */
.nav-notifications {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.nav-notifications > .nav-icon {
  order: 0 !important;
  flex: 0 0 20px !important;
}
.nav-notifications > span:not(.notif-badge-sidebar) {
  order: 1 !important;
  flex: 0 1 auto !important;
  white-space: nowrap;
}
.nav-notifications .notif-badge-sidebar {
  order: 2 !important;
  flex: 0 0 auto !important;
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
  align-self: center !important;
  transform: none !important;
}
html[dir="rtl"] .nav-notifications { direction: rtl !important; }
html[dir="ltr"] .nav-notifications { direction: ltr !important; }
/* Final balanced trend tooltip density */
.trend-tooltip {
  width: min(356px, calc(100vw - 28px)) !important;
  padding: 13px 15px !important;
  border-radius: 16px !important;
}
.trend-tooltip-header {
  gap: 12px !important;
  padding-bottom: 10px !important;
  margin-bottom: 7px !important;
}
.trend-tooltip-row {
  gap: 10px !important;
  padding: 6px 0 !important;
  line-height: 1.6 !important;
}
.trend-tooltip-value {
  line-height: 1.6 !important;
}
@media (max-width: 520px) {
  .trend-tooltip {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 12px !important;
  }
  .trend-tooltip-row { gap: 8px !important; }
}
/* Equal-height option cards: rows share the tallest option's required height. */
.screening-options-column .options-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: 1fr !important;
  align-items: stretch !important;
  gap: 10px !important;
}
.screening-options-column .option-item {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
  height: auto !important;
  min-height: 140px !important;
  max-height: none !important;
  padding: 14px 18px !important;
  margin: 0 !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
.screening-options-column .option-dot {
  grid-column: 1;
  grid-row: 1;
  align-self: start !important;
  justify-self: start !important;
  margin: 0 !important; /* فاصله اضافه حذف شد */
}
.screening-options-column .option-body {
  grid-column: 2;
  grid-row: 1;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 12px !important; /* فاصله بین عنوان و متن بیشتر شد */
}
.screening-options-column .option-letter {
  align-self: flex-start !important;
  width: 100% !important;
  text-align: start !important;
  margin-top: 3px !important; /* هم‌ترازی دقیق با دایره */
  margin-bottom: 0 !important;
  line-height: 1.4 !important;
}
html[dir="rtl"] .screening-options-column .option-letter { text-align: right !important; }
html[dir="ltr"] .screening-options-column .option-letter { text-align: left !important; }
.screening-options-column .option-text {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-align: center !important;
}
html[lang="en"] .screening-options-column .option-text {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext !important;
}
@media (max-width: 767px) {
  .screening-options-column .option-item {
    grid-template-columns: 26px minmax(0, 1fr) !important;
    min-height: 152px !important;
    padding: 13px 14px !important;
    gap: 9px !important;
  }
  .screening-options-column .option-text { font-size: 12.5px !important; }
}
@media (max-width: 380px) {
  .screening-options-column .option-item {
    min-height: 164px !important;
    padding-inline: 11px !important;
  }
  .screening-options-column .option-text { font-size: 12px !important; }
}
.fg-secondary-cta,
#screeningPrevBtn,
#screeningNextBtn,
.auth-back-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 0 !important;
}
.public-footer-complex .public-footer-org {
  position: relative;
  padding-inline-end: 18px;
}
.public-footer-complex .public-footer-org::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: -7px;
  bottom: -7px;
  width: 1px;
  background: var(--line-bright, var(--line));
  opacity: .9;
}
@media (max-width: 767px) {
  .public-footer-complex .public-footer-org { padding-inline-end: 0; }
  .public-footer-complex .public-footer-org::after { display: none; }
}
.project-card,
.shortcut-modal-item,
.shortcut-modal-item * {
  opacity: 1 !important;
  filter: none;
  -webkit-filter: none;
}
.project-card:hover,
.project-card:focus-visible {
  opacity: 1 !important;
  filter: none !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 26px rgba(20,43,59,.10) !important;
}
.project-card:hover .project-card-title,
.project-card:hover .project-card-desc,
.project-card:hover .project-card-meta,
.project-card:hover .status-badge {
  opacity: 1 !important;
  filter: none !important;
}
.shortcut-modal-item:hover,
.shortcut-modal-item:focus-visible {
  opacity: 1 !important;
  filter: none !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(20,43,59,.09) !important;
}
.shortcut-modal-item:hover .shortcut-modal-icon {
  transform: none !important;
  filter: none !important;
}
.shortcut-modal-item:hover .shortcut-modal-icon svg {
  filter: none !important;
}
.info-note {
  align-items: center !important;
}
.info-note-icon {
  align-self: center !important;
  margin-top: 0 !important;
  flex: 0 0 34px !important;
}
.info-note-text {
  min-width: 0;
  align-self: center !important;
}


/* ============================================================
   AMENDMENT 32
   DELETE PROJECT MODAL — MOBILE SCROLL FIX
   ============================================================ */

@media (max-width: 767px) {

  #deleteProjectModal.modal-backdrop.open {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow: hidden !important;

    padding: max(8px, env(safe-area-inset-top, 0px)) 0 0 !important;

    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: auto !important;
  }

  #deleteProjectModal .modal-confirm {
    box-sizing: border-box !important;

    display: flex !important;
    flex: 0 1 auto !important;
    flex-direction: column !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    max-height: calc(100vh - 12px) !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px) !important;

    margin: 0 !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;

    touch-action: pan-y;
    scrollbar-gutter: stable;
  }

  /* تمام بخش‌های محتوا باید در جریان عادی پنجره قرار بگیرند. */
  #deleteProjectModal .confirm-hero,
  #deleteProjectModal .delete-project-card,
  #deleteProjectModal .delete-project-warn,
  #deleteProjectModal .confirm-list {
    flex: 0 0 auto !important;
  }

  /* حذف اسکرول داخلی تو در تو */
  #deleteProjectModal .confirm-list {
    min-height: auto !important;
    max-height: none !important;

    overflow: visible !important;

    overscroll-behavior: auto !important;
    -webkit-overflow-scrolling: auto !important;
  }

  /* ثابت‌ماندن نوار دکمه‌ها در انتهای پنجره */
  #deleteProjectModal .confirm-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 5 !important;

    flex: 0 0 auto !important;
    margin-top: 0 !important;

    background: var(--bg-2) !important;

    padding-bottom:
      max(12px, env(safe-area-inset-bottom, 0px)) !important;

    box-shadow:
      0 -8px 18px color-mix(in srgb, var(--bg-2) 82%, transparent);
  }

  #deleteProjectModal .confirm-actions > button {
    flex: 0 0 auto !important;
    min-height: 46px !important;
  }
}
/* FIX 1 — Stage 1 option cards: content-based height */

.screening-options-column .options-list {
  grid-auto-rows: auto !important;
}

.screening-options-column .option-item {
  grid-template-rows: auto !important;
  align-items: start !important;
  min-height: 0 !important;
  padding: 12px 18px !important;
}

.screening-options-column .option-body {
  height: auto !important;
  min-height: 0 !important;
  justify-content: flex-start !important;
}

.screening-options-column .option-text {
  flex: 0 1 auto !important;
  min-height: 0 !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 767px) {
  .screening-options-column .option-item {
    min-height: 0 !important;
    padding: 11px 14px !important;
  }
}

@media (max-width: 380px) {
  .screening-options-column .option-item {
    min-height: 0 !important;
    padding-inline: 11px !important;
  }
}
/* FIX 2 — Shared evidence hint must occupy the full row */

.trl-evidence-dropzone > .trl-evidence-gate-hint {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  text-align: center !important;
  line-height: 1.6 !important;
}

@media (max-width: 640px) {
  .trl-evidence-dropzone > .trl-evidence-gate-hint {
    white-space: normal !important;
  }
}
/* FIX 6 — Remove vertical separator beside organization name */

.public-footer-complex .public-footer-org::after {
  display: none !important;
  content: none !important;
}

.public-footer-complex .public-footer-org {
  padding-inline-end: 0 !important;
}
/* FIX 8 — Stage 1: vertical text centering and modest card sizing */

.screening-options-column .option-item {
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: 86px !important;
  padding: 13px 18px !important;
  box-sizing: border-box !important;
}

.screening-options-column .option-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  gap: 7px !important;
}

.screening-options-column .option-letter {
  flex: 0 0 auto !important;
}

.screening-options-column .option-text {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  line-height: 1.65 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-align: center !important;
}

/* English: retain natural left alignment while centering vertically. */
html[lang="en"] .screening-options-column .option-text {
  direction: ltr !important;
  justify-content: flex-start !important;
  text-align: left !important;
  unicode-bidi: plaintext !important;
}

/* Mobile */
@media (max-width: 767px) {
  .screening-options-column .option-item {
    min-height: 92px !important;
    padding: 12px 14px !important;
    gap: 9px !important;
  }

  .screening-options-column .option-text {
    font-size: 12.5px !important;
  }
}

/* Narrow mobile screens */
@media (max-width: 380px) {
  .screening-options-column .option-item {
    min-height: 96px !important;
    padding-inline: 11px !important;
  }

  .screening-options-column .option-text {
    font-size: 12px !important;
  }
}
/* FIX 9 — Fine-tune vertical position of Stage 1 option descriptions */
.screening-options-column .option-text {
  transform: translateY(0) !important; 
}
.screening-options-column .option-body {
  gap: 16px !important; 
}

/* FIX 10: Exact Alignment for Persian (RTL) Only - Moving UP */
html[dir="rtl"] .screening-options-column .option-item {
  align-items: flex-start !important; 
  padding-top: 12px !important; /* تنظیم فاصله کلی کارت از بالا */
}
html[dir="rtl"] .screening-options-column .option-dot {
  align-self: flex-start !important; 
  margin-top: 2px !important; /* فقط ۲ پیکسل برای هم‌ترازی دقیق با خط اول متن */
  transform: none !important; 
}
html[dir="rtl"] .screening-options-column .option-body {
  justify-content: flex-start !important; 
  margin-top: 0 !important; /* صفر شد تا متن دقیقاً به بالای کادر بچسبد */
  transform: none !important; 
  gap: 6px !important; 
}
html[dir="rtl"] .screening-options-column .option-text {
  flex: 0 1 auto !important; 
}

/* ═══════════════════════════════════════════════════════════
   FIX: Absolute Sharpness for Landing and CTE Cards on Hover
   ═══════════════════════════════════════════════════════════ */

/* فعال‌سازی رندر سخت‌افزاری و آنتی‌الیاس برای هر دو کارت */
.fg-criterion-card,
.cte-item {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* اجبار به حفظ شفافیت ۱۰۰٪ برای تمام فرزندان (متن‌ها، آیکون‌ها و... ) در زمان هاور */
.fg-criterion-card *,
.cte-item *,
.fg-criterion-card:hover *,
.cte-item:hover * {
  opacity: 1 !important;
  filter: none !important;
  -webkit-filter: none !important;
  text-shadow: none !important;
}
/* ═══════════════════════════════════════════════════════════
   FINAL ABSOLUTE FIX: Crisp Hover for Landing & CTE Cards
   حل قطعی مشکل تار شدن کارت‌های صفحه لندینگ و CTE
   ═══════════════════════════════════════════════════════════ */

/* ۱. فعال‌سازی رندر سخت‌افزاری و آنتی‌الیاس برای هر دو کارت */
.fg-criterion-card,
.cte-item {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* ۲. حرکت شناور با translate3d (بدون تار شدن) */
.fg-criterion-card:hover {
  transform: translate3d(0, -4px, 0) !important;
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--line)) !important;
  box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--brand-primary) 25%, transparent) !important;
}

.cte-item:hover {
  transform: translate3d(0, -2px, 0) !important;
  border-color: color-mix(in srgb, var(--brand-primary) 45%, transparent) !important;
  box-shadow: 0 8px 16px -6px color-mix(in srgb, var(--brand-primary) 15%, transparent) !important;
}

/* ================================================================
   FANAGAAM — RESPONSIVE CTE HOVER CLARITY FIX
   Prevent mobile compositing blur and preserve opaque card surfaces.
   Applies to all four CTE cards in Persian and English.
   ================================================================ */

@media screen and (max-width: 767px) {

  #view-cte .cte-item,
  #view-cte .cte-item:hover,
  #view-cte .cte-item:focus,
  #view-cte .cte-item:focus-visible {

    /* Preserve full card visibility and its theme surface. */
    opacity: 1 !important;
    background: var(--bg-2) !important;
    filter: none !important;
    -webkit-filter: none !important;

    /* Prevent GPU transform compositing on responsive cards. */
    transform: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;

    /* Keep subtle hover feedback without moving the card. */
    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease !important;
  }

}

/* ۳. قفل کردن شارپنس ۱۰۰٪ برای تمام متن‌ها و آیکون‌ها در حالت هاور */
.fg-criterion-card,
.fg-criterion-card *,
.cte-item,
.cte-item *,
.fg-criterion-card:hover,
.fg-criterion-card:hover *,
.cte-item:hover,
.cte-item:hover * {
  opacity: 1 !important;
  filter: none !important;
  -webkit-filter: none !important;
  text-shadow: none !important;
}
/* ═══════════════════════════════════════════════════════════
   ULTIMATE FIX: Eliminate Hover Delay & Ensure Instant Sharpness
   ═══════════════════════════════════════════════════════════ */

.fg-criterion-card {
  /* ۱. مجبور کردن مرورگر به آماده‌سازی لایه گرافیکی از قبل (حتی قبل از هاور) */
  transform: translate3d(0, 0, 0) !important;
  will-change: transform !important;
  
  /* ۲. محدود کردن انیمیشن فقط به حرکت و سایه تا متن‌ها دوباره رندر نشوند */
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease !important;
}

.fg-criterion-card:hover {
  /* ۳. حرکت دادن لایه آماده‌شده (بدون دست زدن به متن) */
  transform: translate3d(0, -4px, 0) !important;
  
  /* ۴. قفل کردن آنتی‌الیاس برای وضوح کامل */
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* ۵. جدا کردن لایه متن‌ها و آیکون‌ها تا تحت هیچ شرایطی تار نشوند */
.fg-criterion-card h3,
.fg-criterion-card p,
.fg-criterion-card > span {
  transform: translateZ(0) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* ۶. حذف هرگونه شفافیت یا فیلتر مزاحم */
.fg-criterion-card,
.fg-criterion-card *,
.fg-criterion-card:hover,
.fg-criterion-card:hover * {
  opacity: 1 !important;
  filter: none !important;
}
/* ═══════════════════════════════════════════════════════════
   FIX: English Left Alignment for Projects Hero Banner
   ═══════════════════════════════════════════════════════════ */

html[dir="ltr"] .hero-banner-content {
  text-align: left !important;
}

html[dir="ltr"] .hero-banner-content .hero-desc {
  text-align: left !important;
}

html[dir="ltr"] .hero-banner-content .hero-stats {
  justify-content: flex-start !important;
}
/* ═══════════════════════════════════════════════════════════
   FIX: Perfectly Center Text Inside Confirm/Modal Buttons
   ═══════════════════════════════════════════════════════════ */

/* اعمال تنظیمات مرکزچین برای دکمه‌های تایید در مودال‌ها و فرم‌ها */
.btn-primary,
.btn-danger,
.confirm-actions > button,
.modal-footer > button {
  display: inline-flex !important;
  align-items: center !important; /* وسط‌چین عمودی */
  justify-content: center !important; /* وسط‌چین افقی */
  text-align: center !important;
  line-height: 1.2 !important; /* جلوگیری از به‌هم‌ریختگی ارتفاع خط */
}

/* اگر دکمه دارای آیکون است، این کد تضمین می‌کند که متن و آیکون دقیقاً کنار هم در مرکز باشند */
.btn-primary > span,
.btn-danger > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* ═══════════════════════════════════════════════════════════
   FIX: Force English Display for Numeric Inputs in EN Mode
   ═══════════════════════════════════════════════════════════ */

html[lang="en"] #otpInput,
html[lang="en"] #forgotRecoveryCode,
html[lang="en"] #editProfilePhone,
html[lang="en"] #forgotPassInput,
html[lang="en"] #authUsername {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  direction: ltr !important;
  unicode-bidi: bidi-override !important;
  font-feature-settings: "lnum" 1, "tnum" 1 !important; /* اجبار به استفاده از اعداد لاتین */
  text-align: left !important;
}

/* برای فیلدهای کد تأیید که وسط‌چین هستند */
html[lang="en"] #otpInput,
html[lang="en"] #forgotRecoveryCode {
  text-align: center !important; 
}

/* استثنا برای فیلد کد تأیید تا حروف فارسی به زور انگلیسی نشوند، فقط اعداد */
html[lang="en"] #otpInput::placeholder,
html[lang="en"] #forgotRecoveryCode::placeholder {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  letter-spacing: 0.1em !important;
}
/* ============================================================
   FINAL PRINT FIX: Remove TRL Gauge & Make Text Full-Width
   ============================================================ */
@media print {
  /* ۱. مخفی کردن کامل کادر دایره‌ای TRL */
  .trl-gauge {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* ۲. تبدیل چیدمان گرید به حالت بلوکی تا متن فضای خالی را پر کند */
  .result-hero-grid {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  /* ۳. وسط‌چین کردن متن‌ها و بج‌ها در فضای جدید */
  .result-hero-text {
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 10pt !important;
  }

  /* ۴. وسط‌چین کردن بج‌های بالای عنوان */
  .result-badges {
    justify-content: center !important;
    margin-bottom: 12pt !important;
  }

  /* ۵. تنظیم فاصله عنوان و زیرعنوان پروژه پس از حذف کادر */
  .result-title {
    font-size: 24pt !important;
    margin-bottom: 6pt !important;
  }
  
  .result-subtitle {
    font-size: 14pt !important;
  }
}
/* ============================================================ */
/* 🎯 استایل ادیتوریال و دو ستونه بخش «درباره فناگام»           */
/* ============================================================ */
.fg-about-section {
  position: relative;
  padding-block: 80px 120px;
  overflow: hidden;
}

.fg-about-bg-glow {
  position: absolute;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand-primary) 6%, transparent) 0%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.fg-about-container {
  width: min(1180px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding-inline: 20px;
}

/* چیدمان دو ستونه */
.fg-about-split-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

/* تنظیمات ستون متن (راست‌چین) */
.fg-about-editorial {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fg-about-lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 2;
  color: var(--text-0);
  font-weight: 700;
  text-align: right; /* راست‌چین */
  letter-spacing: -0.02em;
  margin: 0;
}

.fg-about-editorial > p:not(.fg-about-lead) {
  font-size: 15px;
  line-height: 2.2;
  color: var(--text-1);
  font-weight: 500;
  text-align: right; /* راست‌چین */
  margin: 0;
}

.fg-about-target {
  position: relative;
  padding-right: 24px;
  margin-top: 8px;
}

.fg-about-target::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 0;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-accent));
}

.fg-about-target p {
  font-size: 14.5px;
  line-height: 2.1;
  color: var(--text-0);
  font-weight: 600;
  text-align: right; /* راست‌چین */
  margin: 0;
}

/* تنظیمات ستون گرافیکی (چپ) */
.fg-about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 450px;
  margin-inline: auto;
}

/* لوگوی اصلی سایت */
.fg-geo-main-logo {
  width: 100%;
  max-width: 320px; /* بزرگ‌تر شد تا فضای خالی را پر کند */
  height: auto;
  object-fit: contain;
  /* سایه عمیق و نرم برای جدا شدن از پس‌زمینه و ایجاد حس سه‌بعدی */
  filter: drop-shadow(0 20px 30px rgba(8, 126, 131, 0.15)) drop-shadow(0 4px 10px rgba(20, 43, 59, 0.05));
  /* یک شناوری بسیار ملایم برای جذابیت بیشتر */
  animation: fg-float 5s ease-in-out infinite;
}

@keyframes fg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 991px) {
  .fg-geo-main-logo {
    max-width: 240px;
    margin-inline: auto;
    display: block;
  }
}


/* ریسپانسیو برای موبایل و تبلت */
@media (max-width: 991px) {
  .fg-about-split-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .fg-about-visual {
    max-width: 320px;
    grid-row: 2; /* در موبایل گرافیک به پایین منتقل می‌شود */
  }
  .fg-about-lead, 
  .fg-about-editorial > p:not(.fg-about-lead),
  .fg-about-target p,
  .fg-section-heading h2 {
    text-align: center !important; /* در موبایل برای خوانایی بهتر، وسط‌چین می‌شوند */
  }
  .fg-section-heading {
    text-align: center !important;
  }
  .fg-about-target {
    padding-right: 0;
    padding-top: 16px;
    border-right: none;
    border-top: 2px solid var(--line-bright);
  }
  .fg-about-target::before {
    display: none;
  }
}
/* ============================================================ */
/* 🎯 اصلاح بولت‌های لیست در حالت انگلیسی و قرارگیری پشت متن     */
/* ============================================================ */

/* ۱. قرار دادن بولت در لایه پشت متن (Z-Index) */
.fg-preview-copy li {
  z-index: 1; /* متن در لایه جلو */
}
.fg-preview-copy li::before {
  z-index: -1; /* بولت در لایه پشت */
}

/* ۲. تغییر مکان بولت به سمت چپ در حالت انگلیسی (استاندارد LTR) */
html[lang="en"] .fg-preview-copy li {
  padding-right: 0 !important;
  padding-left: 22px !important; /* فاصله از سمت چپ */
}

html[lang="en"] .fg-preview-copy li::before {
  right: auto !important;
  left: 0 !important; /* بولت در سمت چپ متن */
}
/* ============================================================ */
/* 🎯 اصلاح چیدمان بخش «درباره فناگام» در حالت انگلیسی (LTR)   */
/* ============================================================ */

/* ۱. چپ‌چین کردن تمام پاراگراف‌ها در حالت انگلیسی */
html[lang="en"] .fg-about-lead,
html[lang="en"] .fg-about-editorial > p:not(.fg-about-lead),
html[lang="en"] .fg-about-target p {
  text-align: left !important;
  direction: ltr !important;
}

/* ۲. انتقال خط رنگی تاکیدی از سمت راست به سمت چپ */
html[lang="en"] .fg-about-target {
  padding-right: 0 !important;
  padding-left: 24px !important; /* ایجاد فاصله از سمت چپ */
}

html[lang="en"] .fg-about-target::before {
  right: auto !important;
  left: 0 !important; /* قرارگیری خط رنگی در سمت چپ */
}

/* ۳. اصلاح چیدمان موبایل در حالت انگلیسی (اگر نیاز بود) */
@media (max-width: 991px) {
  html[lang="en"] .fg-about-lead,
  html[lang="en"] .fg-about-editorial > p:not(.fg-about-lead),
  html[lang="en"] .fg-about-target p {
    text-align: center !important; /* در موبایل برای خوانایی بهتر، متن‌ها وسط‌چین می‌شوند */
  }
  html[lang="en"] .fg-about-target {
    padding-left: 0 !important;
    border-left: none !important;
  }
  html[lang="en"] .fg-about-target::before {
    display: none !important;
  }
}
/* ============================================================ */
/* 🎯 FIX: FORCE LEFT ALIGNMENT FOR ABOUT SECTION IN ENGLISH    */
/* ============================================================ */

/* ۱. چپ‌چین کردن تیتر اصلی بخش */
html[lang="en"] #publicAbout .fg-section-heading {
  text-align: left !important;
  direction: ltr !important;
}

html[lang="en"] #publicAbout .fg-section-kicker,
html[lang="en"] #publicAbout h2 {
  text-align: left !important;
}

/* ۲. چپ‌چین کردن ستون متن */
html[lang="en"] .fg-about-split-layout {
  direction: ltr !important; /* تضمین چیدمان گرید از چپ به راست */
}

html[lang="en"] .fg-about-editorial {
  direction: ltr !important;
  text-align: left !important;
}

/* ۳. چپ‌چین کردن تمام پاراگراف‌ها */
html[lang="en"] .fg-about-lead,
html[lang="en"] .fg-about-editorial > p,
html[lang="en"] .fg-about-target p {
  text-align: left !important;
  direction: ltr !important;
  unicode-bidi: isolate !important; /* جلوگیری از تداخل جهت متن */
}

/* ۴. انتقال خط رنگی تاکیدی به سمت چپ */
html[lang="en"] .fg-about-target {
  padding-right: 0 !important;
  padding-left: 24px !important;
  border-right: none !important;
}

html[lang="en"] .fg-about-target::before {
  right: auto !important;
  left: 0 !important;
}

/* ۵. اصلاح چیدمان موبایل در حالت انگلیسی */
@media (max-width: 991px) {
  html[lang="en"] #publicAbout .fg-section-heading,
  html[lang="en"] .fg-about-lead,
  html[lang="en"] .fg-about-editorial > p,
  html[lang="en"] .fg-about-target p {
    text-align: left !important;
  }
  html[lang="en"] .fg-about-target {
    padding-left: 16px !important;
  }
}
/* ============================================================ */
/* 🎯 تست خوانایی: فقط بخش سوالات و گزینه‌ها                     */
/* ============================================================ */

/* ۱. متن گزینه‌های مرحله اول (Screening) */
.screening-options-column .option-text {
  font-size: 14px !important;
  line-height: 1.65 !important;
}

/* ۲. متن سوالات مرحله دوم (Deep Assessment) */
.question-card .q-text {
  font-size: 15px !important;
  line-height: 1.7 !important;
}

/* ۳. متن راهنمای آپلود مدرک در مرحله دوم */
.upload-desc, 
.upload-guidance {
  font-size: 12.5px !important;
}

/* ============================================================
   READABILITY v1 — Global font-size normalization
   Phase 1 (small labels) + Safe Phase 2 (paragraphs, buttons, nav)
   Screen only; PDF body remains 11pt (standard A4).
   Scope: fanagaam-release.css (loaded last — highest priority).
   Revert: delete this entire block.
   ============================================================ */

@media screen {

  /* ── Ultra-small labels (≤10px) → 11.5–12px ── */
  .tag,
  .gap-tag,
  .kpi-label,
  .glossary-section-title        { font-size: 11.5px !important; }

  .logo-sub,
  .nav-section-title,
  .step-label,
  .hero-stat-label,
  .hero-badge,
  .breadcrumbs,
  .autosave-indicator,
  .section-eyebrow,
  .shortcut-group-title,
  .result-meta-id,
  .profile-info-label,
  .profile-badge,
  .benchmark-labels,
  .notif-item-time               { font-size: 12px !important; }

  /* ── Small labels (10–11.5px) → 12.5px ── */
  .metric-label,
  .progress-label,
  .mini-readiness-label,
  .glossary-def,
  .shortcut-modal-desc,
  .kpi-trend,
  .data-table th,
  .weight-input label,
  .insight-title,
  .insight-desc,
  .profile-pref-desc,
  .profile-activity-time,
  .tour-step-total,
  .tour-skip,
  .notif-header button,
  .q-criterion,
  .q-gate,
  .q-evidence-required,
  .q-evidence-ok,
  .q-evidence-optional,
  .result-meta-label             { font-size: 12.5px !important; }

  /* ── Tooltip text (11px) → 12.5px ── */
  .tooltip::after,
  .result-badges .tooltip::after,
  .result-metrics .metric-card.tooltip::after
                                  { font-size: 12.5px !important; }

  /* ── Paragraph text / metadata (12–12.5px) → 13.5px ── */
  .project-card-desc,
  .gap-desc,
  .hero-desc,
  .profile-activity-title,
  .chat-bubble,
  .notif-item-text,
  .notif-item-title,
  .tour-desc,
  .trend-tooltip-row             { font-size: 13.5px !important; }

  /* ── Small controls (12px buttons) → 13.5px ── */
  .btn-ghost,
  .btn-primary,
  .btn-danger                    { font-size: 13.5px !important; }
  .btn-ghost.btn-sm,
  .btn-primary.btn-sm,
  .btn-danger.btn-sm             { font-size: 12.5px !important; }

  /* ── Sidebar & dropdown navigation (12.5–13px) → 13.5px ── */
  .nav-item,
  .dropdown-menu button          { font-size: 13.5px !important; }

  /* ── Card titles & form labels ── */
  .criterion-name                { font-size: 13px !important; }
  .form-label                    { font-size: 12.5px !important; }
  .upload-title,
  .exec-title,
  .evidence-review-title         { font-size: 14px !important; }

  /* ── Badges / KPI / footer ── */
  .badge                         { font-size: 11.5px !important; }
  .trl-badge                     { font-size: 13px !important; }
  .notif-footer button           { font-size: 13px !important; }
  .footer-desc,
  .footer-info,
  .footer-col a                  { font-size: 12.5px !important; }
  .toast-msg-text                { font-size: 14px !important; }

  /* ── Tour & trend tooltip ── */
  .tour-prev,
  .tour-next                     { font-size: 12.5px !important; }
  .trend-tooltip-title           { font-size: 13.5px !important; }
  .trend-tooltip-value           { font-size: 13px !important; }

  /* ── Landing page safe additions ── */
  .fg-criterion-card p           { font-size: 13.5px !important; }
  .fg-report-bars span           { font-size: 12px !important; }
  .fg-demo-disclaimer            { font-size: 11.5px !important; }
  .public-footer-complex .public-footer-org,
  .public-footer-complex .footer-copy
                                  { font-size: 12px !important; }
}

/* ── Desktop form-input: 14px (mobile stays 16px — iOS zoom guard) ── */
@media screen and (min-width: 901px) {
  .form-input { font-size: 14px !important; }
}

/* ── Mobile-only refinements (stay slightly smaller than desktop) ── */
@media screen and (max-width: 767px) {

  .nav-item {
    font-size: 12.5px !important;
  }

  .hero-desc {
    font-size: 13px !important;
  }

  .notif-item-time {
    font-size: 11.5px !important;
  }

  .fg-report-bars span {
    font-size: 11px !important;
  }

  /* ============================================================
     RESULT METRICS — ALIGN FIRST TWO CARDS
     Equalize title area so values and progress bars align.
     ============================================================ */

  .result-metrics #metricReadiness .metric-label,
  .result-metrics #metricCompleteness .metric-label {
    min-height: 4.5em !important;
    line-height: 1.5 !important;
    margin-bottom: 6px !important;
    box-sizing: border-box !important;
  }

}

/* ── Print / PDF: lift only the two smallest pt sizes; body stays 11pt ── */
@media print {
  .metric-label                  { font-size: 9pt !important; }
  .print-question-tag            { font-size: 9pt !important; }
  .print-question-num            { font-size: 9.5pt !important; }
  .print-answer-badge            { font-size: 9.5pt !important; }
}
/* ── FIX: Right-align Deep Assessment answer buttons ── */
.q-answers-vertical .ans-btn {
  direction: rtl !important;        /* اجبار به راست‌چین بودن جهت متن */
  justify-content: flex-start !important; /* هدایت محتوا به سمت راست */
  text-align: right !important;
}

.q-answers-vertical .ans-btn span:first-child {
  /* آیکون */
  flex-shrink: 0 !important;
  margin-left: 8px; /* فاصله استاندارد بین آیکون و متن */
}

.q-answers-vertical .ans-btn span:last-child {
  /* متن دکمه */
  flex: 1 !important;               /* پر کردن فضای باقیمانده */
  text-align: right !important;     /* چسبیدن متن به راست */
}
/* ── FIX: Left-align Deep Assessment answer buttons in English (LTR) ── */
html[lang="en"] .q-answers-vertical .ans-btn,
html.fg-lang-en .q-answers-vertical .ans-btn {
  direction: ltr !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

html[lang="en"] .q-answers-vertical .ans-btn span:first-child,
html.fg-lang-en .q-answers-vertical .ans-btn span:first-child {
  margin-left: 0 !important;
  margin-right: 8px; /* فاصله آیکون از متن در حالت انگلیسی */
}

html[lang="en"] .q-answers-vertical .ans-btn span:last-child,
html.fg-lang-en .q-answers-vertical .ans-btn span:last-child {
  text-align: left !important;
}

/* ================================================================
   FANAGAAM — PROFESSIONAL NOTIFICATION CLARITY
   Toasts + Notification Dropdown + Full Notification Page
   Light / Dark / Desktop / Mobile
   ================================================================ */


/* ================================================================
   1. FLOATING TOAST NOTIFICATIONS
   ================================================================ */

#toastContainer {
  width: min(460px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  gap: 12px !important;
}

.toast {
  box-sizing: border-box !important;
  min-width: min(280px, 100%) !important;
  max-width: 100% !important;
  min-height: 58px !important;

  padding: 13px 18px !important;

  border-radius: 16px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 14px !important;

  border: 1.5px solid var(--line-bright) !important;

  border-inline-start: 5px solid
    var(--toast-accent, var(--brand-primary)) !important;

  background: var(--toast-surface, var(--bg-2)) !important;

  box-shadow:
    0 16px 36px rgba(10, 35, 48, .18),
    0 3px 8px rgba(10, 35, 48, .08) !important;
}

.toast-msg-text {
  min-width: 0 !important;
  flex: 1 1 auto !important;

  color: var(--text-0) !important;

  font-size: 16.5px !important;
  font-weight: 900 !important;
  line-height: 1.8 !important;

  text-align: start !important;
  overflow-wrap: anywhere !important;
}

.toast-icon-wrap {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;

  border-radius: 10px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: var(--toast-accent) !important;
  background: var(--toast-icon-bg) !important;

  border: 1px solid color-mix(
    in srgb,
    var(--toast-accent) 30%,
    transparent
  ) !important;
}

.toast-svg-icon {
  width: 21px !important;
  height: 21px !important;
  stroke-width: 2.7 !important;
}


/* وضعیت موفقیت — سبز */

.toast-success {
  --toast-accent: #047857;
  --toast-surface: #F0FDF4;
  --toast-icon-bg: #DCFCE7;
}


/* اطلاع‌رسانی — آبی */

.toast-info {
  --toast-accent: #075985;
  --toast-surface: #F0F9FF;
  --toast-icon-bg: #E0F2FE;
}


/* هشدار — کهربایی */

.toast-warning {
  --toast-accent: #92400E;
  --toast-surface: #FFFBEB;
  --toast-icon-bg: #FEF3C7;
}


/* خطا — قرمز */

.toast-error {
  --toast-accent: #9F1239;
  --toast-surface: #FFF1F2;
  --toast-icon-bg: #FFE4E6;
}


/* رنگ‌های اختصاصی تم تاریک */

html[data-theme="dark"] .toast-success {
  --toast-accent: #6EE7B7;
  --toast-surface: #123A32;
  --toast-icon-bg: #174E41;
}

html[data-theme="dark"] .toast-info {
  --toast-accent: #7DD3FC;
  --toast-surface: #123648;
  --toast-icon-bg: #16465D;
}

html[data-theme="dark"] .toast-warning {
  --toast-accent: #FCD34D;
  --toast-surface: #40351D;
  --toast-icon-bg: #59431D;
}

html[data-theme="dark"] .toast-error {
  --toast-accent: #FDA4AF;
  --toast-surface: #432634;
  --toast-icon-bg: #5A2A3B;
}


/* ================================================================
   2. NOTIFICATION DROPDOWN — BELL PANEL
   ================================================================ */

.notif-panel {
  border-width: 1.5px !important;

  box-shadow:
    0 22px 54px rgba(10, 35, 48, .24) !important;
}

.notif-header h3 {
  font-size: 17px !important;
  line-height: 1.6 !important;
}

.notif-header button {
  font-size: 14px !important;
  font-weight: 900 !important;
}

.notif-item,
.all-notif-list .all-notif-item {
  padding: 16px !important;
  gap: 14px !important;
  border-radius: 14px !important;
}

.notif-item-icon,
.all-notif-icon {
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px !important;
  border-radius: 13px !important;
}

.notif-item-icon svg,
.all-notif-icon svg {
  width: 23px !important;
  height: 23px !important;
}


/* عنوان اعلان */

.notif-item-title,
.all-notif-title {
  min-width: 0 !important;

  color: var(--text-0) !important;

  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.65 !important;
}


/* متن توضیحات اعلان */

.notif-item-text,
.all-notif-text {
  color: var(--text-1) !important;

  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.9 !important;

  overflow-wrap: anywhere !important;
}


/* زمان اعلان */

.notif-item-time,
.all-notif-time {
  color: var(--text-1) !important;

  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.6 !important;
}


/* جلوگیری از فشرده‌شدن عنوان و زمان در یک ردیف */

.notif-item-body > div:first-child {
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 4px 12px !important;
}


/* اعلان‌های خوانده‌نشده */

.notif-item.unread {
  border-inline-start: 4px solid var(--brand-primary) !important;

  background: color-mix(
    in srgb,
    var(--brand-primary) 10%,
    var(--bg-2)
  ) !important;
}

.all-notif-item.unread {
  border-inline-start: 4px solid var(--brand-primary) !important;

  border-color: color-mix(
    in srgb,
    var(--brand-primary) 34%,
    var(--line)
  ) !important;

  background: color-mix(
    in srgb,
    var(--brand-primary) 9%,
    var(--bg-2)
  ) !important;
}


/* وضعیت خالی فهرست اعلان‌ها */

.notif-empty-title {
  font-size: 17px !important;
  font-weight: 900 !important;
}

.notif-empty-desc {
  font-size: 15px !important;
  line-height: 1.9 !important;
}


/* ================================================================
   3. MOBILE READABILITY
   ================================================================ */

@media (max-width: 767px) {

  .toast {
    min-height: 56px !important;
    padding: 12px 14px !important;
    gap: 11px !important;
  }

  .toast-msg-text {
    font-size: 16px !important;
    line-height: 1.75 !important;
  }

  .notif-item,
  .all-notif-list .all-notif-item {
    padding: 14px !important;
    gap: 11px !important;
  }

  .notif-item-title,
  .all-notif-title {
    font-size: 15.5px !important;
  }

  .notif-item-text,
  .all-notif-text {
    font-size: 14.5px !important;
  }

  .notif-item-time,
  .all-notif-time {
    font-size: 12.5px !important;
  }
}

/* ============================================================
   PERSIAN TOAST POSITION — LEFT ALIGNMENT
   ============================================================ */

/* دسکتاپ: نزدیک‌تر کردن اعلان فارسی به لبه چپ */
html[dir="rtl"] #toastContainer.toast-container {
  left: 8px !important;
  right: auto !important;
  align-items: flex-start !important;
}

/* موبایل: حذف وسط‌چین بودن اعلان فارسی */
@media (max-width: 767px) {
  html[dir="rtl"] #toastContainer.toast-container {
    left: 0 !important;
    right: auto !important;

    width: 100% !important;
    max-width: 100vw !important;

    align-items: flex-start !important;

    padding: 0 16px 0 8px !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   FANAGAAM — COMPACT & HIGH-CONTRAST NOTIFICATIONS
   ============================================================ */


/* ------------------------------------------------------------
   1. FLOATING TOAST NOTIFICATIONS
   ------------------------------------------------------------ */

#toastContainer.toast-container .toast {
  box-sizing: border-box !important;

  min-height: 46px !important;
  padding: 8px 15px !important;
  gap: 9px !important;

  border-radius: 14px !important;

  width: max-content !important;
  max-width: min(340px, calc(100vw - 24px)) !important;

  border: 1.5px solid #6F8792 !important;

  box-shadow:
    0 7px 18px rgba(15, 35, 48, .13) !important;
}

#toastContainer.toast-container .toast-msg-text {
  font-size: 13px !important;
  line-height: 1.55 !important;
  font-weight: 800 !important;
}

#toastContainer.toast-container .toast-icon-wrap {
  width: 18px !important;
  height: 18px !important;
}

#toastContainer.toast-container .toast-svg-icon {
  width: 15px !important;
  height: 15px !important;
}

/* حاشیه اعلان در تم روشن */

html[data-theme="light"] #toastContainer.toast-container .toast {
  background: #FFFFFF !important;
  border-color: #6F8792 !important;
}

/* حاشیه اعلان در تم تاریک */

html[data-theme="dark"] #toastContainer.toast-container .toast {
  background: #102432 !important;
  border-color: #627C88 !important;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, .28) !important;
}


/* ============================================================
   FANAGAAM — PERSIAN TOAST
   FIXED BOTTOM-LEFT + AI SAFE CLEARANCE
   ============================================================ */

/* Desktop: toast stays at bottom-left, above the AI assistant. */
html[dir="rtl"] #toastContainer.toast-container {
  position: fixed !important;

  left: calc(24px + var(--safe-left, 0px)) !important;
  right: auto !important;

  bottom: calc(96px + var(--safe-bottom, 0px)) !important;

  width: max-content !important;
  max-width: min(340px, calc(100vw - 48px)) !important;

  align-items: flex-start !important;
  padding: 0 !important;
}

/* Tablet: match the tablet assistant button position. */
@media (min-width: 768px) and (max-width: 1023px) {
  html[dir="rtl"] #toastContainer.toast-container {
    left: calc(22px + var(--safe-left, 0px)) !important;
    right: auto !important;

    bottom: calc(90px + var(--safe-bottom, 0px)) !important;

    width: max-content !important;
    max-width: min(340px, calc(100vw - 44px)) !important;

    align-items: flex-start !important;
    padding: 0 !important;
  }
}

/* Mobile: toast stays bottom-left and clears the 54px AI button. */
@media (max-width: 767px) {
  html[dir="rtl"] #toastContainer.toast-container {
    left: calc(18px + var(--safe-left, 0px)) !important;
    right: auto !important;

    bottom: calc(76px + var(--safe-bottom, 0px)) !important;

    width: max-content !important;
    max-width: calc(100vw - 34px) !important;

    align-items: flex-start !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Mobile landscape: protect the smaller 46px assistant button. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {
  html[dir="rtl"] #toastContainer.toast-container {
    left: calc(10px + var(--safe-left, 0px)) !important;
    right: auto !important;

    bottom: calc(68px + var(--safe-bottom, 0px)) !important;

    max-width: calc(100vw - 26px) !important;
  }
}


/* ------------------------------------------------------------
   2. NOTIFICATION BELL PANEL
   ------------------------------------------------------------ */

.notif-panel {
  border: 1.5px solid #667F8A !important;
}

html[data-theme="dark"] .notif-panel {
  border-color: #627C88 !important;
}

.notif-item {
  padding: 11px 12px !important;
  gap: 10px !important;

  border-bottom: 1.5px solid #7B919B !important;
}

html[data-theme="dark"] .notif-item {
  border-bottom-color: #557381 !important;
}

.notif-item-icon {
  width: 38px !important;
  height: 38px !important;
}

.notif-item-icon svg {
  width: 18px !important;
  height: 18px !important;
}

.notif-item-title {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.notif-item-text {
  font-size: 12.5px !important;
  line-height: 1.65 !important;
}

.notif-item-time {
  font-size: 11px !important;
}


/* ------------------------------------------------------------
   3. FULL NOTIFICATION LIST
   ------------------------------------------------------------ */

.all-notif-item {
  padding: 13px 15px !important;
  gap: 12px !important;

  border: 1.5px solid #7B919B !important;
}

html[data-theme="dark"] .all-notif-item {
  border-color: #557381 !important;
}

/* اعلان خوانده‌نشده */

.all-notif-item.unread {
  border-color: var(--brand-primary) !important;
}

.all-notif-icon {
  width: 38px !important;
  height: 38px !important;

  border-radius: 11px !important;
}

.all-notif-title {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.all-notif-text {
  font-size: 12px !important;
  line-height: 1.65 !important;
}

.all-notif-time {
  font-size: 10.5px !important;
}

/* Success notification icon — plain check without oval or badge */

#toastContainer .toast-icon-wrap {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 20px !important;
  height: 20px !important;
}

#toastContainer .toast-icon-wrap .toast-svg-icon {
  width: 18px !important;
  height: 18px !important;
}

/* Success icon: perfectly circular check badge */

#toastContainer .toast-icon-wrap {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}

#toastContainer .toast-icon-wrap .toast-svg-icon {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;

  aspect-ratio: 1 / 1 !important;
}

/* =====================================================================
   FANAGAAM — TYPOGRAPHY, READABILITY & CONTRAST SYSTEM V2
   Persian: Vazirmatn | English: Inter
   Screen + Print | Light + Dark | Desktop + Mobile
   ===================================================================== */

:root {
  --fg-font-persian: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
  --fg-font-latin: "Inter", "Segoe UI", Arial, sans-serif;
  --fg-font-monospace: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

/* Persian UI: override legacy B Nazanin rules but preserve code, icon fonts,
   English fragments and fields that contain Latin-only values. */

html[lang="fa"] body,
html[lang="fa"] body *:not(code):not(pre):not(.mono):not(.font-mono):not(.kbd):not(code *):not(pre *):not(.mono *):not(.font-mono *):not(.kbd *):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa *):not(.fas *):not(.far *):not(.fab *):not(.material-icons):not(.material-symbols-outlined):not(.bi):not(.iconfont):not([lang="en"]):not([lang="en"] *):not([dir="ltr"]):not([dir="ltr"] *):not(input[type="email"]):not(input[type="tel"]):not(input[type="url"]):not(input[type="password"]):not(#editProfilePhone):not(#otpInput):not(#authUsername):not(#authPassword):not(#forgotPassInput):not(#forgotRecoveryCode):not(#newPasswordInput):not(#confirmPasswordInput):not(.ltr-nums-inline):not(.ltr-nums-inline *) {
  font-family: var(--fg-font-persian) !important;
  font-synthesis: none;
}

/* English fragments and Latin identifiers inside Persian pages. */

html[lang="fa"] body [lang="en"],
html[lang="fa"] body [lang="en"] *,
html[lang="fa"] body [dir="ltr"],
html[lang="fa"] body [dir="ltr"] *,
html[lang="fa"] body :is(input[type="email"], input[type="tel"], input[type="url"], input[type="password"], #editProfilePhone, #otpInput, #authUsername, #authPassword, #forgotPassInput, #forgotRecoveryCode, #newPasswordInput, #confirmPasswordInput),
html[lang="fa"] body .ltr-nums-inline {
  font-family: var(--fg-font-latin) !important;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Explicitly preserve the monospace stack. */

html[lang="fa"] body code,
html[lang="fa"] body pre,
html[lang="fa"] body .mono,
html[lang="fa"] body .font-mono,
html[lang="fa"] body .kbd,
html[lang="fa"] body code *,
html[lang="fa"] body pre *,
html[lang="fa"] body .mono *,
html[lang="fa"] body .font-mono *,
html[lang="fa"] body .kbd * {
  font-family: var(--fg-font-monospace) !important;
}

/* SVG labels, including generated chart labels, follow the Persian UI font. */

/* ============================================================
   FANAGAAM — LANGUAGE-AWARE FLOATING CONTROLS
   Persian: AI right / Toast left
   English: AI left / Toast right
   ============================================================ */

/* ------------------------------------------------------------
   1. DESKTOP — ASSISTANT POSITION
   ------------------------------------------------------------ */

/* Persian: launcher and panel share the right anchor. */
html[dir="rtl"] #aiChatTrigger.ai-chat-trigger {
  left: auto !important;
  right: calc(20px + var(--safe-right, 0px)) !important;
  bottom: calc(10px + var(--safe-bottom, 0px)) !important;
}

html[dir="rtl"] #aiChatPanel.ai-chat-panel {
  left: auto !important;
  right: calc(20px + var(--safe-right, 0px)) !important;
  transform-origin: bottom right !important;
}

html[dir="rtl"] #aiChatPanel.ai-chat-panel:not(.open) {
  transform: translate(16px, 20px) scale(.96) !important;
}

html[dir="rtl"] #aiChatPanel.ai-chat-panel.open {
  transform: translate(0, 0) scale(1) !important;
}

/* English: preserve the existing bottom-left position. */
html[dir="ltr"] #aiChatTrigger.ai-chat-trigger {
  right: auto !important;
  left: calc(20px + var(--safe-left, 0px)) !important;
  bottom: calc(10px + var(--safe-bottom, 0px)) !important;
}

/* ------------------------------------------------------------
   2. DESKTOP — TOAST NOTIFICATION POSITION
   ------------------------------------------------------------ */

/* Persian: notifications occupy the opposite corner. */
html[dir="rtl"] #toastContainer.toast-container {
  left: calc(20px + var(--safe-left, 0px)) !important;
  right: auto !important;
  bottom: calc(24px + var(--safe-bottom, 0px)) !important;

  width: max-content !important;
  max-width: min(340px, calc(100vw - 40px)) !important;

  align-items: flex-start !important;
  padding: 0 !important;
}

/* English: notifications remain bottom-right. */
html[dir="ltr"] #toastContainer.toast-container {
  right: calc(20px + var(--safe-right, 0px)) !important;
  left: auto !important;
  bottom: calc(24px + var(--safe-bottom, 0px)) !important;

  width: max-content !important;
  max-width: min(340px, calc(100vw - 40px)) !important;

  align-items: flex-end !important;
  padding: 0 !important;
}

/* ------------------------------------------------------------
   3. MOBILE — MIRRORED ASSISTANT POSITIONS
   ------------------------------------------------------------ */

@media (max-width: 767px) {

  /* Persian launcher remains at the bottom-right. */
  html[dir="rtl"] #aiChatTrigger.ai-chat-trigger {
    left: auto !important;
    right: calc(16px + var(--safe-right, 0px)) !important;
    bottom: calc(10px + var(--safe-bottom, 0px)) !important;
  }

  /*
     Persian assistant panel:
     A right-side drawer instead of a full-width overlay.
     Maximum width: 400px.
  */
  html[dir="rtl"] #aiChatPanel.ai-chat-panel {
    position: fixed !important;

    top: 0 !important;
    right: var(--safe-right, 0px) !important;
    bottom: 0 !important;
    left: auto !important;

    width: min(400px, calc(100vw - 16px - var(--safe-right, 0px))) !important;
    max-width: min(400px, calc(100vw - 16px - var(--safe-right, 0px))) !important;

    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;

    box-sizing: border-box !important;

    border-radius: 24px 0 0 24px !important;
    border: 1px solid var(--line-bright) !important;

    padding-top: var(--safe-top) !important;
    padding-bottom: var(--safe-bottom) !important;

    transform-origin: right center !important;
  }

  /* Enter from the right edge. */
  html[dir="rtl"] #aiChatPanel.ai-chat-panel:not(.open) {
    transform: translateX(24px) scale(.985) !important;
  }

  html[dir="rtl"] #aiChatPanel.ai-chat-panel.open {
    transform: translateX(0) scale(1) !important;
  }

  /* English launcher and panel retain their previous behavior. */
  html[dir="ltr"] #aiChatTrigger.ai-chat-trigger {
    right: auto !important;
    left: calc(16px + var(--safe-left, 0px)) !important;
    bottom: calc(10px + var(--safe-bottom, 0px)) !important;
  }

  /* Mobile notifications stay in their opposite lower corners. */
  html[dir="rtl"] #toastContainer.toast-container {
    left: calc(16px + var(--safe-left, 0px)) !important;
    right: auto !important;
    bottom: calc(24px + var(--safe-bottom, 0px)) !important;

    width: max-content !important;
    max-width: calc(100vw - 32px) !important;

    align-items: flex-start !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  html[dir="ltr"] #toastContainer.toast-container {
    right: calc(16px + var(--safe-right, 0px)) !important;
    left: auto !important;
    bottom: calc(24px + var(--safe-bottom, 0px)) !important;

    width: max-content !important;
    max-width: calc(100vw - 32px) !important;

    align-items: flex-end !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ------------------------------------------------------------
   4. MOBILE LANDSCAPE — SAFE-AREA PROTECTION
   ------------------------------------------------------------ */

@media (orientation: landscape) and (max-height: 500px) and (max-width: 900px) {

  html[dir="rtl"] #aiChatTrigger.ai-chat-trigger {
    left: auto !important;
    right: calc(10px + var(--safe-right, 0px)) !important;
    bottom: calc(10px + var(--safe-bottom, 0px)) !important;
  }

  html[dir="ltr"] #aiChatTrigger.ai-chat-trigger {
    right: auto !important;
    left: calc(10px + var(--safe-left, 0px)) !important;
    bottom: calc(10px + var(--safe-bottom, 0px)) !important;
  }

  html[dir="rtl"] #toastContainer.toast-container {
    left: calc(10px + var(--safe-left, 0px)) !important;
    right: auto !important;
  }

  html[dir="ltr"] #toastContainer.toast-container {
    right: calc(10px + var(--safe-right, 0px)) !important;
    left: auto !important;
  }
}

/* All size, spacing and control-contrast adjustments are screen-only so
   the established A4/PDF pagination and print type scale remain protected. */

@media screen {
  html[lang="fa"] body {
    font-size: 15px !important;
    line-height: 1.8 !important;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: auto !important;
    -moz-osx-font-smoothing: auto !important;
  }

  /* Stronger but restrained component boundaries. */

  html[data-theme="light"] {
    --line: #738B96;
    --line-bright: #607A86;
  }

  html[data-theme="dark"] {
    --line: #647F8B;
    --line-bright: #718D99;
  }

  /* Page and section hierarchy. */

  html[lang="fa"] .view-title,
  html[lang="fa"] .header-title-row .view-title {
    font-size: clamp(22px, 2vw, 27px) !important;
    line-height: 1.55 !important;
    font-weight: 800 !important;
  }

  /* ============================================================
   FanaGaam — Stage 1 Assessment Question Typography
   Applies consistently to all nine criteria.
   ============================================================ */

#view-screening .criterion-question {
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.65 !important;
}

/* Responsive typography */
@media screen and (max-width: 767px) {
  #view-screening .criterion-question {
    font-size: 18px !important;
    line-height: 1.65 !important;
  }
}

  html[lang="fa"] .question-card .q-text,
  html[lang="fa"] .q-text {
    font-size: 16px !important;
    line-height: 1.85 !important;
  }

  html[lang="fa"] .screening-options-column .option-text {
    font-size: 14.5px !important;
    line-height: 1.8 !important;
  }

  html[lang="fa"] .q-answers-vertical .ans-btn,
  html[lang="fa"] .ans-btn {
    font-size: 13.5px !important;
    line-height: 1.7 !important;
  }

  /* Forms and controls. */

  html[lang="fa"] .form-label,
  html[lang="fa"] .auth-label {
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  html[lang="fa"] .form-input,
  html[lang="fa"] .auth-input,
  html[lang="fa"] select,
  html[lang="fa"] textarea {
    font-size: 14.5px !important;
    line-height: 1.65 !important;
  }

  html[lang="fa"] .btn-primary,
  html[lang="fa"] .btn-danger,
  html[lang="fa"] .btn-ghost {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  html[lang="fa"] .btn-primary.btn-sm,
  html[lang="fa"] .btn-danger.btn-sm,
  html[lang="fa"] .btn-ghost.btn-sm {
    font-size: 12.5px !important;
  }

  html[lang="fa"] .side-nav .nav-item,
  html[lang="fa"] .nav-item {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  /* Tables and project comparisons. */

  html[lang="fa"] .data-table th,
  html[lang="fa"] .comparison-table th {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  html[lang="fa"] .data-table td,
  html[lang="fa"] .comparison-table .comparison-cell {
    font-size: 13px !important;
    line-height: 1.7 !important;
  }

  html[lang="fa"] .comparison-table .compare-project-title {
    font-size: 13px !important;
  }

  /* Raise legacy micro-labels (8–11px) to a readable 12px floor. */

  html[lang="fa"] :is(
    .nav-section-title,
    .notif-item-time,
    .all-notif-time,
    .autosave-indicator,
    .progress-label,
    .section-eyebrow,
    .tag,
    .status-badge,
    .mini-readiness-label,
    .q-criterion,
    .q-gate,
    .q-evidence-required,
    .q-evidence-ok,
    .result-meta-label,
    .result-meta-id,
    .trl-gauge-label,
    .metric-label,
    .gap-tag,
    .action-num,
    .benchmark-labels,
    .kpi-label,
    .ai-chat-status,
    .ai-chat-predefined-badge,
    .modal-subtitle,
    .file-drop-hint,
    .glossary-section-title,
    .footer-tag,
    .profile-info-label,
    .text-xs,
    .app-version,
    .public-trl-scale span,
    .public-visual-foot,
    .public-visual-card-note small,
    .fg-brand-copy small,
    .fg-demo-level small,
    .fg-demo-meta small
  ) {
    font-size: 12px !important;
    line-height: 1.65 !important;
  }

  html[lang="fa"] :is(
    .step-label,
    .breadcrumbs,
    .project-card-meta,
    .hero-stat-label,
    .cte-q-desc,
    .project-context-label,
    .criterion-badge,
    .trl-tab,
    .trl-tab-subtitle,
    .trl-tab-question-count,
    .legend-item,
    .trend-tooltip,
    .benchmark-value-badge,
    .kpi-trend,
    .ai-chat-subtitle,
    .ai-chat-notice,
    .tour-step-total,
    .tour-skip,
    .tour-prev,
    .tour-next,
    .profile-stat-label,
    .profile-pref-desc,
    .profile-activity-time,
    .profile-avatar-hint,
    .evidence-list-note,
    .auth-hint,
    .auth-demo-badge,
    .fg-demo-disclaimer,
    .public-footer-complex .footer-copy
  ) {
    font-size: 12.5px !important;
    line-height: 1.7 !important;
  }

  /* Notification hierarchy. */

  html[lang="fa"] .notif-item-title,
  html[lang="fa"] .all-notif-title {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }

  html[lang="fa"] .notif-item-text,
  html[lang="fa"] .all-notif-text,
  html[lang="fa"] .form-helper,
  html[lang="fa"] .form-hint,
  html[lang="fa"] .empty-state-desc {
    font-size: 13px !important;
    line-height: 1.8 !important;
  }

  html[lang="fa"] .toast-msg-text {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

  /* Stronger boundaries for input controls in both themes. */

  html[data-theme="light"] :is(.form-input, .auth-input, input:not([type="checkbox"]):not([type="radio"]), select, textarea),
  html[data-theme="dark"] :is(.form-input, .auth-input, input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border-color: var(--line-bright);
  }

  html[data-theme="light"] :is(.form-input, .auth-input, input, select, textarea)::placeholder,
  html[data-theme="dark"] :is(.form-input, .auth-input, input, select, textarea)::placeholder {
    color: var(--text-1);
    opacity: 1;
  }

  html[lang="fa"] body :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--brand-primary) !important;
    outline-offset: 3px !important;
  }
}

/* Mobile: comfortable fields and readable table cells without forcing
   desktop dimensions onto narrow layouts. */

@media screen and (max-width: 767px) {
  html[lang="fa"] .form-input,
  html[lang="fa"] .auth-input,
  html[lang="fa"] select,
  html[lang="fa"] textarea {
    font-size: 16px !important;
  }

  html[lang="fa"] .view-title,
  html[lang="fa"] .header-title-row .view-title {
    font-size: 22px !important;
  }

  html[lang="fa"] .q-answers-vertical .ans-btn,
  html[lang="fa"] .ans-btn {
    font-size: 12.5px !important;
  }

  html[lang="fa"] .data-table th,
  html[lang="fa"] .data-table td,
  html[lang="fa"] .comparison-table .comparison-cell {
    font-size: 12.5px !important;
  }
}

/* Print/PDF: keep the existing A4 type scale and pagination, only unify
   the Persian font family and chart text. */

@media print {
  html[lang="fa"] body,
  html[lang="fa"] body *:not(code):not(pre):not(.mono):not(.font-mono):not(.kbd):not(code *):not(pre *):not(.mono *):not(.font-mono *):not(.kbd *):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa *):not(.fas *):not(.far *):not(.fab *):not(.material-icons):not(.material-symbols-outlined):not(.bi):not(.iconfont):not([lang="en"]):not([lang="en"] *):not([dir="ltr"]):not([dir="ltr"] *):not(input[type="email"]):not(input[type="tel"]):not(input[type="url"]):not(input[type="password"]):not(#editProfilePhone):not(#otpInput):not(#authUsername):not(#authPassword):not(#forgotPassInput):not(#forgotRecoveryCode):not(#newPasswordInput):not(#confirmPasswordInput):not(.ltr-nums-inline):not(.ltr-nums-inline *) {
    font-family: var(--fg-font-persian) !important;
  }

  html[lang="fa"] svg text,
  html[lang="fa"] .radar-chart-card .radar-svg text {
    font-family: var(--fg-font-persian) !important;
  }
}

/* ============================================================
   FANAGAAM — PROFILE PHONE FIELD TYPOGRAPHY
   Persian: Vazirmatn | English: Inter
   ============================================================ */

/* Persian interface: use the native Persian typeface. */
html:not(.fg-lang-en) body #editProfilePhone,
html:not(.fg-lang-en) body #editProfilePhone::placeholder {
  font-family: var(--fg-font-persian) !important;
}

/* English interface: preserve the English typeface. */
html.fg-lang-en body #editProfilePhone,
html.fg-lang-en body #editProfilePhone::placeholder {
  font-family: var(--fg-font-latin) !important;
}

/* Make phone digits visually consistent and evenly spaced. */
html body #editProfilePhone {
  font-variant-numeric: lining-nums tabular-nums !important;
}

/* ============================================================
   FANAGAAM — STAGE 1 BOTTOM SPACING REFINEMENT
   Reduce excessive lower whitespace on Stage 1 only.
   Preserve a safe area for the floating assistant.
   ============================================================ */

/* Stage 1 navigation buttons: reduce the old 100px bottom margin. */
#screeningViewActions {
  margin-bottom: 24px !important;
}

/* Desktop: reduce the reserved bottom space only on Stage 1. */
#mainLayout:has(> .main-content > #view-screening.active) {
  padding-bottom: 90px !important;
}

/* Mobile: preserve enough clearance for the floating assistant. */
@media (max-width: 767px) {
  #mainLayout:has(> .main-content > #view-screening.active) {
    padding-bottom: 100px !important;
  }
}

/* New Project modal: center the submit label in Persian and English. */
#newProjectSubmitBtn.new-project-submit-btn {
  justify-content: center;
  text-align: center;
}
/* ============================================================
   FANAGAAM — OTP INPUT TYPOGRAPHY & BIDI FIX
   Persian placeholder: Vazirmatn
   Correct RTL placeholder + centered numeric input
   ============================================================ */

/* Input itself: centered code digits with Vazirmatn. */
html body #otpInput {
  direction: ltr !important;
  text-align: center !important;
  unicode-bidi: isolate !important;
  font-family: var(--fg-font-persian) !important;
  font-variant-numeric: lining-nums tabular-nums !important;
  letter-spacing: 0.02em !important;
}

/* Persian placeholder: correct right-to-left character order. */
html body #otpInput::placeholder {
  direction: rtl !important;
  text-align: center !important;
  unicode-bidi: plaintext !important;
  font-family: var(--fg-font-persian) !important;
  letter-spacing: 0 !important;
  opacity: 0.65 !important;
}

/* Preserve numeric input alignment while focused. */
html body #otpInput:focus {
  direction: ltr !important;
  text-align: center !important;
  unicode-bidi: isolate !important;
}

/* ============================================================
   FANAGAAM — FINAL OTP BILINGUAL TYPOGRAPHY
   Persian: Vazirmatn | English: Inter
   ============================================================ */

/* Persian placeholder */
html:not(.fg-lang-en) body #otpInput::placeholder {
  direction: rtl !important;
  text-align: center !important;
  unicode-bidi: isolate !important;
  font-family: var(--fg-font-persian) !important;
  letter-spacing: 0 !important;
  opacity: 0.65 !important;
}

/* English placeholder */
html.fg-lang-en body #otpInput::placeholder {
  direction: ltr !important;
  text-align: center !important;
  unicode-bidi: isolate !important;
  font-family: var(--fg-font-latin) !important;
  letter-spacing: 0 !important;
  opacity: 0.65 !important;
}

/* Persian input font */
html:not(.fg-lang-en) body #otpInput {
  font-family: var(--fg-font-persian) !important;
}

/* English input font */
html.fg-lang-en body #otpInput {
  font-family: var(--fg-font-latin) !important;
}

/* Keep the six-digit code centered in both languages */
html body #otpInput,
html body #otpInput:focus {
  direction: ltr !important;
  text-align: center !important;
  unicode-bidi: isolate !important;
  font-variant-numeric: lining-nums tabular-nums !important;
}

/* ============================================================
   FANAGAAM — NOTIFICATIONS MOBILE BUTTON WRAP FIX
   Keep the mark-read button fully inside its mobile container.
   Desktop and tablet layouts remain unchanged.
   ============================================================ */

@media (max-width: 767px) {

  /* Give the button wrapper the full available width */
  #view-notifications .view-header > div:last-child {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Keep the button inside the mobile content area */
  #view-notifications .btn-mark-read {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;

    padding: 9px 12px !important;
    gap: 8px !important;

    white-space: normal !important;
    flex-wrap: nowrap !important;
    line-height: 1.55 !important;
    overflow: visible !important;
  }

  /* Allow the Persian or English label to wrap naturally */
  #view-notifications .btn-mark-read > span {
    display: block !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    text-align: center !important;
    line-height: 1.55 !important;
  }

  /* Keep the check icon visible and correctly sized */
  #view-notifications .btn-mark-read svg {
    display: block !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin: 0 !important;
  }

}

/* ============================================================
   FANAGAAM — MOBILE NOTIFICATIONS BUTTON
   Remove check icon and center label in both languages.
   ============================================================ */

@media (max-width: 767px) {

  #view-notifications .btn-mark-read {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  /* Completely hide the check icon */
  #view-notifications .btn-mark-read > svg {
    display: none !important;
  }

  /* Center the label across the entire button */
  #view-notifications .btn-mark-read > span {
    display: block !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

}

/* FANAGAAM — MOBILE COMPARISON SCROLL HINT POSITION */
@media (max-width: 900px) {
  .comparison-table::after {
    bottom: 2px !important;
  }
}

/* ============================================================
   FANAGAAM — MOVE MOBILE COMPARE HINT BELOW TABLE
   Render the hint outside the horizontal scroll container.
   ============================================================ */

@media (max-width: 900px) {

  /* Remove the old hint from inside the scrollable table */
  #view-compare #compareTable::after {
    display: none !important;
    content: none !important;
  }

  /* Place the hint in the space below the table border */
  #view-compare .card.card-padded:has(> #compareTable)::after {
    content: 'برای مشاهده‌ی پروژه‌های بیشتر افقی اسکرول کنید';

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: fit-content !important;
    max-width: 100% !important;
    box-sizing: border-box !important;

    margin: 12px auto 0 !important;
    padding: 6px 12px !important;

    background: color-mix(in srgb, var(--brand-primary) 90%, transparent) !important;
    color: #ffffff !important;

    border-radius: 8px !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    line-height: 1.6 !important;
    text-align: center !important;

    pointer-events: none !important;
  }

}

/* ============================================================
   FANAGAAM — MOBILE SHORTCUTS LIST
   Balanced vertical spacing for shortcut menu items.
   ============================================================ */

@media (max-width: 767px) {
  #shortcutsList > .shortcut-modal-item {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    min-height: 76px !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   FANAGAAM — RESPONSIVE RADAR CIRCUMFERENCE LABELS
   Nine compact labels arranged around the radar.
   ============================================================ */

#radarSvg #radarAxisLabels {
  display: inline !important;
  visibility: visible !important;
}

#radarSvg #radarAxisLabels text {
  display: inline !important;
  visibility: visible !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

@media screen and (max-width: 767px) {

  #radarSvg #radarAxisLabels text {
    font-size: 22px !important;
    font-weight: 800 !important;
  }

}

/* Extra spacing protection for narrow phones. */
@media screen and (max-width: 360px) {

  #radarSvg #radarAxisLabels text {
    font-size: 20px !important;
  }

}
/* ============================================================
   FANAGAAM — RADAR LABELS: OUTSIDE THE CHART
   Nine labels, safe spacing, no overlap with the radar plot.
   ============================================================ */

#radarSvg #radarAxisLabels {
  display: inline !important;
  visibility: visible !important;
}

@media screen and (max-width: 767px) {

  .radar-chart-card {
    min-width: 0 !important;
    overflow: visible !important;
  }

  #radarSvg {
    display: block !important;
    width: calc(100% + 32px) !important;
    max-width: none !important;
    height: auto !important;
    margin-inline: -16px !important;
    overflow: visible !important;
  }

  #radarSvg #radarAxisLabels text {
    display: inline !important;
    visibility: visible !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }
}

/* ============================================================
   FANAGAAM — LARGE BILINGUAL TRL SUBTITLE
   Larger type with explicit line breaks and circular safe area.
   ============================================================ */

@media screen {

  html body .trl-gauge-content #resultTrlSub {
    display: block !important;

    flex: 0 1 auto !important;

    width: 132px !important;
    min-width: 0 !important;
    max-width: 132px !important;

    margin: 0 auto !important;
    padding: 0 !important;

    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;

    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;

    position: relative !important;
    top: -4px !important;

    box-sizing: border-box !important;
  }

  html body .trl-gauge-content #resultTrlSub .trl-gauge-sub-level {
    display: inline-block !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    white-space: nowrap !important;
  }

  html body .trl-gauge-content #resultTrlSub .trl-gauge-sub-status {
    display: inline-block !important;
    max-width: 100% !important;
  }

}

@media screen and (max-width: 767px) {

  html body .trl-gauge-content #resultTrlSub {
    width: 126px !important;
    min-width: 0 !important;
    max-width: 126px !important;

    font-size: 14px !important;
    line-height: 1.3 !important;
    top: -4px !important;
  }

}

/* ============================================================
   FANAGAAM — MOBILE RADAR LANGUAGE-BASED ALIGNMENT
   English: preserve existing left position.
   Persian: shift the complete radar 8px to the right.
   Desktop: no position change.
   ============================================================ */

@media screen and (max-width: 767px) {

  /* Default responsive position — English and other locales. */
  #radarSvg {
    position: relative !important;
    left: -12px !important;
  }

  /* Persian responsive position — 8px further to the right. */
  html[lang="fa"] #radarSvg {
    left: -4px !important;
  }

}

/* ============================================================
   FANAGAAM — CENTERED COMPACT MOBILE DATE PICKER
   Applies to both Jalali and Gregorian calendars.
   Desktop layout remains unchanged.
   ============================================================ */

@media screen and (max-width: 767px) {

  #jalaliPickerPopup {
    width: min(300px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;

    margin: 0 !important;
    padding: 12px !important;

    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;

    border-radius: 16px !important;
  }

  /* Calendar header */
  #jalaliPickerPopup .jp-header {
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
    gap: 6px !important;
  }

  #jalaliPickerPopup .jp-nav-group {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  #jalaliPickerPopup .jp-nav {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;

    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;

    padding: 0 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  #jalaliPickerPopup .jp-month-year {
    min-width: 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  /* Weekday header */
  #jalaliPickerPopup .jp-weekdays {
    gap: 3px !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
  }

  #jalaliPickerPopup .jp-weekdays > div {
    padding: 2px 0 !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
  }

  /* Calendar day grid */
  #jalaliPickerPopup .jp-days {
    gap: 3px !important;
    margin-bottom: 10px !important;
  }

  #jalaliPickerPopup .jp-day {
    width: 100% !important;

    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;

    padding: 0 !important;

    font-size: 12.5px !important;
    line-height: 1 !important;
    border-radius: 8px !important;

    box-sizing: border-box !important;
  }

  /* Footer buttons */
  #jalaliPickerPopup .jp-footer {
    gap: 8px !important;
    padding-top: 10px !important;
  }

  #jalaliPickerPopup .jp-btn {
    min-height: 36px !important;
    max-height: 40px !important;

    padding: 7px 8px !important;

    font-size: 11.5px !important;
    line-height: 1.3 !important;

    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

}

/* Extra compact sizing for narrow phones. */
@media screen and (max-width: 360px) {

  #jalaliPickerPopup {
    width: min(288px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 10px !important;
  }

  #jalaliPickerPopup .jp-nav {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;

    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
  }

  #jalaliPickerPopup .jp-day {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    font-size: 12px !important;
  }

}
/* ============================================================
   CTE HEADER — PYRAMID ENGLISH TITLE
   Persian: preserve the original single-line heading.
   English mobile: two centered lines, shorter line on top.
   ============================================================ */

/* Default language: Persian */
#view-cte .cte-title-fa {
  display: inline !important;
}

#view-cte .cte-title-en {
  display: none !important;
}

/* English language */
html[lang="en"] #view-cte .cte-title-fa {
  display: none !important;
}

html[lang="en"] #view-cte .cte-title-en {
  display: inline !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* English responsive pyramid layout */
@media screen and (max-width: 767px) {

  html[lang="en"] #view-cte .view-title.cte-title {
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 auto !important;
    padding: 0 !important;

    font-size: clamp(12px, 3.7vw, 16px) !important;
    line-height: 1.4 !important;

    text-align: center !important;
    white-space: normal !important;

    box-sizing: border-box !important;
  }

  html[lang="en"] #view-cte .cte-title-en {
    display: flex !important;

    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 auto !important;

    gap: 2px !important;

    direction: ltr !important;
    text-align: center !important;

    box-sizing: border-box !important;
  }

  html[lang="en"] #view-cte .cte-title-en-top,
  html[lang="en"] #view-cte .cte-title-en-bottom {
    display: block !important;

    width: fit-content !important;
    max-width: 100% !important;

    margin-inline: auto !important;
    padding: 0 !important;

    text-align: center !important;
    white-space: nowrap !important;

    line-height: 1.4 !important;
  }

}

/* ============================================================
   FANAGAAM — RESPONSIVE BRAND VERTICAL ALIGNMENT
   Vertically center the logo symbol against the complete
   three-line brand text block.
   Preserve existing responsive brand font sizes.
   ============================================================ */

@media screen and (max-width: 720px) {

  /* Main brand row */
  html body #publicLanding .fg-topbar .public-brand.fg-brand {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  /* Official brand symbol */
  html body #publicLanding .fg-topbar .fg-brand-symbol {
    display: block !important;

    align-self: center !important;

    flex-shrink: 0 !important;

    margin-block: auto !important;

    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Complete brand text block */
  html body #publicLanding .fg-topbar .fg-brand-copy {
    display: flex !important;

    flex-direction: column !important;

    justify-content: center !important;
    align-self: center !important;

    min-width: 0 !important;

    margin-block: auto !important;
    gap: 1px !important;
  }

  /* English brand title — retain the previous size. */
  html.fg-lang-en body #publicLanding .fg-topbar .fg-brand-copy > strong {
    font-size: 15px !important;
    line-height: 1.15 !important;
  }

}

@media screen and (max-width: 390px) {

  /* Compact English title on narrow phones. */
  html.fg-lang-en body #publicLanding .fg-topbar .fg-brand-copy > strong {
    font-size: 14px !important;
  }

}
/* ============================================================
   FANAGAAM — RESPONSIVE ENGLISH SUBTITLE ALIGNMENT
   Center the wrapped English subtitle lines.
   This naturally moves the shorter Readiness line inward.
   ============================================================ */

@media screen and (max-width: 767px) {

  html.fg-lang-en body #mainHeader .logo-text .logo-sub {
    display: block !important;
    width: 100% !important;

    direction: ltr !important;
    text-align: center !important;
    unicode-bidi: isolate !important;

    box-sizing: border-box !important;
  }

}
/* ============================================================
   RESPONSIVE RECOVERY SCREEN — TOP CONTROL SAFE AREA
   Reserve space for language/theme controls and back button.
   Keep the recovery card completely below the top controls.
   Applies equally to Persian and English.
   ============================================================ */

@media (max-width: 767px) {

  /* Recovery/reset screen: create a dedicated top safe area. */
  #forgotPasswordScreen.auth-screen {
    align-items: flex-start !important;
    justify-content: center !important;

    padding: 80px 16px 16px !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    box-sizing: border-box !important;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  /* Keep the complete card inside the remaining viewport area. */
  #forgotPasswordScreen .auth-card {
    margin: 0 auto !important;

    max-height: calc(100dvh - 96px) !important;
    min-height: 0 !important;

    box-sizing: border-box !important;
  }

}
/* ============================================================
   RESPONSIVE FORGOT PASSWORD — SAFE VERTICAL CENTERING
   Preserve hidden-state behavior and top-control safe area.
   Persian and English layouts are both supported.
   ============================================================ */

@media (max-width: 767px) {

  #forgotPasswordScreen.auth-screen {
    /* Do not override display or the hidden state. */
    align-items: center !important;
    justify-content: center !important;

    padding: 80px 16px 16px !important;

    box-sizing: border-box !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  #forgotPasswordScreen .auth-card {
    margin: 0 auto !important;

    min-height: 0 !important;
    max-height: calc(100dvh - 96px) !important;

    box-sizing: border-box !important;

    flex: 0 1 auto !important;
  }

}
/* Responsive recovery input — refined placeholder typography */
@media (max-width: 767px) {
  #forgotPasswordScreen #forgotPassInput::placeholder {
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
  }
}
/* Responsive recovery placeholder: Persian alignment and typography */
@media (max-width: 767px) {
  html[lang="fa"] #forgotPasswordScreen #forgotPassInput:placeholder-shown {
    text-align: right !important;
    font-family: var(--fg-font-persian) !important;
  }

  html[lang="fa"] #forgotPasswordScreen #forgotPassInput::placeholder {
    direction: rtl !important;
    text-align: right !important;
    font-family: var(--fg-font-persian) !important;
  }
}
/* ================================================================
   FANAGAAM — ENGLISH AUTH LABEL ALIGNMENT
   Responsive + Desktop
   Preserve Persian alignment in all viewports.
   ================================================================ */

/* English authentication labels — responsive */
@media screen and (max-width: 767px) {

  html[lang="en"] #authScreen .auth-form-group > .auth-label,
  html[lang="en"] #forgotPasswordScreen .auth-form-group > .auth-label {
    direction: ltr !important;
    text-align: left !important;
  }

}

/* English authentication labels — desktop */
@media screen and (min-width: 768px) {

  html[lang="en"] #authScreen .auth-form-group > .auth-label,
  html[lang="en"] #forgotPasswordScreen .auth-form-group > .auth-label {

    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;

    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate !important;
  }

}

/* Responsive CTE action button: remove check icon and center label */
@media (max-width: 767px) {
  #view-cte #cteActionBtn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  #view-cte #cteActionBtn > svg {
    display: none !important;
  }

  #view-cte #cteActionBtn > span {
    display: flex !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
}
/* Responsive welcome modal button: hide check icon and center text */
@media (max-width: 767px) {
  #welcomeModal .modal-footer > button > svg {
    display: none !important;
  }

  #welcomeModal .modal-footer > button {
    justify-content: center !important;
    text-align: center !important;
    gap: 0 !important;
  }
}
/* Responsive metric cards: align evidence and critical-gap values */
@media (max-width: 767px) {
  #metricEvidence > .metric-label,
  #metricGaps > .metric-label {
    display: block !important;
    min-height: 2.8em !important;
    line-height: 1.4 !important;
  }
}
/* Persian benchmark warning: correct RTL punctuation direction on desktop and mobile */
html[lang="fa"] #view-benchmark .benchmark-data-warning {
  direction: rtl !important;
  unicode-bidi: isolate !important;
  text-align: center !important;
}
/* Responsive profile: align all empty contact placeholders */
@media (max-width: 767px) {
  #view-profile .profile-info-item > div {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  #view-profile .profile-info-value.is-empty-placeholder {
    display: block !important;
    width: 100% !important;
    direction: inherit !important;
    text-align: start !important;
  }
}

/* Desktop Persian profile: align all empty contact placeholders to one vertical column */
@media screen and (min-width: 768px) {
  html[lang="fa"] #view-profile .profile-info-item > div {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  html[lang="fa"] #view-profile .profile-info-value.is-empty-placeholder {
    display: block !important;
    width: 100% !important;
    direction: inherit !important;
    text-align: start !important;
  }
}
/* ================================================================
   FANAGAAM — ENGLISH PROFILE PHONE ALIGNMENT
   Responsive + Desktop
   Preserve Persian alignment.
   ================================================================ */

/* Responsive English profile */
@media screen and (max-width: 767px) {
  html[lang="en"] #view-profile #profilePhone {
    direction: ltr !important;
    text-align: left !important;
  }
}

/* Desktop English profile */
@media screen and (min-width: 768px) {
  html[lang="en"] #view-profile #profilePhone {
    direction: ltr !important;
    text-align: left !important;
  }
}
/* Responsive Persian profile: right-align email while preserving LTR text */
@media (max-width: 767px) {
  html[lang="fa"] #view-profile #profileEmail {
    direction: ltr !important;
    text-align: right !important;
    unicode-bidi: isolate !important;
  }
}

/* Desktop Persian profile: right-align email while preserving LTR text */
@media screen and (min-width: 768px) {
  html[lang="fa"] #view-profile #profileEmail {
    direction: ltr !important;
    text-align: right !important;
    unicode-bidi: isolate !important;
  }
}

/* Desktop Persian profile: align empty email placeholder with other contact values */
@media screen and (min-width: 768px) {
  html[lang="fa"] #view-profile #profileEmail.is-empty-placeholder {
    text-align: right !important;
  }
}
/* Responsive profile save button: hide check and center label */
@media (max-width: 767px) {
  #editProfileModal .modal-footer > .profile-save-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    text-align: center !important;
  }

  #editProfileModal .modal-footer > .profile-save-button .profile-save-check {
    display: none !important;
  }

  #editProfileModal .modal-footer > .profile-save-button .profile-save-text {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    text-align: center !important;
  }
}
/* Responsive activity delete buttons: only the visible square is clickable */
@media (max-width: 767px) {
  #view-profile .activity-delete {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
    font-size: 0 !important;
    transform: none !important;
  }

  #view-profile .activity-delete-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: rgba(244, 63, 94, 0.08) !important;
    border: 1px solid rgba(244, 63, 94, 0.2) !important;
    color: #f472b6 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    pointer-events: none !important;
  }

  #view-profile .profile-activity-body {
    padding-inline-end: 54px !important;
    padding-inline-start: 0 !important;
  }
}
/* Responsive drawer close button: language-independent X centering */
@media (max-width: 767px) {
  #sideNavMain .drawer-close-btn,
  #sideNavProject .drawer-close-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    flex: 0 0 34px !important;

    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
    text-align: center !important;

    font-family: Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;

    border-radius: 8px !important;
  }
}
/* Responsive English unconfirmed TRL: keep title inside the gauge */
@media (max-width: 767px) {
  html.fg-lang-en
  .trl-gauge.trl-gauge-unconfirmed-en
  .trl-gauge-label {
    position: relative !important;
    top: 12px !important;
    transform: none !important;
    text-align: center !important;
  }
}

/* Desktop English unconfirmed TRL: keep title inside the gauge */
@media screen and (min-width: 768px) {
  html.fg-lang-en
  .trl-gauge.trl-gauge-unconfirmed-en
  .trl-gauge-label {
    position: relative !important;
    top: 12px !important;
    transform: none !important;
    text-align: center !important;
  }
}
/* Responsive English admin action: fit the complete label without clipping */
@media (max-width: 767px) {

  html.fg-lang-en #view-admin .view-header > div:last-child {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html.fg-lang-en #view-admin .view-header > div:last-child > button[onclick*="openNewProjectModal"] {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    max-width: 280px !important;
    min-width: 0 !important;
    flex: 0 1 280px !important;

    min-height: 54px !important;
    padding: 12px 12px !important;
    gap: 8px !important;

    box-sizing: border-box !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    letter-spacing: -0.015em !important;
    text-align: center !important;
  }

  html.fg-lang-en #view-admin .view-header > div:last-child > button[onclick*="openNewProjectModal"] > svg {
    display: block !important;
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    margin: 0 !important;
  }
}
/* Responsive English comparison hint: override the visible card pseudo-element */
@media (max-width: 900px) {
  html.fg-lang-en #view-compare .card.card-padded:has(> #compareTable)::after {
    content: 'Scroll horizontally to view more projects' !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
  }
}
/* Responsive English hero stats: align all three labels on two lines */
@media (max-width: 767px) {
  html.fg-lang-en #view-projects .hero-stats .hero-stat-label {
    display: block !important;
    width: 6.5em !important;
    max-width: 100% !important;
    min-height: 3em !important;
    box-sizing: border-box !important;

    margin: 2px auto 0 !important;
    line-height: 1.5 !important;
    text-align: center !important;

    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
}
/* ================================================================
   FANAGAAM — RESPONSIVE ENGLISH DEEP-ASSESSMENT ANSWER GRID
   All five answers share exactly two aligned columns:
   1. Fixed-width centered icon
   2. Left-aligned text with a common starting position
   Mobile / English only — Stage 2 only
   ================================================================ */

@media screen and (max-width: 767px) {

  /* All five answer buttons use one identical grid. */

  html.fg-lang-en #view-deep .q-answers-vertical .ans-btn {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;

    align-items: center !important;
    justify-content: initial !important;

    column-gap: 8px !important;

    width: 100% !important;
    box-sizing: border-box !important;

    direction: ltr !important;
    text-align: left !important;
  }

  /* Icon column: fixed width and identical horizontal alignment. */

  html.fg-lang-en #view-deep .q-answers-vertical .ans-btn > span:first-child {
    grid-column: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;

    margin: 0 !important;

    text-align: center !important;
    line-height: 1 !important;

    justify-self: center !important;
    box-sizing: border-box !important;
  }

  /* Text column: identical starting position for every answer. */

  html.fg-lang-en #view-deep .q-answers-vertical .ans-btn > span:last-child {
    grid-column: 2 !important;

    display: block !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;

    text-align: left !important;

    justify-self: stretch !important;
    box-sizing: border-box !important;
  }

}

/* END RESPONSIVE ENGLISH DEEP-ASSESSMENT ANSWER GRID */
/* ================================================================
   FANAGAAM — DESKTOP TOAST CLARITY & OPAQUE SURFACE FIX
   Persian + English | Desktop only
   ================================================================ */

@media screen and (min-width: 768px) {

  /* Keep visible toast notifications fully opaque and crisp. */
  #toastContainer.toast-container .toast:not(.toast-hiding) {
    opacity: 1 !important;

    background: var(--toast-surface, var(--bg-2)) !important;
    background-image: none !important;

    filter: none !important;
    -webkit-filter: none !important;

    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    /* Prevent composited transform/opacity rendering. */
    animation: none !important;
    transform: none !important;
    will-change: auto !important;

    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;

    /* Keep the exit state functional without animating the entrance. */
    transition:
      opacity 0.16s ease,
      transform 0.16s ease,
      margin 0.16s ease !important;
  }

  /* Clear and high-contrast notification message. */
  #toastContainer.toast-container .toast-msg-text {
    display: block !important;

    opacity: 1 !important;
    color: var(--text-0) !important;
    -webkit-text-fill-color: currentColor !important;

    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.7 !important;

    filter: none !important;
    -webkit-filter: none !important;
    text-shadow: none !important;

    font-synthesis: none !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;

    overflow-wrap: anywhere !important;
  }

  /* Persian notification typography. */
  html[lang="fa"] #toastContainer.toast-container .toast-msg-text {
    font-family: var(--fg-font-persian, "Vazirmatn", Tahoma, sans-serif) !important;
  }

  /* English notification typography. */
  html[lang="en"] #toastContainer.toast-container .toast-msg-text {
    font-family: var(--fg-font-latin, "Inter", "Segoe UI", Arial, sans-serif) !important;
  }

  /* Keep the notification icon fully visible and sharp. */
  #toastContainer.toast-container .toast-icon-wrap,
  #toastContainer.toast-container .toast-svg-icon {
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    text-shadow: none !important;
  }

  /* Explicit solid surfaces for both themes. */
  html[data-theme="light"] #toastContainer.toast-container .toast:not(.toast-hiding) {
    background: #FFFFFF !important;
  }

  html[data-theme="dark"] #toastContainer.toast-container .toast:not(.toast-hiding) {
    background: #102432 !important;
  }

}
/* ================================================================
   FANAGAAM — RESPONSIVE TOAST CLARITY FIX
   Persian + English | Mobile / Responsive
   Solid surface, crisp text, no entrance blur.
   ================================================================ */

@media screen and (max-width: 767px) {

  /* Visible notification surface */
  #toastContainer.toast-container .toast:not(.toast-hiding) {
    opacity: 1 !important;

    min-height: 56px !important;
    padding: 12px 16px !important;
    gap: 11px !important;

    background: var(--toast-surface, var(--bg-2)) !important;
    background-image: none !important;

    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    /* Prevent transform/opacity compositing blur. */
    animation: none !important;
    transform: none !important;
    will-change: auto !important;

    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;

    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      margin 0.18s ease !important;
  }

  /* Preserve the normal exit state. */
  #toastContainer.toast-container .toast.toast-hiding {
    animation: none !important;
    opacity: 0 !important;
    transform: translateY(12px) scale(0.98) !important;
  }

  /* Strong, readable notification text. */
  #toastContainer.toast-container .toast-msg-text {
    display: block !important;
    min-width: 0 !important;

    opacity: 1 !important;
    color: var(--text-0) !important;
    -webkit-text-fill-color: currentColor !important;

    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.7 !important;

    direction: inherit !important;
    text-align: start !important;

    filter: none !important;
    -webkit-filter: none !important;
    text-shadow: none !important;

    font-synthesis: none !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;

    overflow-wrap: anywhere !important;
  }

  /* Persian typography */
  html[lang="fa"] #toastContainer.toast-container .toast-msg-text {
    font-family: var(--fg-font-persian, "Vazirmatn", Tahoma, sans-serif) !important;
  }

  /* English typography */
  html[lang="en"] #toastContainer.toast-container .toast-msg-text,
  html.fg-lang-en #toastContainer.toast-container .toast-msg-text {
    font-family: var(--fg-font-latin, "Inter", Arial, sans-serif) !important;
  }

  /* Keep icons crisp as well. */
  #toastContainer.toast-container .toast-icon-wrap,
  #toastContainer.toast-container .toast-svg-icon {
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    text-shadow: none !important;
  }

}
/* ================================================================
   FANAGAAM — ENGLISH DESKTOP PROCESS CARD ACCENT ALIGNMENT
   Move the top accent marker from right to left.
   Applies only to the four assessment process cards.
   ================================================================ */

@media screen and (min-width: 768px) {

  html[lang="en"] .fg-process-card::before,
  html.fg-lang-en .fg-process-card::before {

    right: auto !important;
    left: 20px !important;

  }

}
/* ================================================================
   FANAGAAM — DESKTOP PERSIAN RECOVERY INPUT
   Vazirmatn + RTL + Right-aligned placeholder
   Mobile and English remain unchanged.
   ================================================================ */

@media screen and (min-width: 768px) {

  html[lang="fa"] #forgotPasswordScreen #forgotPassInput:placeholder-shown {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
    font-family: var(--fg-font-persian, "Vazirmatn"), Tahoma, sans-serif !important;
  }

  html[lang="fa"] #forgotPasswordScreen #forgotPassInput::placeholder {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
    font-family: var(--fg-font-persian, "Vazirmatn"), Tahoma, sans-serif !important;
  }

}
/* ================================================================
   FANAGAAM — PERSIAN RECOVERY CODE PLACEHOLDER FONT
   Desktop + Responsive | Persian only
   Vazirmatn typography
   ================================================================ */

html[lang="fa"] #forgotPasswordScreen #forgotRecoveryCode::placeholder {

  font-family: "Vazirmatn", var(--fg-font-persian), Tahoma, sans-serif !important;

  font-synthesis: none !important;
  letter-spacing: 0 !important;

}
/* ================================================================
   FANAGAAM — DESKTOP CTE CARD HOVER CLARITY FIX
   Persian + English
   Desktop only — preserve solid card appearance and sharp text.
   ================================================================ */

@media screen and (min-width: 1024px) {

  /* Keep all four CTE cards fully visible and crisp. */
  #view-cte .cte-item,
  #view-cte .cte-item:hover,
  #view-cte .cte-item:focus,
  #view-cte .cte-item:focus-visible {

    opacity: 1 !important;

    background: var(--bg-2) !important;

    filter: none !important;
    -webkit-filter: none !important;

    /* Prevent GPU compositing blur caused by 3D movement. */
    transform: none !important;
    will-change: auto !important;

    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;

    /* Retain subtle hover feedback without moving the card. */
    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease !important;
  }

  /* Keep all card contents fully opaque and sharp. */
  #view-cte .cte-item *,
  #view-cte .cte-item:hover * {
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    text-shadow: none !important;
  }

}
/* ================================================================
   FANAGAAM — DESKTOP ACTION BUTTON TEXT CENTERING
   Six approved buttons/states
   Desktop only | Persian + English
   ================================================================ */

@media screen and (min-width: 768px) {

  /* IMAGE 1 — Welcome modal */

  #welcomeModal .welcome-start-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #welcomeModal .welcome-start-btn > span {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }


  /* IMAGES 2, 3, 4, 5 — CTE action button */

  #view-cte #cteActionBtn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #view-cte #cteActionBtn > span {
    display: block !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: center !important;
  }


  /* IMAGE 6 — Profile save button */

  #editProfileModal .profile-save-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #editProfileModal .profile-save-action > span {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

}
/* ======================================================================
   FANAGAAM — IMAGE-LED HOME ACTION CARDS
   Scope: only the two main cards in #view-home.
   Preserved desktop geometry: 400 x 248 CSS px.
   ====================================================================== */

#view-home .dashboard-action-card {
  position: relative !important;
  isolation: isolate !important;

  display: block !important;

  flex: 1 1 300px !important;
  width: min(100%, 400px) !important;
  max-width: 400px !important;

  aspect-ratio: 400 / 248 !important;
  min-height: 0 !important;

  box-sizing: border-box !important;
  padding: 0 !important;

  overflow: hidden !important;

  border: 0 !important;
  border-radius: 20px !important;

  text-align: start !important;
  text-decoration: none !important;

  color: var(--text-0) !important;

  box-shadow:
    0 14px 30px rgba(18, 75, 103, .15),
    0 2px 7px rgba(18, 75, 103, .08) !important;

  transition: box-shadow .28s ease !important;
  cursor: pointer !important;
}

/* کارت لیست فناوری‌ها */
#view-home .dashboard-action-card--list {
  background:
    linear-gradient(
      90deg,
      #28c7c2 0%,
      #b9eeeb 47%,
      #fbfeff 100%
    ) !important;
}

/* کارت ثبت فناوری جدید */
#view-home .dashboard-action-card--new {
  background:
    linear-gradient(
      90deg,
      #51b8fa 0%,
      #c5e9ff 48%,
      #fbfdff 100%
    ) !important;
}

/* ناحیه تصویر سه‌بعدی */
/* IMAGE BLEED FIX — Seamless card artwork edges */

#view-home .dashboard-action-visual {
  position: absolute !important;

  inset-block: 0 !important;

  /* Extend artwork beyond the card's outer edge */
  inset-inline-end: -32px !important;

  /* Compensate width to preserve the inner boundary */
  width: calc(62% + 32px) !important;
  height: 100% !important;

  overflow: hidden !important;
  pointer-events: none !important;

  z-index: 0 !important;

  -webkit-mask-image:
    linear-gradient(to right, #000 0%, #000 64%, transparent 100%) !important;

  mask-image:
    linear-gradient(to right, #000 0%, #000 64%, transparent 100%) !important;
}

#view-home .dashboard-action-visual img {
  display: block !important;

  width: 100% !important;
  height: 100% !important;

  object-fit: cover !important;
  object-position: center !important;

  transform: scale(1.015) !important;

  transition:
    transform .42s cubic-bezier(.2, .7, .2, 1) !important;
}

/* بخش متن کارت */
#view-home .dashboard-action-content {
  position: absolute !important;

  inset-inline-start: 22px !important;
  inset-block-start: 50% !important;

  transform: translateY(-50%) !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;

  gap: 8px !important;

  width: 43% !important;
  padding-block-end: 25px !important;

  z-index: 1 !important;

  min-width: 0 !important;
  text-align: start !important;

  font-family: inherit !important;
}

#view-home .dashboard-action-title {
  display: block !important;

  margin: 0 !important;

  color: var(--text-0) !important;

  font-size: 18px !important;
  line-height: 1.45 !important;
  font-weight: 900 !important;

  font-family: inherit !important;
}

#view-home .dashboard-action-desc {
  display: block !important;

  color: var(--text-1) !important;

  font-size: 13px !important;
  line-height: 1.75 !important;
  font-weight: 600 !important;

  font-family: inherit !important;
}

/* فلش پایین کارت */
#view-home .dashboard-action-arrow {
  position: absolute !important;

  inset-inline-start: 18px !important;
  inset-block-end: 15px !important;

  width: 34px !important;
  height: 34px !important;

  display: grid !important;
  place-items: center !important;

  border-radius: 50% !important;

  background: #e2f8f6 !important;
  color: #087e83 !important;

  z-index: 2 !important;

  transition:
    background-color .25s ease,
    color .25s ease !important;
}

#view-home .dashboard-action-arrow svg {
  display: block !important;

  width: 18px !important;
  height: 18px !important;

  transform: none !important;
  transition: transform .25s ease !important;
}

/* جهت فلش و ترکیب‌بندی در فارسی */
html[dir="rtl"] #view-home .dashboard-action-arrow svg {
  transform: rotate(180deg) !important;
}

/* آینه‌سازی چیدمان در زبان انگلیسی */
html[dir="ltr"] #view-home .dashboard-action-card--list {
  background:
    linear-gradient(
      270deg,
      #28c7c2 0%,
      #b9eeeb 47%,
      #fbfeff 100%
    ) !important;
}

html[dir="ltr"] #view-home .dashboard-action-card--new {
  background:
    linear-gradient(
      270deg,
      #51b8fa 0%,
      #c5e9ff 48%,
      #fbfdff 100%
    ) !important;
}

html[dir="ltr"] #view-home .dashboard-action-visual {
  -webkit-mask-image:
    linear-gradient(to left, #000 0%, #000 64%, transparent 100%) !important;

  mask-image:
    linear-gradient(to left, #000 0%, #000 64%, transparent 100%) !important;
}

/* تعامل Hover بدون جابه‌جایی یا تغییر ابعاد کارت */
#view-home .dashboard-action-card:hover {
  border: 0 !important;
  transform: none !important;

  box-shadow:
    0 18px 34px rgba(18, 75, 103, .2),
    0 4px 12px rgba(18, 75, 103, .1) !important;
}

#view-home .dashboard-action-card:hover .dashboard-action-visual img {
  transform: scale(1.045) !important;
}

#view-home .dashboard-action-card:hover .dashboard-action-arrow {
  background: #c9f1ed !important;
}

#view-home .dashboard-action-card:hover .dashboard-action-arrow svg {
  transform: translateX(2px) !important;
}

html[dir="rtl"] #view-home .dashboard-action-card:hover .dashboard-action-arrow svg {
  transform: translateX(-2px) rotate(180deg) !important;
}

/* فوکوس دسترس‌پذیری صفحه‌کلید */
#view-home .dashboard-action-card:focus-visible {
  outline: 3px solid var(--brand-primary) !important;
  outline-offset: 5px !important;
}

/* سازگاری با تم تاریک */
html[data-theme="dark"] #view-home .dashboard-action-card {
  box-shadow:
    0 16px 34px rgba(0, 0, 0, .34),
    0 2px 8px rgba(0, 0, 0, .22) !important;
}

html[data-theme="dark"] #view-home .dashboard-action-card--list {
  background:
    linear-gradient(90deg, #0d7778 0%, #164c59 48%, #172b3c 100%) !important;
}

html[data-theme="dark"] #view-home .dashboard-action-card--new {
  background:
    linear-gradient(90deg, #176caa 0%, #1b4c70 48%, #172b3c 100%) !important;
}

html[data-theme="dark"][dir="ltr"] #view-home .dashboard-action-card--list {
  background:
    linear-gradient(270deg, #0d7778 0%, #164c59 48%, #172b3c 100%) !important;
}

html[data-theme="dark"][dir="ltr"] #view-home .dashboard-action-card--new {
  background:
    linear-gradient(270deg, #176caa 0%, #1b4c70 48%, #172b3c 100%) !important;
}

html[data-theme="dark"] #view-home .dashboard-action-arrow {
  background: #153f4b !important;
  color: #8ce9e2 !important;
}

/* موبایل */
@media (max-width: 767px) {
  #view-home .dashboard-action-content {
    inset-inline-start: 16px !important;
    width: 46% !important;
  }

  #view-home .dashboard-action-title {
    font-size: 16px !important;
  }

  #view-home .dashboard-action-desc {
    font-size: 12px !important;
  }

  #view-home .dashboard-action-arrow {
    inset-inline-start: 14px !important;
    width: 32px !important;
    height: 32px !important;
  }
}

/* احترام به تنظیم کاهش حرکت سیستم */
@media (prefers-reduced-motion: reduce) {
  #view-home .dashboard-action-card,
  #view-home .dashboard-action-visual img,
  #view-home .dashboard-action-arrow,
  #view-home .dashboard-action-arrow svg {
    transition: none !important;
  }

  #view-home .dashboard-action-card:hover .dashboard-action-visual img {
    transform: none !important;
  }
}
/* ======================================================================
   FanaGaam — Stage 2 Evidence Upload: Refined Disabled State
   Readable content, muted controls, no parent opacity.
   ====================================================================== */

/* Light theme */
.upload-card.is-disabled {
  background: #F1F4F6 !important;
  border-color: #BCC8D0 !important;
  border-style: dashed !important;
  color: #465965 !important;
}

/* Upload icon */
.upload-card.is-disabled .upload-icon {
  background: #E4EAEE !important;
  color: #71818B !important;
}

.upload-card.is-disabled .upload-icon svg {
  color: #71818B !important;
}

/* Main title */
.upload-card.is-disabled .upload-title,
.upload-card.is-disabled .upload-guidance-title {
  color: #40535F !important;
  opacity: 1 !important;
}

/* Description, evidence guidance and helper text */
.upload-card.is-disabled .upload-desc,
.upload-card.is-disabled .upload-guidance,
.upload-card.is-disabled > small,
.upload-card.is-disabled .evidence-title-inline {
  color: #526570 !important;
  opacity: 1 !important;
}

/* Disabled upload button: visibly inactive but fully readable */
.upload-card.is-disabled .upload-btn:disabled,
.upload-card.is-disabled .upload-btn:disabled:hover,
.upload-card.is-disabled .upload-btn:disabled:active {
  background: #E6ECEF !important;
  border-color: #C5D0D7 !important;
  color: #50616C !important;
  opacity: 1 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  cursor: not-allowed !important;
}

/* Dark theme */
[data-theme="dark"] .upload-card.is-disabled {
  background: #1B303C !important;
  border-color: #50636E !important;
  color: #D0DCE2 !important;
}

[data-theme="dark"] .upload-card.is-disabled .upload-icon {
  background: #2A404C !important;
  color: #AFC0C9 !important;
}

[data-theme="dark"] .upload-card.is-disabled .upload-icon svg {
  color: #AFC0C9 !important;
}

[data-theme="dark"] .upload-card.is-disabled .upload-title,
[data-theme="dark"] .upload-card.is-disabled .upload-guidance-title {
  color: #D6E0E5 !important;
}

[data-theme="dark"] .upload-card.is-disabled .upload-desc,
[data-theme="dark"] .upload-card.is-disabled .upload-guidance,
[data-theme="dark"] .upload-card.is-disabled > small,
[data-theme="dark"] .upload-card.is-disabled .evidence-title-inline {
  color: #B8C6CE !important;
}

[data-theme="dark"] .upload-card.is-disabled .upload-btn:disabled,
[data-theme="dark"] .upload-card.is-disabled .upload-btn:disabled:hover,
[data-theme="dark"] .upload-card.is-disabled .upload-btn:disabled:active {
  background: #2A404C !important;
  border-color: #526873 !important;
  color: #D0DCE2 !important;
  opacity: 1 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  cursor: not-allowed !important;
}
/* ================================================================
   FANAGAAM — PROFESSIONAL REGISTRATION EXPERIENCE
   Bilingual · RTL/LTR · Responsive · Matte Surfaces
   ================================================================ */

/* Registration card */
#authScreen #registerCard.fg-register-card {
  width: min(100%, 760px) !important;
  max-width: 760px !important;

  max-height: calc(100dvh - 88px) !important;

  margin: auto !important;
  padding: 28px 36px 26px !important;

  box-sizing: border-box !important;

  display: flex;
  flex-direction: column;

  gap: 0 !important;

  text-align: start !important;

  background: #ffffff !important;
  border: 1px solid #dce5eb !important;
  border-radius: 22px !important;

  box-shadow:
    0 20px 54px rgba(15, 35, 52, 0.10),
    0 0 0 1px rgba(15, 35, 52, 0.025) !important;

  overflow-x: hidden !important;
  overflow-y: auto !important;

  overscroll-behavior: contain;
}

/* Dark mode: opaque matte surface */
html[data-theme="dark"] #authScreen #registerCard.fg-register-card {
  background: #172a3a !important;
  border-color: rgba(148, 163, 184, 0.20) !important;

  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(148, 163, 184, 0.06) !important;
}

/* Header */
#registerCard .fg-register-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  margin-bottom: 22px;
}

#registerCard .auth-logo {
  width: 52px;
  height: 52px;

  margin: 0 auto 11px;
  border-radius: 13px;

  box-shadow: none !important;
}

#registerCard .auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#registerCard .auth-title {
  margin: 0 0 6px !important;

  font-size: 22px;
  line-height: 1.45;
  font-weight: 900;

  color: var(--text-0);
}

#registerCard .auth-subtitle {
  max-width: 520px;

  margin: 0 !important;

  font-size: 12.5px;
  line-height: 1.8;
  font-weight: 600;

  color: var(--text-1);
}

/* Registration grid */
#registerCard .fg-register-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 15px 18px;

  width: 100%;
  min-width: 0;
}

#registerCard .fg-register-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#registerCard .fg-register-field--wide {
  grid-column: 1 / -1;
}

#registerCard .auth-label {
  display: block;

  width: 100%;
  margin: 0;

  font-size: 12px;
  line-height: 1.7;
  font-weight: 800;

  color: var(--text-1);
}

/* Inputs */
#registerCard .auth-input {
  width: 100%;
  min-width: 0;
  min-height: 46px;

  box-sizing: border-box;

  padding: 11px 42px 11px 14px;

  border-radius: 12px;

  font-size: 13.5px;
  font-weight: 700;

  border: 1.5px solid var(--line-bright);
  background: var(--bg-3);
  color: var(--text-0);

  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background-color .2s ease;
}

#registerCard .auth-input:focus {
  outline: none;

  border-color: var(--brand-primary);
  background: var(--bg-2);

  box-shadow:
    0 0 0 3px color-mix(
      in srgb,
      var(--brand-primary) 12%,
      transparent
    );
}

/* Username, phone and passwords remain LTR */
#registerCard #registerUsername,
#registerCard #registerPhone,
#registerCard #registerPassword,
#registerCard #registerConfirmPassword {
  direction: ltr !important;
  text-align: left !important;

  font-family: Inter, "Segoe UI", Arial, sans-serif !important;

  font-variant-numeric: lining-nums tabular-nums !important;
}

/* Free-text fields follow the interface language */
html[lang="fa"] #registerCard .fg-register-free-input {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext !important;
}

html[lang="en"] #registerCard .fg-register-free-input {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext !important;
}

#registerCard .auth-input::placeholder {
  color: var(--text-2);
  opacity: 1;

  font-size: 12px;
  font-weight: 500;
}

#registerCard .auth-input-icon {
  right: 14px;
  left: auto;

  width: 18px;
  height: 18px;
}

/* Password helper */
#registerCard .fg-register-password-hint {
  display: block;

  margin-top: 1px;

  font-size: 10.5px;
  line-height: 1.6;

  color: var(--text-2);
}

/* Demo information: opaque and readable */
#registerCard .fg-register-demo-note {
  display: block;

  margin: 14px 0 0;
  padding: 11px 14px;

  border: 1px solid color-mix(
    in srgb,
    var(--brand-primary) 20%,
    var(--line)
  );

  border-radius: 11px;

  background: color-mix(
    in srgb,
    var(--brand-primary) 5%,
    #ffffff
  );

  color: var(--text-1);

  font-size: 11px;
  font-weight: 600;
  line-height: 1.8;

  text-align: start;
}

html[data-theme="dark"] #registerCard .fg-register-demo-note {
  background: #20384a;
  border-color: rgba(85, 191, 192, 0.25);
  color: #cbd5e1;
}

/* Main action */
#registerCard .fg-register-submit {
  width: 100%;
  min-height: 48px;

  margin-top: 19px;
  padding: 12px 22px;

  font-size: 14px;
}

/* Back to sign in */
#registerCard .fg-register-footer {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-top: 16px;
  padding-top: 4px;
}

#registerCard .fg-register-footer a {
  color: var(--brand-primary);

  font-size: 12px;
  font-weight: 800;

  line-height: 1.8;

  text-align: center;
  text-decoration: none;

  transition: color .2s ease;
}

#registerCard .fg-register-footer a:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Sign-up link on the login page */
#authScreen .auth-register-link {
  color: var(--brand-primary);

  font-size: 12px;
  font-weight: 800;

  text-decoration: none;
  transition: color .2s ease;
}

#authScreen .auth-register-link:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Mobile layout */
@media screen and (max-width: 640px) {
  #authScreen #registerCard.fg-register-card {
    width: 100% !important;
    max-width: 100% !important;

    max-height: calc(100dvh - 88px) !important;

    padding: 22px 18px 20px !important;

    border-radius: 18px !important;
  }

  #registerCard .fg-register-header {
    margin-bottom: 18px;
  }

  #registerCard .fg-register-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #registerCard .fg-register-field--wide {
    grid-column: auto;
  }

  #registerCard .auth-title {
    font-size: 20px;
  }

  #registerCard .auth-subtitle {
    font-size: 11.5px;
  }
}

/* Compact-height screens */
@media screen and (max-height: 650px) {
  #authScreen #registerCard.fg-register-card {
    max-height: calc(100dvh - 76px) !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  #registerCard .fg-register-header {
    margin-bottom: 14px;
  }

  #registerCard .auth-logo {
    width: 42px;
    height: 42px;
    margin-bottom: 6px;
  }

  #registerCard .fg-register-grid {
    gap: 10px 14px;
  }

  #registerCard .auth-input {
    min-height: 42px;
  }

  #registerCard .fg-register-submit {
    min-height: 44px;
    margin-top: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #registerCard *,
  #registerCard *::before,
  #registerCard *::after {
    transition: none !important;
    animation: none !important;
  }
}
/* ============================================================
   FANAGAAM — AUTH SCREEN ENVIRONMENT BADGE
   Place the test-version badge beside the back-to-home button.
   Shared by login and registration screens.
   ============================================================ */

#authScreen .auth-top-right-actions {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 101;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;

  width: fit-content;
  max-width: calc(100vw - 32px);
}

/* The back button is positioned by the shared top-right wrapper. */
#authScreen .auth-top-right-actions .auth-back-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;

  margin: 0 !important;
  flex: 0 0 auto;
}

/* Keep the badge compact and aligned with the back button. */
#authScreen .auth-top-right-actions .auth-demo-badge {
  align-self: center;
  margin: 0 !important;

  flex: 0 0 auto;
  white-space: nowrap;
}

/* Mobile */
@media screen and (max-width: 767px) {
  #authScreen .auth-top-right-actions {
    top: 16px;
    right: 16px;
    gap: 8px;

    max-width: calc(100vw - 32px);
  }

  #authScreen .auth-top-right-actions .auth-back-btn {
    padding: 8px 12px;
    font-size: 11px;
  }

  #authScreen .auth-top-right-actions .auth-demo-badge {
    padding: 5px 9px;
    font-size: 10px;
  }
}
/* English: reverse the order of the back button and test badge. */
html[lang="en"] #authScreen .auth-top-right-actions {
  flex-direction: row-reverse;
}
/* ============================================================
   FanaGaam — Stage 1 Assessment Question Label
   ============================================================ */
#view-screening .screening-question-kicker {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

@media screen and (max-width: 767px) {
  #view-screening .screening-question-kicker {
    font-size: 13px !important;
  }
}

/* ============================================================
   FanaGaam — Stage 1 Layout A
   Preserve the two-column layout and vertical option list.
   Compact Stage 1 only on desktop; do not alter assessment content.
   ============================================================ */
@media screen and (min-width: 1200px) {
  #view-screening .breadcrumbs {
    margin-bottom: 10px !important;
  }

  #view-screening .view-header {
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
  }

  #view-screening #screeningContainer {
    padding: 12px 14px 10px !important;
  }

  #view-screening .criterion-header {
    margin-bottom: 7px !important;
  }

  #view-screening .screening-question-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 3px !important;
  }

  #view-screening .screening-question-kicker {
    font-size: 14px !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }

  #view-screening .screening-question-counter {
    flex: 0 0 auto !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    font-weight: 700 !important;
    color: var(--text-2) !important;
    white-space: nowrap !important;
  }

  #view-screening .criterion-question {
    font-size: 22px !important;
    line-height: 1.48 !important;
    margin: 0 !important;
  }

  #view-screening .screening-split-layout {
    grid-template-columns: minmax(0, 1fr) 270px !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-top: 12px !important;
  }

  #view-screening .screening-options-heading {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
    margin: 0 0 6px !important;
  }

  #view-screening .screening-options-column .options-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 5px !important;
    margin: 0 !important;
  }

  #view-screening .screening-options-column .option-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 7px 12px !important;
    margin: 0 !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  #view-screening .screening-options-column .option-dot {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    margin: 2px 0 0 !important;
  }

  #view-screening .screening-options-column .option-body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    gap: 2px !important;
  }

  #view-screening .screening-options-column .option-letter {
    align-self: flex-start !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    text-align: start !important;
  }

  #view-screening .screening-options-column .option-text {
    display: block !important;
    flex: 0 1 auto !important;
    align-items: initial !important;
    justify-content: initial !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    text-align: start !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  html[lang="en"] #view-screening .screening-options-column .option-text {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: plaintext !important;
  }

  #view-screening .screening-guide-column {
    align-self: stretch !important;
  }

  #view-screening .guide-card {
    padding: 14px !important;
    border-radius: 16px !important;
    background: var(--bg-2) !important;
    box-shadow: 0 5px 18px -12px rgba(15, 23, 42, 0.18) !important;
  }

  #view-screening .guide-card-icon {
    width: 34px !important;
    height: 34px !important;
    margin-bottom: 9px !important;
  }

  #view-screening .guide-card-title {
    font-size: 13.5px !important;
    margin-bottom: 8px !important;
  }

  #view-screening .guide-card-text {
    padding: 11px 12px !important;
    font-size: 12.5px !important;
    line-height: 1.8 !important;
    background: var(--bg-1) !important;
  }

  #view-screening #screeningViewActions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    margin-top: 10px !important;
    margin-bottom: 12px !important;
    padding-top: 9px !important;
  }

  #view-screening #screeningViewActions > button {
    min-height: 36px !important;
    padding: 8px 15px !important;
  }

  /* The floating assistant remains in the left navigation rail on desktop. */
  #mainLayout:has(> .main-content > #view-screening.active) {
    padding-bottom: 12px !important;
  }
}

/* Short desktop viewports: reclaim a little more vertical space without
   reducing the question or option text sizes. */
@media screen and (min-width: 1200px) and (max-height: 800px) {
  #view-screening .breadcrumbs {
    margin-bottom: 6px !important;
  }

  #view-screening .view-header {
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
  }

  #view-screening #screeningContainer {
    padding: 9px 12px 8px !important;
  }

  #view-screening .criterion-header {
    margin-bottom: 5px !important;
  }

  #view-screening .criterion-question {
    line-height: 1.42 !important;
  }

  #view-screening .screening-split-layout {
    gap: 10px !important;
    margin-top: 8px !important;
  }

  #view-screening .screening-options-heading {
    margin-bottom: 4px !important;
  }

  #view-screening .screening-options-column .options-list {
    gap: 4px !important;
  }

  #view-screening .screening-options-column .option-item {
    padding: 6px 10px !important;
  }

  #view-screening .guide-card {
    padding: 10px !important;
  }

  #view-screening .guide-card-icon {
    width: 30px !important;
    height: 30px !important;
    margin-bottom: 7px !important;
  }

  #view-screening .guide-card-text {
    padding: 9px 10px !important;
    line-height: 1.7 !important;
  }

  #view-screening #screeningViewActions {
    margin-top: 7px !important;
    margin-bottom: 8px !important;
    padding-top: 6px !important;
  }

  #mainLayout:has(> .main-content > #view-screening.active) {
    padding-bottom: 8px !important;
  }
}
/* ============================================================
   FanaGaam - Stage 1 Bottom Breathing Space
   Preserve reading quality and AI assistant clearance.
   ============================================================ */

/* Comfortable spacing after Stage 1 navigation buttons */
#view-screening #screeningViewActions {
  margin-bottom: 32px !important;
}

/* Preserve safe clearance for the floating AI assistant */
#mainLayout:has(> .main-content > #view-screening.active) {
  padding-bottom: 90px !important;
}

/* Mobile: maintain additional assistant clearance */
@media screen and (max-width: 767px) {
  #mainLayout:has(> .main-content > #view-screening.active) {
    padding-bottom: 100px !important;
  }
}
/* ============================================================
   FanaGaam — Stage 1 Guide Header Alignment
   Keep the icon and title horizontally aligned.
   Guide text remains on the next full-width row.
   ============================================================ */

#view-screening .guide-card {
  display: grid !important;

  grid-template-columns: max-content minmax(0, 1fr) !important;

  grid-template-areas:
    "icon title"
    "text text" !important;

  align-items: center !important;
  column-gap: 12px !important;
  row-gap: 12px !important;
}

/* Guide information icon */
#view-screening .guide-card-icon {
  grid-area: icon !important;

  flex: 0 0 auto !important;
  align-self: center !important;
  justify-self: start !important;

  margin: 0 !important;
}

/* Guide heading */
#view-screening .guide-card-title {
  grid-area: title !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  align-self: center !important;

  min-width: 0 !important;
  margin: 0 !important;

  text-align: start !important;
  line-height: 1.5 !important;
}

/* Guide explanatory text */
#view-screening .guide-card-text {
  grid-area: text !important;

  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Explicit left-to-right alignment for English */
html[lang="en"] #view-screening .guide-card {
  direction: ltr !important;
}
/* ============================================================
   FANAGAAM — PUBLIC 9 CRITERIA
   B+ INTERACTIVE CARD EXPERIENCE
   Vertical layout + premium hover elevation
   Persian / English + Light / Dark
   ============================================================ */

/* ------------------------------------------------------------
   1. Nine criteria — single vertical column
   ------------------------------------------------------------ */

#publicLanding #publicCriteria .fg-criteria-grid {
  display: grid !important;

  grid-template-columns: minmax(0, 1fr) !important;

  align-items: stretch !important;

  gap: 18px !important;

  padding-inline: 28px !important;

  overflow: visible !important;

  box-sizing: border-box !important;
}

/* ------------------------------------------------------------
   2. Normal card appearance
   ------------------------------------------------------------ */

#publicLanding #publicCriteria .fg-criterion-card {
  position: relative !important;

  isolation: isolate !important;

  z-index: 0 !important;

  display: flex !important;

  align-items: center !important;

  width: 100% !important;

  min-width: 0 !important;

  min-height: 122px !important;

  padding: 20px 24px !important;

  box-sizing: border-box !important;

  background: var(--bg-2) !important;

  border: 1px solid var(--line) !important;

  border-radius: 18px !important;

  box-shadow:
    0 5px 16px -13px rgba(20, 43, 59, 0.32) !important;

  transform: translate3d(0, 0, 0) scale(1) !important;

  transition:
    transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.36s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.28s ease,
    background-color 0.28s ease !important;

  cursor: default !important;
}

/* ------------------------------------------------------------
   3. Accent strip — hidden in normal state
   ------------------------------------------------------------ */

#publicLanding #publicCriteria .fg-criterion-card::before {
  content: "" !important;

  position: absolute !important;

  inset-block: 13px !important;

  inset-inline-start: 0 !important;

  width: 4px !important;

  border-radius: 0 5px 5px 0 !important;

  background: linear-gradient(
    180deg,
    var(--brand-primary),
    var(--brand-accent)
  ) !important;

  opacity: 0 !important;

  transform: scaleY(0.35) !important;

  transform-origin: center !important;

  transition:
    opacity 0.28s ease,
    transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) !important;

  pointer-events: none !important;
}

/* Keep card content above the decorative accent strip. */

#publicLanding #publicCriteria .fg-criterion-card > span,
#publicLanding #publicCriteria .fg-criterion-card > div {
  position: relative !important;

  z-index: 1 !important;
}

/* ------------------------------------------------------------
   4. Premium B+ hover state
   ------------------------------------------------------------ */

@media (hover: hover) and (pointer: fine) {

  #publicLanding #publicCriteria .fg-criterion-card:hover {
    z-index: 5 !important;

    transform:
      translate3d(0, -5px, 0)
      scale(1.045) !important;

    background: color-mix(
      in srgb,
      var(--brand-primary) 5%,
      var(--bg-2)
    ) !important;

    border-color: var(--brand-primary) !important;

    box-shadow:
      0 24px 40px -20px
        color-mix(in srgb, var(--brand-primary) 48%, transparent),
      0 9px 20px -12px
        rgba(20, 43, 59, 0.24) !important;
  }

  #publicLanding #publicCriteria .fg-criterion-card:hover::before {
    opacity: 1 !important;

    transform: scaleY(1) !important;
  }

  /* Number badge emphasis */

  #publicLanding #publicCriteria
  .fg-criterion-card:hover > span {
    background: color-mix(
      in srgb,
      var(--brand-primary) 17%,
      var(--bg-2)
    ) !important;

    color: var(--brand-primary) !important;

    transform: translateZ(0) scale(1.07) !important;

    transition:
      background-color 0.28s ease,
      transform 0.32s ease,
      color 0.28s ease !important;
  }

  /* Title emphasis without reducing readability */

  #publicLanding #publicCriteria
  .fg-criterion-card:hover h3 {
    color: var(--brand-primary) !important;

    transition: color 0.28s ease !important;
  }
}

/* ------------------------------------------------------------
   5. Tablet and mobile layout
   ------------------------------------------------------------ */

@media screen and (max-width: 767px) {

  #publicLanding #publicCriteria .fg-criteria-grid {
    grid-template-columns: minmax(0, 1fr) !important;

    gap: 14px !important;

    padding-inline: 10px !important;
  }

  #publicLanding #publicCriteria .fg-criterion-card {
    min-height: 112px !important;

    padding: 17px 16px !important;

    border-radius: 15px !important;
  }
}

/* Touch devices: brief feedback on press, no sticky hover. */

@media (hover: none) and (pointer: coarse) {

  #publicLanding #publicCriteria .fg-criterion-card:hover {
    transform: translate3d(0, 0, 0) scale(1) !important;

    background: var(--bg-2) !important;

    border-color: var(--line) !important;

    box-shadow:
      0 5px 16px -13px rgba(20, 43, 59, 0.32) !important;
  }

  #publicLanding #publicCriteria .fg-criterion-card:active {
    transform: translate3d(0, -2px, 0) scale(1.015) !important;

    border-color: var(--brand-primary) !important;

    box-shadow:
      0 12px 24px -14px
      color-mix(in srgb, var(--brand-primary) 35%, transparent) !important;
  }
}

/* ------------------------------------------------------------
   6. Accessibility — respect reduced motion preference
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

  #publicLanding #publicCriteria .fg-criterion-card,
  #publicLanding #publicCriteria .fg-criterion-card::before,
  #publicLanding #publicCriteria .fg-criterion-card > span {
    transition: none !important;
  }
}
/* ============================================================
   FANAGAAM — B+ COMPACT CRITERIA CARDS
   Keep premium hover; refine card proportions.
   ============================================================ */

#publicLanding #publicCriteria .fg-criteria-grid {
  display: grid !important;

  grid-template-columns: minmax(0, 1fr) !important;

  width: 100% !important;
  max-width: 1080px !important;

  margin-inline: auto !important;

  gap: 12px !important;

  padding-inline: 16px !important;

  box-sizing: border-box !important;
  overflow: visible !important;
}

#publicLanding #publicCriteria .fg-criterion-card {
  width: 100% !important;

  min-height: 96px !important;

  padding: 14px 20px !important;

  gap: 13px !important;

  border-radius: 15px !important;

  box-sizing: border-box !important;
}

/* Smaller number badge, same legibility */
#publicLanding #publicCriteria .fg-criterion-card > span {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;

  border-radius: 10px !important;
}

/* Retain the approved B+ emphasis with less expansion */
@media (hover: hover) and (pointer: fine) {
  #publicLanding #publicCriteria .fg-criterion-card:hover {
    transform:
      translate3d(0, -4px, 0)
      scale(1.03) !important;

    z-index: 5 !important;
  }
}

/* Responsive proportions */
@media screen and (max-width: 767px) {
  #publicLanding #publicCriteria .fg-criteria-grid {
    max-width: 100% !important;
    padding-inline: 8px !important;
    gap: 11px !important;
  }

  #publicLanding #publicCriteria .fg-criterion-card {
    min-height: 88px !important;
    padding: 13px 14px !important;
    gap: 11px !important;
  }
}
/* ============================================================
   FANAGAAM — CRISP TURQUOISE GRADIENT CARDS
   B+ HOVER REFINEMENT
   Opaque surfaces / horizontal gradient / compact height
   ============================================================ */

/* 1. Compact and balanced card dimensions */

#publicLanding #publicCriteria .fg-criteria-grid {
  gap: 10px !important;
  overflow: visible !important;
}

#publicLanding #publicCriteria .fg-criterion-card {
  position: relative !important;
  isolation: isolate !important;

  min-height: 86px !important;
  height: auto !important;

  padding: 10px 18px !important;
  gap: 12px !important;

  border-radius: 15px !important;
  border: 1px solid var(--line) !important;

  background-color: var(--bg-2) !important;
  background-image: none !important;

  opacity: 1 !important;
  filter: none !important;

  /* Avoid unnecessary nested GPU text layers. */
  will-change: box-shadow, border-color !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
}

/* 2. Horizontal turquoise accent — left to right */

#publicLanding #publicCriteria .fg-criterion-card::before {
  content: "" !important;

  position: absolute !important;

  inset-block-start: 0 !important;
  inset-inline: 16px !important;

  width: auto !important;
  height: 3px !important;

  border-radius: 0 0 4px 4px !important;

  background: linear-gradient(
    90deg,
    var(--brand-primary) 0%,
    var(--brand-accent) 100%
  ) !important;

  opacity: 0 !important;
  transform: scaleX(0.35) !important;
  transform-origin: left center !important;

  transition:
    opacity 0.28s ease,
    transform 0.32s ease !important;

  pointer-events: none !important;
}

/* 3. Preserve sharp text, descriptions and number badges */

#publicLanding #publicCriteria .fg-criterion-card,
#publicLanding #publicCriteria .fg-criterion-card *,
#publicLanding #publicCriteria .fg-criterion-card:hover,
#publicLanding #publicCriteria .fg-criterion-card:hover * {
  opacity: 1 !important;
  filter: none !important;
  -webkit-filter: none !important;
  text-shadow: none !important;
}

/* Remove the old nested translateZ layers that can soften text. */

#publicLanding #publicCriteria .fg-criterion-card h3,
#publicLanding #publicCriteria .fg-criterion-card p,
#publicLanding #publicCriteria .fg-criterion-card > span {
  transform: none !important;

  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;

  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* 4. Refined B+ hover */

@media (hover: hover) and (pointer: fine) {

  #publicLanding #publicCriteria .fg-criterion-card:hover {
    z-index: 8 !important;

    transform:
      translate3d(0, -3px, 0)
      scale(1.015) !important;

    /* Fully opaque horizontal gradient, not a translucent overlay. */
    background-color: var(--bg-2) !important;

    background-image: linear-gradient(
      90deg,
      color-mix(
        in srgb,
        var(--brand-primary) 23%,
        var(--bg-2)
      ) 0%,

      color-mix(
        in srgb,
        var(--brand-primary) 13%,
        var(--bg-2)
      ) 52%,

      var(--bg-2) 100%
    ) !important;

    border-color: var(--brand-primary) !important;

    box-shadow:
      0 18px 32px -18px
        color-mix(in srgb, var(--brand-primary) 48%, transparent),
      0 5px 13px -8px
        rgba(20, 43, 59, 0.22) !important;
  }

  #publicLanding #publicCriteria
  .fg-criterion-card:hover::before {
    opacity: 1 !important;
    transform: scaleX(1) !important;
  }

  #publicLanding #publicCriteria
  .fg-criterion-card:hover > span {
    background-color: color-mix(
      in srgb,
      var(--brand-primary) 18%,
      var(--bg-2)
    ) !important;

    color: var(--brand-primary) !important;
  }

  #publicLanding #publicCriteria
  .fg-criterion-card:hover h3 {
    color: var(--brand-primary) !important;
  }

  #publicLanding #publicCriteria
  .fg-criterion-card:hover p {
    color: var(--text-1) !important;
  }
}

/* 5. Mobile and touch devices */

@media screen and (max-width: 767px) {
  #publicLanding #publicCriteria .fg-criteria-grid {
    gap: 10px !important;
    padding-inline: 8px !important;
  }

  #publicLanding #publicCriteria .fg-criterion-card {
    min-height: 82px !important;
    padding: 11px 14px !important;
    gap: 11px !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  #publicLanding #publicCriteria .fg-criterion-card:hover {
    transform: none !important;

    background-color: var(--bg-2) !important;
    background-image: none !important;

    box-shadow: none !important;
    border-color: var(--line) !important;
  }

  #publicLanding #publicCriteria .fg-criterion-card:active {
    border-color: var(--brand-primary) !important;

    background-image: linear-gradient(
      90deg,
      color-mix(in srgb, var(--brand-primary) 20%, var(--bg-2)),
      var(--bg-2)
    ) !important;
  }
}

/* 6. Accessibility */

@media (prefers-reduced-motion: reduce) {
  #publicLanding #publicCriteria .fg-criterion-card,
  #publicLanding #publicCriteria .fg-criterion-card::before {
    transition: none !important;
  }
}
/* ============================================================
   FANAGAAM — B+ HOVER EFFECT RESTORATION
   Number tilt + visible turquoise gradient + crisp typography
   ============================================================ */

/* 1. Card base */

#publicLanding #publicCriteria .fg-criterion-card {
  min-height: 86px !important;
  height: auto !important;

  padding: 10px 18px !important;

  position: relative !important;
  isolation: isolate !important;

  opacity: 1 !important;
  filter: none !important;

  background-color: var(--bg-2) !important;
  background-image: none !important;

  border: 1px solid var(--line) !important;

  transform: translate3d(0, 0, 0) scale(1) !important;

  transition:
    transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.36s ease,
    border-color 0.28s ease,
    background-image 0.28s ease !important;
}

/* 2. Horizontal turquoise gradient accent */

#publicLanding #publicCriteria .fg-criterion-card::before {
  content: "" !important;

  position: absolute !important;

  inset-block-start: 0 !important;
  inset-inline: 18px !important;

  width: auto !important;
  height: 4px !important;

  border-radius: 0 0 5px 5px !important;

  background: linear-gradient(
    90deg,
    var(--brand-primary) 0%,
    var(--brand-accent) 65%,
    transparent 100%
  ) !important;

  opacity: 0 !important;
  transform: scaleX(0.35) !important;
  transform-origin: left center !important;

  transition:
    opacity 0.28s ease,
    transform 0.36s ease !important;

  pointer-events: none !important;
}

/* 3. Restore number badge movement */

#publicLanding #publicCriteria .fg-criterion-card > span {
  position: relative !important;
  z-index: 2 !important;

  transform: rotate(0deg) scale(1) !important;
  transform-origin: center center !important;

  opacity: 1 !important;
  filter: none !important;

  transition:
    transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.28s ease,
    color 0.28s ease,
    box-shadow 0.28s ease !important;
}

/* 4. Stronger B+ hover */

@media (hover: hover) and (pointer: fine) {

  #publicLanding #publicCriteria .fg-criterion-card:hover {
    z-index: 8 !important;

    transform:
      translate3d(0, -4px, 0)
      scale(1.025) !important;

    opacity: 1 !important;
    filter: none !important;

    /* Strong turquoise on the left, progressively lighter to the right. */
    background:
      linear-gradient(
        90deg,
        color-mix(
          in srgb,
          var(--brand-primary) 27%,
          var(--bg-2)
        ) 0%,

        color-mix(
          in srgb,
          var(--brand-accent) 18%,
          var(--bg-2)
        ) 58%,

        var(--bg-2) 100%
      ) !important;

    border-color: var(--brand-primary) !important;

    box-shadow:
      0 19px 34px -17px
        color-mix(in srgb, var(--brand-primary) 48%, transparent),
      0 6px 14px -9px
        rgba(20, 43, 59, 0.24) !important;
  }

  /* Reveal the full-width gradient accent. */

  #publicLanding #publicCriteria
  .fg-criterion-card:hover::before {
    opacity: 1 !important;
    transform: scaleX(1) !important;
  }

  /* Tilt and lift the number badge — a key part of B+. */

  #publicLanding #publicCriteria
  .fg-criterion-card:hover > span {
    transform:
      rotate(-10deg)
      scale(1.13)
      translateY(-2px) !important;

    background-color: var(--bg-2) !important;

    color: var(--brand-primary) !important;

    box-shadow:
      0 7px 15px -7px
      color-mix(in srgb, var(--brand-primary) 55%, transparent) !important;
  }

  /* Coordinated title emphasis. */

  #publicLanding #publicCriteria
  .fg-criterion-card:hover h3 {
    color: var(--brand-primary) !important;
  }

  /* Keep description fully legible. */

  #publicLanding #publicCriteria
  .fg-criterion-card:hover p {
    color: var(--text-1) !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

/* 5. Keyboard focus */

#publicLanding #publicCriteria
.fg-criterion-card:focus-within {
  border-color: var(--brand-primary) !important;

  box-shadow:
    0 0 0 3px
    color-mix(in srgb, var(--brand-primary) 16%, transparent) !important;
}

/* 6. Touch devices */

@media (hover: none) and (pointer: coarse) {
  #publicLanding #publicCriteria .fg-criterion-card:hover {
    transform: none !important;
    background: var(--bg-2) !important;
    box-shadow: none !important;
  }

  #publicLanding #publicCriteria
  .fg-criterion-card:active > span {
    transform: rotate(-8deg) scale(1.08) !important;
  }
}

/* 7. Reduced motion */

@media (prefers-reduced-motion: reduce) {
  #publicLanding #publicCriteria .fg-criterion-card,
  #publicLanding #publicCriteria .fg-criterion-card::before,
  #publicLanding #publicCriteria .fg-criterion-card > span {
    transition: none !important;
  }

  #publicLanding #publicCriteria .fg-criterion-card:hover {
    transform: none !important;
  }

  #publicLanding #publicCriteria
  .fg-criterion-card:hover > span {
    transform: none !important;
  }
}
/* ============================================================
   FANAGAAM — ENGLISH HOVER GRADIENT DIRECTION
   English: strong turquoise on the right, fading to the left.
   Persian gradient remains unchanged.
   ============================================================ */

@media (hover: hover) and (pointer: fine) {

  /* Main card surface */
  html[lang^="en"] #publicLanding #publicCriteria
  .fg-criterion-card:hover {

    background: linear-gradient(
      270deg,
      color-mix(
        in srgb,
        var(--brand-primary) 27%,
        var(--bg-2)
      ) 0%,

      color-mix(
        in srgb,
        var(--brand-accent) 18%,
        var(--bg-2)
      ) 58%,

      var(--bg-2) 100%
    ) !important;
  }

  /* Top turquoise accent strip */
  html[lang^="en"] #publicLanding #publicCriteria
  .fg-criterion-card:hover::before {

    background: linear-gradient(
      270deg,
      var(--brand-primary) 0%,
      var(--brand-accent) 65%,
      transparent 100%
    ) !important;

    transform-origin: right center !important;
  }
}
/* ============================================================
   FANAGAAM — MOVE HOVER ACCENT TO CARD BOTTOM
   Preserve Persian and English gradient directions.
   ============================================================ */

#publicLanding #publicCriteria .fg-criterion-card::before {
  inset-block-start: auto !important;
  inset-block-end: 0 !important;

  inset-inline: 18px !important;

  width: auto !important;
  height: 4px !important;

  border-radius: 4px 4px 0 0 !important;
}
/* ============================================================
   FANAGAAM — DASHBOARD REGISTERED TECHNOLOGIES LIBRARY
   Expandable table / Premium matte UI / RTL + LTR
   ============================================================ */

/* Keep the new-technology card centered. */

#view-home .dashboard-primary-actions {
  justify-content: center !important;
}

#view-home .dashboard-primary-actions > .dashboard-action-card--new {
  flex: 0 1 400px !important;
  margin-inline: auto !important;
}

/* Library section */

#view-home .dashboard-technology-library {
  position: relative !important;

  width: min(calc(100% - 40px), 1160px) !important;

  margin: 26px auto 0 !important;

  box-sizing: border-box !important;

  overflow: visible !important;
}

/* Collapsible library header */

#view-home .dashboard-library-toggle {
  width: 100% !important;

  min-height: 86px !important;

  display: grid !important;

  grid-template-columns: 48px minmax(0, 1fr) auto 34px !important;

  align-items: center !important;

  gap: 15px !important;

  padding: 15px 20px !important;

  border: 1px solid var(--line) !important;

  border-radius: 17px !important;

  background: var(--bg-2) !important;

  color: var(--text-0) !important;

  box-shadow:
    0 7px 19px -15px rgba(18, 75, 103, .30) !important;

  cursor: pointer !important;

  text-align: start !important;

  font-family: inherit !important;

  transition:
    border-color .25s ease,
    box-shadow .25s ease,
    background-color .25s ease !important;
}

#view-home .dashboard-library-toggle:hover {
  border-color: var(--brand-primary) !important;

  box-shadow:
    0 12px 26px -17px
      color-mix(in srgb, var(--brand-primary) 38%, transparent) !important;
}

#view-home .dashboard-library-toggle[aria-expanded="true"] {
  border-color: var(--brand-primary) !important;

  border-radius: 17px 17px 12px 12px !important;

  box-shadow:
    0 5px 16px -12px
      color-mix(in srgb, var(--brand-primary) 30%, transparent) !important;
}

/* Library icon */

#view-home .dashboard-library-icon {
  width: 48px !important;
  height: 48px !important;

  display: grid !important;
  place-items: center !important;

  border-radius: 13px !important;

  background: color-mix(
    in srgb,
    var(--brand-primary) 12%,
    var(--bg-2)
  ) !important;

  color: var(--brand-primary) !important;
}

#view-home .dashboard-library-icon svg {
  width: 25px !important;
  height: 25px !important;
}

/* Title and description */

#view-home .dashboard-library-copy {
  min-width: 0 !important;

  display: flex !important;
  flex-direction: column !important;

  align-items: flex-start !important;

  gap: 5px !important;
}

#view-home .dashboard-library-title {
  color: var(--text-0) !important;

  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
}

#view-home .dashboard-library-description {
  color: var(--text-1) !important;

  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.7 !important;
}

/* Technology count */

#view-home .dashboard-library-count {
  display: inline-flex !important;

  align-items: center !important;
  justify-content: center !important;

  min-height: 32px !important;

  padding: 5px 13px !important;

  border-radius: 30px !important;

  background: color-mix(
    in srgb,
    var(--brand-primary) 9%,
    var(--bg-2)
  ) !important;

  border: 1px solid color-mix(
    in srgb,
    var(--brand-primary) 16%,
    var(--line)
  ) !important;

  color: var(--brand-primary) !important;

  font-size: 11px !important;
  font-weight: 800 !important;

  white-space: nowrap !important;
}

/* Chevron */

#view-home .dashboard-library-chevron {
  width: 34px !important;
  height: 34px !important;

  display: grid !important;
  place-items: center !important;

  border-radius: 50% !important;

  background: var(--bg-1) !important;

  color: var(--text-1) !important;

  transition:
    transform .28s ease,
    background-color .25s ease,
    color .25s ease !important;
}

#view-home .dashboard-library-chevron svg {
  width: 17px !important;
  height: 17px !important;
}

#view-home .dashboard-library-toggle[aria-expanded="true"]
.dashboard-library-chevron {
  transform: rotate(180deg) !important;

  background: color-mix(
    in srgb,
    var(--brand-primary) 13%,
    var(--bg-2)
  ) !important;

  color: var(--brand-primary) !important;
}

/* Expanded panel */

#view-home .dashboard-library-panel {
  width: 100% !important;

  margin-top: 10px !important;

  padding: 18px !important;

  box-sizing: border-box !important;

  border: 1px solid var(--line) !important;

  border-radius: 16px !important;

  background: var(--bg-2) !important;

  box-shadow:
    0 12px 30px -23px rgba(18, 75, 103, .22) !important;
}

#view-home .dashboard-library-panel[hidden] {
  display: none !important;
}

/* Toolbar */

#view-home .dashboard-library-toolbar {
  display: flex !important;

  align-items: center !important;
  justify-content: space-between !important;

  flex-wrap: wrap !important;

  gap: 14px !important;

  margin-bottom: 16px !important;
}

#view-home .dashboard-library-panel-heading {
  display: flex !important;
  flex-direction: column !important;

  gap: 5px !important;

  min-width: 200px !important;
}

#view-home .dashboard-library-panel-heading h2 {
  margin: 0 !important;

  color: var(--text-0) !important;

  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
}

#view-home .dashboard-library-panel-heading p {
  margin: 0 !important;

  color: var(--text-2) !important;

  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.7 !important;
}

/* Filters */

#view-home .dashboard-library-filters {
  display: flex !important;

  align-items: center !important;

  flex-wrap: wrap !important;

  gap: 7px !important;
}

#view-home .dashboard-library-filter {
  min-height: 31px !important;

  padding: 5px 12px !important;

  border-radius: 30px !important;

  border: 1px solid var(--line) !important;

  background: var(--bg-2) !important;

  color: var(--text-1) !important;

  font-family: inherit !important;

  font-size: 10.5px !important;
  font-weight: 700 !important;

  cursor: pointer !important;

  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease !important;
}

#view-home .dashboard-library-filter:hover,
#view-home .dashboard-library-filter.is-active {
  color: var(--brand-primary) !important;

  border-color: color-mix(
    in srgb,
    var(--brand-primary) 45%,
    var(--line)
  ) !important;

  background: color-mix(
    in srgb,
    var(--brand-primary) 9%,
    var(--bg-2)
  ) !important;
}

/* Table horizontal overflow container */

#view-home .dashboard-library-table-wrap {
  width: 100% !important;

  overflow-x: auto !important;

  overscroll-behavior-inline: contain !important;

  border: 1px solid var(--line) !important;

  border-radius: 12px !important;

  background: var(--bg-2) !important;
}

/* Table */

#view-home .dashboard-library-table {
  width: 100% !important;

  min-width: 1080px !important;

  border-collapse: separate !important;

  border-spacing: 0 !important;

  table-layout: auto !important;

  direction: inherit !important;

  font-family: inherit !important;

  color: var(--text-0) !important;
}

#view-home .dashboard-library-table thead th {
  padding: 13px 11px !important;

  background: #087E83 !important;

  color: #FFFFFF !important;

  border: 0 !important;

  font-size: 11px !important;
  font-weight: 900 !important;

  line-height: 1.6 !important;

  text-align: center !important;

  white-space: nowrap !important;
}

#view-home .dashboard-library-table thead th:first-child {
  border-start-start-radius: 10px !important;
}

#view-home .dashboard-library-table thead th:last-child {
  border-start-end-radius: 10px !important;
}

#view-home .dashboard-library-table tbody td {
  padding: 12px 10px !important;

  background: var(--bg-2) !important;

  color: var(--text-1) !important;

  border: 0 !important;

  border-bottom: 1px solid var(--line) !important;

  font-size: 11px !important;
  font-weight: 600 !important;

  line-height: 1.8 !important;

  vertical-align: middle !important;

  text-align: center !important;
}

#view-home .dashboard-library-table tbody tr:nth-child(even) td {
  background: var(--bg-1) !important;
}

#view-home .dashboard-library-table tbody tr:hover td {
  background: color-mix(
    in srgb,
    var(--brand-primary) 5%,
    var(--bg-2)
  ) !important;
}

#view-home .dashboard-library-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* Column proportions */

#view-home .dashboard-library-table th:nth-child(1),
#view-home .dashboard-library-table td:nth-child(1) {
  width: 52px !important;
}

#view-home .dashboard-library-table th:nth-child(2),
#view-home .dashboard-library-table td:nth-child(2) {
  min-width: 190px !important;
}

#view-home .dashboard-library-table th:nth-child(3),
#view-home .dashboard-library-table td:nth-child(3) {
  min-width: 115px !important;
}

#view-home .dashboard-library-table th:nth-child(4),
#view-home .dashboard-library-table td:nth-child(4) {
  min-width: 105px !important;
}

#view-home .dashboard-library-table th:nth-child(5),
#view-home .dashboard-library-table td:nth-child(5) {
  min-width: 230px !important;
}

#view-home .dashboard-library-table th:nth-child(6),
#view-home .dashboard-library-table td:nth-child(6) {
  min-width: 120px !important;
}

#view-home .dashboard-library-table th:nth-child(7),
#view-home .dashboard-library-table td:nth-child(7) {
  min-width: 100px !important;
}

#view-home .dashboard-library-table th:nth-child(8),
#view-home .dashboard-library-table td:nth-child(8) {
  min-width: 95px !important;
}

/* Row number */

#view-home .dashboard-library-row-number {
  color: var(--text-2) !important;

  font-weight: 800 !important;
}

/* Project title */

#view-home .dashboard-library-open-name {
  display: inline-block !important;

  max-width: 100% !important;

  padding: 0 !important;

  border: 0 !important;

  background: transparent !important;

  color: var(--text-0) !important;

  font-family: inherit !important;

  font-size: 11px !important;
  font-weight: 900 !important;

  line-height: 1.8 !important;

  text-align: start !important;

  white-space: normal !important;

  cursor: pointer !important;
}

#view-home .dashboard-library-open-name:hover {
  color: var(--brand-primary) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

/* Description */

#view-home .dashboard-library-description-cell span {
  display: -webkit-box !important;

  max-width: 300px !important;

  overflow: hidden !important;

  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;

  text-align: start !important;
}

/* Status labels */

#view-home .dashboard-library-status {
  display: inline-flex !important;

  align-items: center !important;
  justify-content: center !important;

  padding: 5px 9px !important;

  border-radius: 30px !important;

  font-size: 10px !important;
  font-weight: 800 !important;

  white-space: nowrap !important;
}

#view-home .dashboard-library-status.is-completed {
  color: #087E61 !important;
  background: #E3F5EE !important;
}

#view-home .dashboard-library-status.is-progress {
  color: #087E83 !important;
  background: #E3F5F4 !important;
}

#view-home .dashboard-library-status.is-review {
  color: #946000 !important;
  background: #FFF4D9 !important;
}

#view-home .dashboard-library-status.is-draft {
  color: #64748B !important;
  background: #EEF2F6 !important;
}

/* Progress bar */

#view-home .dashboard-library-progress-cell {
  white-space: nowrap !important;
}

#view-home .dashboard-library-progress-track {
  display: inline-block !important;

  width: 42px !important;
  height: 5px !important;

  margin-inline-end: 6px !important;

  vertical-align: middle !important;

  border-radius: 10px !important;

  background: var(--line) !important;

  overflow: hidden !important;
}

#view-home .dashboard-library-progress-track > span {
  display: block !important;

  height: 100% !important;

  border-radius: inherit !important;

  background: linear-gradient(
    90deg,
    var(--brand-primary),
    var(--brand-accent)
  ) !important;
}

#view-home .dashboard-library-progress-cell strong {
  color: var(--text-1) !important;

  font-size: 10px !important;
  font-weight: 900 !important;
}

/* Actions */

#view-home .dashboard-library-actions {
  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  gap: 6px !important;
}

#view-home .dashboard-library-actions button {
  width: 30px !important;
  height: 30px !important;

  display: inline-grid !important;

  place-items: center !important;

  padding: 0 !important;

  border: 1px solid var(--line) !important;

  border-radius: 8px !important;

  background: var(--bg-2) !important;

  cursor: pointer !important;

  transition:
    color .2s ease,
    border-color .2s ease,
    background-color .2s ease !important;
}

#view-home .dashboard-library-actions svg {
  width: 14px !important;
  height: 14px !important;
}

#view-home .dashboard-library-action-open {
  color: var(--brand-primary) !important;
}

#view-home .dashboard-library-action-delete {
  color: #C44D55 !important;
}

#view-home .dashboard-library-action-open:hover {
  border-color: var(--brand-primary) !important;
  background: color-mix(in srgb, var(--brand-primary) 9%, var(--bg-2)) !important;
}

#view-home .dashboard-library-action-delete:hover {
  border-color: #C44D55 !important;
  background: #FFF0F0 !important;
}

/* Empty state */

#view-home .dashboard-library-empty {
  padding: 34px 20px !important;

  color: var(--text-2) !important;

  text-align: center !important;

  font-size: 12px !important;
  font-weight: 700 !important;
}

/* Pagination */

#view-home .dashboard-library-pagination {
  display: flex !important;

  align-items: center !important;
  justify-content: space-between !important;

  gap: 12px !important;

  margin-top: 13px !important;

  min-height: 34px !important;
}

#view-home .dashboard-library-pagination-summary {
  color: var(--text-2) !important;

  font-size: 10.5px !important;
  font-weight: 700 !important;
}

#view-home .dashboard-library-pagination-controls {
  display: flex !important;
  gap: 7px !important;
}

#view-home .dashboard-library-pagination-controls button {
  min-width: 58px !important;
  min-height: 30px !important;

  padding: 5px 11px !important;

  border: 1px solid var(--line) !important;

  border-radius: 8px !important;

  background: var(--bg-2) !important;

  color: var(--text-1) !important;

  font-family: inherit !important;

  font-size: 10px !important;
  font-weight: 800 !important;

  cursor: pointer !important;
}

#view-home .dashboard-library-pagination-controls button:disabled {
  opacity: .4 !important;
  cursor: not-allowed !important;
}

/* Keyboard accessibility */

#view-home .dashboard-library-toggle:focus-visible,
#view-home .dashboard-library-filter:focus-visible,
#view-home .dashboard-library-actions button:focus-visible,
#view-home .dashboard-library-open-name:focus-visible,
#view-home .dashboard-library-pagination-controls button:focus-visible {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 3px !important;
}

/* Dark theme */

html[data-theme="dark"] #view-home .dashboard-library-toggle,
html[data-theme="dark"] #view-home .dashboard-library-panel {
  background: var(--bg-2) !important;
  border-color: var(--line) !important;
}

html[data-theme="dark"] #view-home .dashboard-library-table thead th {
  background: #126F73 !important;
  color: #FFFFFF !important;
}

html[data-theme="dark"] #view-home .dashboard-library-status.is-completed {
  color: #8FE0C3 !important;
  background: #164338 !important;
}

html[data-theme="dark"] #view-home .dashboard-library-status.is-progress {
  color: #8CE6DF !important;
  background: #164247 !important;
}

html[data-theme="dark"] #view-home .dashboard-library-status.is-review {
  color: #F2CF82 !important;
  background: #493B21 !important;
}

html[data-theme="dark"] #view-home .dashboard-library-status.is-draft {
  color: #C1CCD8 !important;
  background: #283847 !important;
}

/* Responsive layout */

@media screen and (max-width: 767px) {

  #view-home .dashboard-technology-library {
    width: calc(100% - 24px) !important;
    margin-top: 20px !important;
  }

  #view-home .dashboard-library-toggle {
    display: flex !important;

    flex-wrap: wrap !important;

    gap: 11px !important;

    padding: 13px !important;
  }

  #view-home .dashboard-library-icon {
    width: 42px !important;
    height: 42px !important;
  }

  #view-home .dashboard-library-copy {
    flex: 1 1 160px !important;
  }

  #view-home .dashboard-library-title {
    font-size: 14px !important;
  }

  #view-home .dashboard-library-description {
    font-size: 10px !important;
  }

  #view-home .dashboard-library-count {
    margin-inline-start: 53px !important;
  }

  #view-home .dashboard-library-panel {
    padding: 12px !important;
  }

  #view-home .dashboard-library-toolbar {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  #view-home .dashboard-library-filters {
    width: 100% !important;
  }

  #view-home .dashboard-library-filter {
    flex: 0 0 auto !important;
  }

  #view-home .dashboard-library-pagination {
    flex-wrap: wrap !important;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {

  #view-home .dashboard-library-toggle,
  #view-home .dashboard-library-chevron,
  #view-home .dashboard-library-filter,
  #view-home .dashboard-library-actions button {
    transition: none !important;
  }
}
/* ============================================================
   FANAGAAM — FIXED-WIDTH TECHNOLOGY TABLE
   No horizontal scrolling / Responsive mobile rows
   ============================================================ */

/* Desktop: all columns fit inside the available width */

#view-home .dashboard-library-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  box-sizing: border-box !important;
}

#view-home .dashboard-library-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  overflow-wrap: anywhere !important;
}

/* Balanced column widths — total 100% */

#view-home .dashboard-library-table th:nth-child(1),
#view-home .dashboard-library-table td:nth-child(1) {
  width: 4% !important;
}

#view-home .dashboard-library-table th:nth-child(2),
#view-home .dashboard-library-table td:nth-child(2) {
  width: 17% !important;
}

#view-home .dashboard-library-table th:nth-child(3),
#view-home .dashboard-library-table td:nth-child(3) {
  width: 12% !important;
}

#view-home .dashboard-library-table th:nth-child(4),
#view-home .dashboard-library-table td:nth-child(4) {
  width: 10% !important;
}

#view-home .dashboard-library-table th:nth-child(5),
#view-home .dashboard-library-table td:nth-child(5) {
  width: 20% !important;
}

#view-home .dashboard-library-table th:nth-child(6),
#view-home .dashboard-library-table td:nth-child(6) {
  width: 13% !important;
}

#view-home .dashboard-library-table th:nth-child(7),
#view-home .dashboard-library-table td:nth-child(7) {
  width: 12% !important;
}

#view-home .dashboard-library-table th:nth-child(8),
#view-home .dashboard-library-table td:nth-child(8) {
  width: 12% !important;
}

#view-home .dashboard-library-table th,
#view-home .dashboard-library-table td {
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#view-home .dashboard-library-open-name {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

/* Tablet and mobile: each project becomes a compact information card */

@media screen and (max-width: 991px) {

  #view-home .dashboard-library-table-wrap {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  #view-home .dashboard-library-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #view-home .dashboard-library-table thead {
    display: none !important;
  }

  #view-home .dashboard-library-table tbody {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  #view-home .dashboard-library-table tbody tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    padding: 10px 13px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--bg-2) !important;
    box-sizing: border-box !important;
  }

  #view-home .dashboard-library-table tbody td {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 9px 3px !important;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    text-align: end !important;
    overflow-wrap: anywhere !important;
  }

  #view-home .dashboard-library-table tbody td:last-child {
    border-bottom: 0 !important;
  }

  /* Persian field labels */

  #view-home .dashboard-library-table tbody td:nth-child(1)::before {
    content: "ردیف";
  }

  #view-home .dashboard-library-table tbody td:nth-child(2)::before {
    content: "عنوان فناوری";
  }

  #view-home .dashboard-library-table tbody td:nth-child(3)::before {
    content: "مسئول پروژه";
  }

  #view-home .dashboard-library-table tbody td:nth-child(4)::before {
    content: "تاریخ شروع";
  }

  #view-home .dashboard-library-table tbody td:nth-child(5)::before {
    content: "شرح";
  }

  #view-home .dashboard-library-table tbody td:nth-child(6)::before {
    content: "وضعیت";
  }

  #view-home .dashboard-library-table tbody td:nth-child(7)::before {
    content: "پیشرفت";
  }

  #view-home .dashboard-library-table tbody td:nth-child(8)::before {
    content: "امکانات";
  }

  #view-home .dashboard-library-table tbody td::before {
    flex: 0 0 100px;
    color: var(--text-2);
    font-size: 10px;
    font-weight: 800;
    text-align: start;
  }

  #view-home .dashboard-library-description-cell span {
    max-width: 65% !important;
  }

  #view-home .dashboard-library-actions {
    justify-content: flex-end !important;
  }

  /* English field labels */

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(1)::before {
    content: "No.";
  }

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(2)::before {
    content: "Technology";
  }

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(3)::before {
    content: "Responsible";
  }

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(4)::before {
    content: "Start date";
  }

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(5)::before {
    content: "Description";
  }

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(6)::before {
    content: "Status";
  }

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(7)::before {
    content: "Progress";
  }

  html[lang^="en"] #view-home .dashboard-library-table tbody td:nth-child(8)::before {
    content: "Actions";
  }
}

/* Prevent accidental horizontal overflow from the library itself */

#view-home .dashboard-technology-library,
#view-home .dashboard-library-panel {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
/* ============================================================
   FANAGAAM — NO INTERNAL TABLE SCROLL
   Fixed-width and natural-height technology table
   ============================================================ */

#view-home .dashboard-library-panel,
#view-home .dashboard-library-table-wrap {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: visible !important;

  box-sizing: border-box !important;
}

#view-home .dashboard-library-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  height: auto !important;

  table-layout: fixed !important;
}

/* Desktop: natural table height */
@media screen and (min-width: 992px) {
  #view-home .dashboard-library-table tbody {
    display: table-row-group !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #view-home .dashboard-library-table tbody tr {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Mobile: natural-height stacked project cards */
@media screen and (max-width: 991px) {
  #view-home .dashboard-library-table tbody {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #view-home .dashboard-library-table tbody tr {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}
/* ============================================================
   FANAGAAM — COMPLETE TABLE BOTTOM CORNERS
   Preserve rounded corners in RTL and LTR.
   ============================================================ */

#view-home .dashboard-library-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 12px !important;
  overflow: visible !important;
}

/* Complete lower edge of the final row */

#view-home .dashboard-library-table tbody tr:last-child > td {
  border-bottom: 0 !important;
  background-clip: padding-box !important;
}

/* Bottom-right corner in RTL / bottom-left in LTR */

#view-home .dashboard-library-table tbody tr:last-child > td:first-child {
  border-end-start-radius: 11px !important;
}

/* Bottom-left corner in RTL / bottom-right in LTR */

#view-home .dashboard-library-table tbody tr:last-child > td:last-child {
  border-end-end-radius: 11px !important;
}

/* Empty table state: round both lower corners */

#view-home .dashboard-library-table tbody tr:last-child > td[colspan] {
  border-end-start-radius: 11px !important;
  border-end-end-radius: 11px !important;
}
/* ============================================================
   FANAGAAM — STRONGER TABLE FRAME & BOTTOM CORNERS
   Consistent border weight on all four corners
   ============================================================ */

#view-home .dashboard-library-table-wrap {
  width: 100% !important;

  border: 2px solid #8299A6 !important;
  border-radius: 13px !important;

  overflow: hidden !important;

  height: auto !important;
  max-height: none !important;

  box-sizing: border-box !important;

  background: var(--bg-2) !important;
}

#view-home .dashboard-library-table {
  width: 100% !important;

  border: 0 !important;
  border-radius: 10px !important;

  border-collapse: separate !important;
  border-spacing: 0 !important;

  overflow: visible !important;
}

/* Remove conflicting cell-level corner styling */
#view-home .dashboard-library-table tbody tr:last-child > td {
  border-bottom: 0 !important;
  border-radius: 0 !important;
}

/* Empty state */
#view-home .dashboard-library-table tbody tr:last-child > td[colspan] {
  border-radius: 0 !important;
}

/* Dark theme */
html[data-theme="dark"] #view-home .dashboard-library-table-wrap {
  border-color: #607987 !important;
}
/* ============================================================
   FANAGAAM — BORDERLESS TECHNOLOGY LIBRARY CARD
   Clean, modern matte surface
   ============================================================ */

#view-home .dashboard-library-toggle,
#view-home .dashboard-library-toggle[aria-expanded="true"] {
  border: 0 !important;

  background: var(--bg-2) !important;

  box-shadow:
    0 8px 24px -17px rgba(18, 75, 103, 0.28),
    0 2px 7px -5px rgba(18, 75, 103, 0.14) !important;

  border-radius: 17px !important;

  transition:
    box-shadow 0.28s ease,
    background-color 0.28s ease !important;
}

/* Subtle elevation on hover without restoring a border */

#view-home .dashboard-library-toggle:hover {
  border: 0 !important;

  box-shadow:
    0 13px 28px -17px rgba(18, 75, 103, 0.34),
    0 3px 9px -6px rgba(18, 75, 103, 0.16) !important;
}

/* Keep keyboard accessibility */

#view-home .dashboard-library-toggle:focus-visible {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 4px !important;
}
/* ============================================================
   FANAGAAM — BORDERLESS TECHNOLOGY COUNT
   ============================================================ */

#view-home .dashboard-library-count {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;

  background: color-mix(
    in srgb,
    var(--brand-primary) 11%,
    var(--bg-2)
  ) !important;

  color: var(--brand-primary) !important;

  border-radius: 30px !important;
  padding: 5px 13px !important;
  min-height: 32px !important;
}
/* ============================================================
   FANAGAAM — GLOBAL BORDERLESS TOAST NOTIFICATIONS
   All notification types / Persian + English / Light + Dark
   Keep surfaces, shadows, icons and typography unchanged.
   ============================================================ */

#toastContainer.toast-container .toast,

html[dir="rtl"] #toastContainer.toast-container .toast,
html[dir="ltr"] #toastContainer.toast-container .toast,

html[data-theme="light"] #toastContainer.toast-container .toast,
html[data-theme="dark"] #toastContainer.toast-container .toast {

  /* Remove every outer notification border. */
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;

  /* Explicitly remove the colored leading accent border. */
  border-inline-start: 0 !important;
  border-inline-end: 0 !important;

  border-top: 0 !important;
  border-bottom: 0 !important;

  /* Keep the existing rounded shape. */
  border-radius: 14px !important;

  /* Preserve the existing background and shadow. */
  box-shadow:
    0 7px 18px rgba(15, 35, 48, .13) !important;
}

/* Preserve the existing light theme surface. */
html[data-theme="light"] #toastContainer.toast-container .toast {
  background: #FFFFFF !important;
}

/* Preserve the existing dark theme surface. */
html[data-theme="dark"] #toastContainer.toast-container .toast {
  background: #102432 !important;
}

/* Preserve notification icons and their existing appearance. */
#toastContainer.toast-container .toast-icon-wrap,
#toastContainer.toast-container .toast-svg-icon {
  opacity: 1 !important;
  filter: none !important;
}

/* ============================================================
   FANAGAAM — PRECISION 3D TABLE — DESIGN A
   Elegant / Restrained / High Legibility
   Based on approved browser mockup A

   Scope: Registered Technologies table only.
   HTML and JavaScript remain unchanged.
   ============================================================ */


/* ------------------------------------------------------------
   1. TABLE FRAME — MATTE DEPTH
   ------------------------------------------------------------ */

#view-home .dashboard-library-table-wrap {
  position: relative !important;

  width: 100% !important;
  max-width: 100% !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: hidden !important;

  box-sizing: border-box !important;

  border: 1.5px solid #829DA8 !important;
  border-radius: 13px !important;

  background: #F7FBFC !important;

  box-shadow:
    0 10px 20px -17px rgba(20, 62, 77, .38),
    inset 0 1px 0 rgba(255, 255, 255, .95) !important;
}


/* ------------------------------------------------------------
   2. TABLE STRUCTURE — FIXED WIDTH
   ------------------------------------------------------------ */

#view-home .dashboard-library-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  height: auto !important;

  border: 0 !important;
  border-radius: 12px !important;

  border-collapse: separate !important;
  border-spacing: 0 !important;

  table-layout: fixed !important;
  direction: inherit !important;

  font-size: 11px !important;
  color: #38505E !important;

  transform: none !important;
}


/* Preserve the existing eight-column proportions. */

#view-home .dashboard-library-table th:nth-child(1),
#view-home .dashboard-library-table td:nth-child(1) {
  width: 4% !important;
}

#view-home .dashboard-library-table th:nth-child(2),
#view-home .dashboard-library-table td:nth-child(2) {
  width: 20% !important;
}

#view-home .dashboard-library-table th:nth-child(3),
#view-home .dashboard-library-table td:nth-child(3) {
  width: 11% !important;
}

#view-home .dashboard-library-table th:nth-child(4),
#view-home .dashboard-library-table td:nth-child(4) {
  width: 10% !important;
}

#view-home .dashboard-library-table th:nth-child(5),
#view-home .dashboard-library-table td:nth-child(5) {
  width: 29% !important;
}

#view-home .dashboard-library-table th:nth-child(6),
#view-home .dashboard-library-table td:nth-child(6) {
  width: 10% !important;
}

#view-home .dashboard-library-table th:nth-child(7),
#view-home .dashboard-library-table td:nth-child(7) {
  width: 7% !important;
}

#view-home .dashboard-library-table th:nth-child(8),
#view-home .dashboard-library-table td:nth-child(8) {
  width: 9% !important;
}


/* ------------------------------------------------------------
   3. HEADER — RAISED TURQUOISE SURFACE
   ------------------------------------------------------------ */

#view-home .dashboard-library-table thead th {
  position: relative !important;

  height: 43px !important;

  padding: 9px 7px !important;

  background: linear-gradient(
    180deg,
    #15999C 0%,
    #0B858A 58%,
    #08777C 100%
  ) !important;

  color: #FFFFFF !important;

  border: 0 !important;
  border-bottom: 2px solid #06686D !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 3px 7px rgba(0, 73, 79, .16) !important;

  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.6 !important;

  text-align: center !important;
  vertical-align: middle !important;

  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#view-home .dashboard-library-table thead th:not(:last-child) {
  border-inline-end: 1px solid rgba(255, 255, 255, .15) !important;
}

#view-home .dashboard-library-table thead th:first-child {
  border-start-start-radius: 11px !important;
}

#view-home .dashboard-library-table thead th:last-child {
  border-start-end-radius: 11px !important;
}


/* ------------------------------------------------------------
   4. BODY ROWS — LAYERED MATTE SURFACES
   ------------------------------------------------------------ */

@media screen and (min-width: 992px) {

  #view-home .dashboard-library-table tbody td {
    height: 58px !important;

    padding: 9px 7px !important;

    background: linear-gradient(
      180deg,
      #FFFFFF 0%,
      #F8FBFC 100%
    ) !important;

    color: #526C79 !important;

    border: 0 !important;
    border-bottom: 1px solid #D7E4E8 !important;
    border-inline-end: 1px solid #E8EFF1 !important;

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .95),
      inset 0 -1px 0 rgba(75, 111, 126, .035) !important;

    font-size: 10.5px !important;
    font-weight: 650 !important;
    line-height: 1.65 !important;

    vertical-align: middle !important;
    text-align: center !important;

    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  /* Alternating matte row surfaces */

  #view-home .dashboard-library-table tbody tr:nth-child(even) > td {
    background: linear-gradient(
      180deg,
      #F6FAFB 0%,
      #EFF5F7 100%
    ) !important;
  }

  /* Hover: visual emphasis without moving the row */

  #view-home .dashboard-library-table tbody tr,
  #view-home .dashboard-library-table tbody td {
    transform: none !important;
  }

  #view-home .dashboard-library-table tbody tr:hover > td {
    background: linear-gradient(
      180deg,
      #EDF8F7 0%,
      #E2F3F1 100%
    ) !important;
  }

  /* Complete bottom edge */

  #view-home .dashboard-library-table tbody tr:last-child > td {
    border-bottom: 0 !important;
  }

  #view-home .dashboard-library-table tbody td:last-child {
    border-inline-end: 0 !important;
  }

  #view-home .dashboard-library-table tbody tr:last-child > td:first-child {
    border-end-start-radius: 11px !important;
  }

  #view-home .dashboard-library-table tbody tr:last-child > td:last-child {
    border-end-end-radius: 11px !important;
  }
}


/* ------------------------------------------------------------
   5. ROW NUMBER AND PROJECT TITLE
   ------------------------------------------------------------ */

#view-home .dashboard-library-row-number {
  color: #087E83 !important;
  font-weight: 900 !important;
  font-variant-numeric: tabular-nums !important;
}

#view-home .dashboard-library-open-name {
  display: inline-block !important;

  max-width: 100% !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 0 !important;
  outline-offset: 3px !important;

  background: transparent !important;

  color: #213946 !important;

  font-family: inherit !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  line-height: 1.75 !important;

  text-align: start !important;

  white-space: normal !important;
  overflow-wrap: anywhere !important;

  cursor: pointer !important;

  transform: none !important;
}

#view-home .dashboard-library-open-name:hover {
  color: #087E83 !important;

  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}


/* ------------------------------------------------------------
   6. DATE AND DESCRIPTION
   ------------------------------------------------------------ */

#view-home .dashboard-library-date {
  color: #637B88 !important;

  white-space: nowrap !important;

  font-variant-numeric: tabular-nums !important;
}

#view-home .dashboard-library-description-cell {
  text-align: start !important;
}

#view-home .dashboard-library-description-cell span {
  display: -webkit-box !important;

  width: 100% !important;
  max-width: 100% !important;

  overflow: hidden !important;

  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;

  color: #5D7481 !important;

  font-size: 10px !important;
  line-height: 1.7 !important;

  text-align: start !important;

  overflow-wrap: anywhere !important;
}


/* ------------------------------------------------------------
   7. STATUS — SUBTLE RAISED PILL BADGES
   ------------------------------------------------------------ */

#view-home .dashboard-library-status {
  position: relative !important;

  display: inline-flex !important;

  align-items: center !important;
  justify-content: center !important;

  gap: 5px !important;

  padding: 6px 9px !important;

  border: 0 !important;
  border-radius: 999px !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 2px 4px rgba(25, 61, 75, .08) !important;

  font-size: 9.5px !important;
  font-weight: 850 !important;

  line-height: 1.5 !important;

  white-space: normal !important;
  text-align: center !important;
}

#view-home .dashboard-library-status::before {
  content: "" !important;

  width: 6px !important;
  height: 6px !important;

  flex: 0 0 6px !important;

  border-radius: 50% !important;

  background: currentColor !important;
}

#view-home .dashboard-library-status.is-draft {
  background: #EEF3F7 !important;
  color: #647990 !important;
}

#view-home .dashboard-library-status.is-progress {
  background: #E3F5F3 !important;
  color: #087E83 !important;
}

#view-home .dashboard-library-status.is-review {
  background: #FFF3D9 !important;
  color: #9A650A !important;
}

#view-home .dashboard-library-status.is-completed {
  background: #E9F6F1 !important;
  color: #167A62 !important;
}


/* ------------------------------------------------------------
   8. PROGRESS — RECESSED TRACK + TURQUOISE FILL
   ------------------------------------------------------------ */

#view-home .dashboard-library-progress-cell {
  white-space: nowrap !important;
}

#view-home .dashboard-library-progress-track {
  display: inline-block !important;

  vertical-align: middle !important;

  width: 48px !important;
  max-width: 55% !important;

  height: 7px !important;

  margin-inline-end: 4px !important;

  border: 0 !important;
  border-radius: 10px !important;

  background: #DCE7EA !important;

  box-shadow:
    inset 0 2px 3px rgba(35, 65, 78, .18),
    inset 0 1px 0 #FFFFFF !important;

  overflow: hidden !important;
}

#view-home .dashboard-library-progress-track > span {
  display: block !important;

  height: 100% !important;

  border-radius: 10px !important;

  background: linear-gradient(
    90deg,
    #087E83 0%,
    #53C2BE 100%
  ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .4) !important;
}

#view-home .dashboard-library-progress-cell strong {
  color: #526A78 !important;

  font-size: 10px !important;
  font-weight: 900 !important;

  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}


/* ------------------------------------------------------------
   9. ACTION BUTTONS — SMALL RAISED CONTROLS
   ------------------------------------------------------------ */

#view-home .dashboard-library-actions {
  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  gap: 5px !important;
}

#view-home .dashboard-library-actions button {
  width: 31px !important;
  height: 31px !important;

  min-width: 31px !important;
  min-height: 31px !important;

  display: inline-grid !important;
  place-items: center !important;

  padding: 0 !important;

  border: 1px solid #BFD0D7 !important;
  border-radius: 9px !important;

  background: linear-gradient(
    180deg,
    #FFFFFF 0%,
    #EDF4F6 100%
  ) !important;

  color: #087E83 !important;

  box-shadow:
    0 2px 0 #D8E4E8,
    0 4px 7px rgba(20, 60, 75, .08),
    inset 0 1px 0 #FFFFFF !important;

  transition:
    box-shadow .2s ease,
    background .2s ease,
    border-color .2s ease !important;

  transform: none !important;

  cursor: pointer !important;
}

#view-home .dashboard-library-actions button svg {
  display: block !important;

  width: 15px !important;
  height: 15px !important;
}

#view-home .dashboard-library-action-open {
  color: #087E83 !important;
}

#view-home .dashboard-library-action-delete {
  color: #D94B55 !important;
}

#view-home .dashboard-library-actions button:hover {
  border-color: #87BFC0 !important;

  background: linear-gradient(
    180deg,
    #FFFFFF 0%,
    #E7F5F4 100%
  ) !important;

  box-shadow:
    0 4px 8px rgba(20, 60, 75, .12),
    inset 0 1px 0 #FFFFFF !important;
}

#view-home .dashboard-library-actions button:active {
  box-shadow:
    inset 0 2px 4px rgba(20, 60, 75, .16) !important;

  transform: translateY(1px) !important;
}


/* ------------------------------------------------------------
   10. FILTER BUTTONS — RESTRAINED 3D
   Do not change the borderless technology-count badge.
   ------------------------------------------------------------ */

#view-home .dashboard-library-filter {
  border: 1px solid #D6E2E5 !important;

  background: linear-gradient(
    180deg,
    #FFFFFF 0%,
    #F8FBFC 100%
  ) !important;

  box-shadow:
    0 2px 0 #E5EDF0,
    inset 0 1px 0 #FFFFFF !important;

  transform: none !important;
}

#view-home .dashboard-library-filter.is-active {
  background: linear-gradient(
    180deg,
    #EAF7F6 0%,
    #E1F2F0 100%
  ) !important;

  color: #087E83 !important;

  border-color: #B7DEDD !important;

  box-shadow:
    0 2px 0 #D0E7E5,
    inset 0 1px 0 #FFFFFF !important;
}


/* ------------------------------------------------------------
   11. PAGINATION — MATCH THE TABLE DEPTH
   ------------------------------------------------------------ */

#view-home .dashboard-library-pagination-controls button {
  border: 1px solid #BDCDD3 !important;

  border-radius: 8px !important;

  background: linear-gradient(
    180deg,
    #FFFFFF 0%,
    #EEF4F6 100%
  ) !important;

  color: #4C6876 !important;

  box-shadow:
    0 2px 0 #D7E2E6,
    inset 0 1px 0 #FFFFFF !important;

  transform: none !important;
}

#view-home .dashboard-library-pagination-controls button:disabled {
  opacity: .45 !important;
  box-shadow: none !important;
}


/* ------------------------------------------------------------
   12. EMPTY STATE
   ------------------------------------------------------------ */

#view-home .dashboard-library-empty {
  min-height: 90px !important;

  padding: 24px 16px !important;

  color: var(--text-2) !important;

  background: linear-gradient(
    180deg,
    #FFFFFF 0%,
    #F6FAFB 100%
  ) !important;

  text-align: center !important;

  font-size: 12px !important;
  font-weight: 750 !important;
}


/* ------------------------------------------------------------
   13. DARK THEME — SAME DEPTH, DARK MATTE SURFACES
   ------------------------------------------------------------ */

html[data-theme="dark"] #view-home .dashboard-library-table-wrap {
  background: #142936 !important;

  border-color: #607B87 !important;

  box-shadow:
    0 10px 22px -16px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

html[data-theme="dark"] #view-home .dashboard-library-table thead th {
  background: linear-gradient(
    180deg,
    #16878B 0%,
    #116F75 58%,
    #0D6269 100%
  ) !important;

  border-bottom-color: #0B555C !important;
}

@media screen and (min-width: 992px) {

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td {
    background: linear-gradient(
      180deg,
      #1C3542 0%,
      #172E3A 100%
    ) !important;

    color: #D7E5EA !important;

    border-bottom-color: #344D59 !important;
    border-inline-end-color: #2A424F !important;

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .035) !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody tr:nth-child(even) > td {
    background: linear-gradient(
      180deg,
      #203B48 0%,
      #1A333F 100%
    ) !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody tr:hover > td {
    background: linear-gradient(
      180deg,
      #24494C 0%,
      #1C3D43 100%
    ) !important;
  }
}

html[data-theme="dark"] #view-home .dashboard-library-open-name {
  color: #E2EDF1 !important;
}

html[data-theme="dark"] #view-home .dashboard-library-description-cell span,
html[data-theme="dark"] #view-home .dashboard-library-date,
html[data-theme="dark"] #view-home .dashboard-library-progress-cell strong {
  color: #B8CBD3 !important;
}

html[data-theme="dark"] #view-home .dashboard-library-progress-track {
  background: #304B56 !important;

  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}

html[data-theme="dark"] #view-home .dashboard-library-actions button,
html[data-theme="dark"] #view-home .dashboard-library-filter,
html[data-theme="dark"] #view-home .dashboard-library-pagination-controls button {
  background: linear-gradient(
    180deg,
    #294551 0%,
    #203A46 100%
  ) !important;

  border-color: #526D79 !important;

  color: #DDE8ED !important;

  box-shadow:
    0 2px 0 #172D38,
    inset 0 1px 0 rgba(255, 255, 255, .07) !important;
}


/* ------------------------------------------------------------
   14. RESPONSIVE — KEEP THE EXISTING MOBILE CARD LAYOUT
   No internal horizontal or vertical scrolling.
   ------------------------------------------------------------ */

@media screen and (max-width: 991px) {

  #view-home .dashboard-library-table-wrap {
    width: 100% !important;

    height: auto !important;
    max-height: none !important;

    overflow: visible !important;
  }

  #view-home .dashboard-library-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #view-home .dashboard-library-table tbody tr {
    transform: none !important;

    box-shadow:
      0 6px 14px -10px rgba(20, 62, 77, .22),
      inset 0 1px 0 rgba(255, 255, 255, .9) !important;
  }
}


/* ------------------------------------------------------------
   15. ACCESSIBILITY — KEYBOARD AND REDUCED MOTION
   ------------------------------------------------------------ */

#view-home .dashboard-library-open-name:focus-visible,
#view-home .dashboard-library-actions button:focus-visible,
#view-home .dashboard-library-filter:focus-visible,
#view-home .dashboard-library-pagination-controls button:focus-visible {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 3px !important;
}

@media (prefers-reduced-motion: reduce) {

  #view-home .dashboard-library-actions button,
  #view-home .dashboard-library-filter,
  #view-home .dashboard-library-pagination-controls button {
    transition: none !important;
  }
}
/* ============================================================
   FANAGAAM — REMOVE STATUS BADGE DOTS
   Keep clean status pills without circular markers.
   ============================================================ */

#view-home .dashboard-library-status::before {
  content: none !important;
  display: none !important;
}

#view-home .dashboard-library-status {
  gap: 0 !important;
}
/* ============================================================
   FANAGAAM — REMOVE OUTER LIBRARY PANEL BORDER
   Keep table frame and internal row dividers unchanged.
   ============================================================ */

#view-home .dashboard-library-panel {
  border: 0 !important;
  outline: 0 !important;

  background: var(--bg-2) !important;

  border-radius: 16px !important;

  box-shadow:
    0 12px 28px -24px rgba(18, 75, 103, .20) !important;
}

/* Dark theme */

html[data-theme="dark"] #view-home .dashboard-library-panel {
  border: 0 !important;
  outline: 0 !important;

  background: var(--bg-2) !important;

  box-shadow:
    0 12px 28px -24px rgba(0, 0, 0, .28) !important;
}
/* ============================================================
   FANAGAAM — 3D SIGNATURE EXPERIENCE
   Premium brand environment / Cinematic depth
   Matte ceramic / Turquoise and navy
   ============================================================ */

#publicAbout .fg-about-visual-3d {
  position: relative !important;
  isolation: isolate !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  max-width: 470px !important;

  aspect-ratio: 1 / 1 !important;

  margin-inline: auto !important;

  overflow: visible !important;

  perspective: 1500px !important;
  transform-style: preserve-3d !important;
}


/* 01 — ATMOSPHERE */

#publicAbout .fg-about-atmosphere {
  position: absolute !important;
  inset: -8% !important;
  z-index: 0 !important;

  background:
    radial-gradient(
      ellipse at 48% 48%,
      rgba(72, 205, 205, .20) 0%,
      rgba(72, 205, 205, .08) 34%,
      transparent 68%
    ),
    radial-gradient(
      circle at 25% 25%,
      rgba(20, 111, 163, .09),
      transparent 42%
    ),
    radial-gradient(
      circle at 78% 76%,
      rgba(10, 126, 131, .10),
      transparent 38%
    ) !important;

  border-radius: 50% !important;

  pointer-events: none !important;
}

#publicAbout .fg-about-visual-3d::before {
  content: "" !important;

  position: absolute !important;
  inset: 2% !important;

  z-index: 0 !important;

  border: 1px solid rgba(80, 173, 183, .12) !important;
  border-radius: 50% !important;

  background:
    repeating-radial-gradient(
      circle at center,
      transparent 0 48px,
      rgba(40, 135, 150, .045) 49px 50px
    ) !important;

  pointer-events: none !important;
}

#publicAbout .fg-about-visual-3d::after {
  content: "" !important;

  position: absolute !important;
  inset: 10% !important;

  z-index: 0 !important;

  border-radius: 50% !important;

  background:
    radial-gradient(
      circle,
      transparent 48%,
      rgba(8, 126, 131, .07) 49%,
      transparent 50%
    ) !important;

  pointer-events: none !important;
}


/* 02 — ORBITAL ARCHITECTURE */

#publicAbout .fg-about-orbit {
  position: absolute !important;

  display: block !important;

  border-radius: 50% !important;

  pointer-events: none !important;

  transform-style: preserve-3d !important;
}

#publicAbout .fg-about-orbit--rear {
  width: 112% !important;
  height: 59% !important;

  top: 21% !important;
  left: -6% !important;

  border: 2px solid rgba(24, 144, 160, .28) !important;

  border-top-color: rgba(64, 197, 204, .75) !important;
  border-bottom-color: rgba(15, 87, 132, .18) !important;

  box-shadow:
    0 0 0 5px rgba(65, 191, 195, .035),
    0 0 18px rgba(40, 172, 185, .12) !important;

  transform:
    rotate(-27deg)
    rotateX(62deg) !important;

  z-index: 1 !important;
}

#publicAbout .fg-about-orbit--middle {
  width: 96% !important;
  height: 49% !important;

  top: 27% !important;
  left: 2% !important;

  border: 1px solid rgba(7, 101, 143, .22) !important;

  border-left-color: rgba(13, 164, 174, .68) !important;
  border-right-color: rgba(13, 164, 174, .68) !important;

  transform:
    rotate(29deg)
    rotateX(57deg) !important;

  z-index: 2 !important;
}

#publicAbout .fg-about-orbit--front {
  width: 83% !important;
  height: 42% !important;

  top: 31% !important;
  left: 8.5% !important;

  border: 2px solid transparent !important;

  background:
    linear-gradient(transparent, transparent) padding-box,
    linear-gradient(
      90deg,
      #0B91A4,
      #75D9D5,
      #0B91A4
    ) border-box !important;

  opacity: .6 !important;

  transform:
    rotate(-8deg)
    rotateX(60deg) !important;

  z-index: 4 !important;
}


/* 03 — LIGHT TRAILS */

#publicAbout .fg-about-light-rail {
  position: absolute !important;

  display: block !important;

  height: 2px !important;

  border-radius: 10px !important;

  pointer-events: none !important;

  background: linear-gradient(
    90deg,
    transparent,
    #24BDC0,
    #8AE8E1,
    transparent
  ) !important;

  box-shadow:
    0 0 8px rgba(20, 180, 190, .45) !important;

  z-index: 5 !important;
}

#publicAbout .fg-about-light-rail--one {
  width: 68% !important;

  top: 30% !important;
  left: 8% !important;

  transform: rotate(-24deg) !important;
}

#publicAbout .fg-about-light-rail--two {
  width: 49% !important;

  bottom: 24% !important;
  right: 1% !important;

  opacity: .55 !important;

  transform: rotate(-25deg) !important;
}


/* 04 — MAIN THREE-DIMENSIONAL PLATFORM */

#publicAbout .fg-about-platform {
  position: relative !important;

  width: 77% !important;
  max-width: 355px !important;

  aspect-ratio: 1 / 1 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  transform-style: preserve-3d !important;

  transform:
    perspective(1300px)
    rotateX(13deg)
    rotateY(-13deg)
    rotateZ(-7deg) !important;

  animation:
    fg-about-platform-motion 8s ease-in-out infinite !important;

  z-index: 6 !important;
}


/* Deep navy lower layer */

#publicAbout .fg-about-platform-base {
  position: absolute !important;

  inset: 2% !important;

  border-radius: 43px !important;

  background: linear-gradient(
    145deg,
    #075274 0%,
    #063A59 54%,
    #052B49 100%
  ) !important;

  box-shadow:
    0 27px 0 #052C46,
    0 35px 22px rgba(5, 54, 79, .30),
    inset 0 2px 0 rgba(112, 205, 213, .30),
    inset 0 -5px 8px rgba(0, 18, 37, .28) !important;

  transform: translateZ(-29px) translateY(12px) !important;
}


/* Turquoise middle layer */

#publicAbout .fg-about-platform-mid {
  position: absolute !important;

  inset: 5% !important;

  border-radius: 40px !important;

  background: linear-gradient(
    145deg,
    #A6E4E2 0%,
    #48C6C8 42%,
    #0C8C9D 100%
  ) !important;

  box-shadow:
    0 15px 0 #087B8A,
    0 22px 22px rgba(5, 96, 116, .23),
    inset 0 2px 0 rgba(255, 255, 255, .72) !important;

  transform: translateZ(-13px) translateY(5px) !important;
}


/* Porcelain upper surface */

#publicAbout .fg-about-platform-top {
  position: absolute !important;

  inset: 7% !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  border: 1px solid #FFFFFF !important;

  border-radius: 39px !important;

  background: linear-gradient(
    145deg,
    #FFFFFF 0%,
    #F9FCFD 45%,
    #E9F2F5 100%
  ) !important;

  box-shadow:
    0 5px 0 #D2E2E8,
    0 10px 18px rgba(12, 64, 86, .16),
    inset 0 2px 0 #FFFFFF,
    inset 0 -4px 9px rgba(72, 119, 140, .09) !important;

  transform: translateZ(5px) !important;

  overflow: hidden !important;
}

/* Diagonal premium highlight */

#publicAbout .fg-about-platform-top::before {
  content: "" !important;

  position: absolute !important;

  width: 75% !important;
  height: 2px !important;

  top: 13% !important;
  left: 12% !important;

  background: linear-gradient(
    90deg,
    transparent,
    #FFFFFF,
    transparent
  ) !important;

  box-shadow: 0 0 10px rgba(255, 255, 255, .9) !important;

  z-index: 3 !important;
}


/* 05 — THE ORIGINAL LOGO */

#publicAbout .fg-geo-main-logo {
  position: relative !important;

  display: block !important;

  width: 83% !important;
  max-width: 295px !important;

  max-height: 83% !important;

  height: auto !important;

  object-fit: contain !important;

  z-index: 2 !important;

  filter:
    drop-shadow(0 15px 11px rgba(3, 56, 87, .22))
    drop-shadow(0 3px 3px rgba(8, 126, 131, .13)) !important;

  animation: none !important;

  transform: translateZ(12px) !important;
}


/* 06 — GEOMETRIC FLOATING CUBES */

#publicAbout .fg-about-cube {
  position: absolute !important;

  display: block !important;

  border-radius: 8px !important;

  pointer-events: none !important;

  transform-style: preserve-3d !important;

  z-index: 8 !important;
}

#publicAbout .fg-about-cube--hero {
  width: 47px !important;
  height: 47px !important;

  top: 8% !important;
  right: 11% !important;

  background: linear-gradient(
    145deg,
    #77E3E0,
    #22BCC0 54%,
    #078F9F
  ) !important;

  box-shadow:
    0 8px 0 #087F8D,
    0 17px 20px rgba(8, 134, 149, .25),
    inset 2px 2px 0 rgba(255, 255, 255, .62) !important;

  transform: rotate(13deg) rotateX(18deg) !important;

  animation: fg-about-object-float 7s ease-in-out infinite !important;
}

#publicAbout .fg-about-cube--blue {
  width: 29px !important;
  height: 29px !important;

  top: 24% !important;
  left: 4% !important;

  background: linear-gradient(
    145deg,
    #178EB7,
    #075078
  ) !important;

  box-shadow:
    0 5px 0 #063D60,
    0 10px 16px rgba(5, 66, 103, .24),
    inset 1px 1px 0 rgba(255, 255, 255, .4) !important;

  transform: rotate(-12deg) !important;

  animation: fg-about-object-float 8s ease-in-out infinite reverse !important;
}

#publicAbout .fg-about-cube--gold {
  width: 25px !important;
  height: 25px !important;

  top: 31% !important;
  right: 0 !important;

  background: linear-gradient(
    145deg,
    #F9D48A,
    #E6A23A
  ) !important;

  box-shadow:
    0 5px 0 #BD822D,
    0 10px 15px rgba(175, 119, 35, .18),
    inset 1px 1px 0 rgba(255, 255, 255, .55) !important;

  transform: rotate(12deg) !important;

  animation: fg-about-object-float 6.5s ease-in-out infinite !important;
}

#publicAbout .fg-about-cube--ice {
  width: 34px !important;
  height: 34px !important;

  bottom: 12% !important;
  right: 15% !important;

  background: linear-gradient(
    145deg,
    #FFFFFF,
    #DDEBF0
  ) !important;

  box-shadow:
    0 6px 0 #C3D9E0,
    0 12px 17px rgba(35, 83, 99, .15),
    inset 1px 1px 0 #FFFFFF !important;

  transform: rotate(-14deg) !important;

  animation: fg-about-object-float 9s ease-in-out infinite reverse !important;
}


/* 07 — SPHERICAL ELEMENTS */

#publicAbout .fg-about-sphere {
  position: absolute !important;

  display: block !important;

  border-radius: 50% !important;

  pointer-events: none !important;

  z-index: 9 !important;
}

#publicAbout .fg-about-sphere--large {
  width: 25px !important;
  height: 25px !important;

  left: 5% !important;
  bottom: 34% !important;

  background: radial-gradient(
    circle at 30% 25%,
    #A4F0E9 0%,
    #39C9C7 40%,
    #087E91 100%
  ) !important;

  box-shadow:
    0 6px 14px rgba(7, 125, 145, .27),
    inset 1px 1px 2px rgba(255, 255, 255, .75) !important;

  animation: fg-about-object-float 7.5s ease-in-out infinite !important;
}

#publicAbout .fg-about-sphere--small {
  width: 11px !important;
  height: 11px !important;

  right: 19% !important;
  bottom: 24% !important;

  background: radial-gradient(
    circle at 30% 25%,
    #FFFFFF,
    #A9CFD9
  ) !important;

  box-shadow:
    0 3px 8px rgba(18, 82, 103, .18) !important;
}


/* 08 — GROUND SHADOW */

#publicAbout .fg-about-ground-shadow {
  position: absolute !important;

  left: 17% !important;
  bottom: 7% !important;

  width: 66% !important;
  height: 11% !important;

  border-radius: 50% !important;

  background: radial-gradient(
    ellipse,
    rgba(4, 69, 96, .28) 0%,
    rgba(8, 126, 131, .12) 47%,
    transparent 76%
  ) !important;

  filter: blur(14px) !important;

  z-index: 1 !important;

  pointer-events: none !important;
}


/* 09 — ANIMATION */

@keyframes fg-about-platform-motion {
  0%, 100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -9px;
  }
}

@keyframes fg-about-object-float {
  0%, 100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -11px;
  }
}


/* 10 — DARK THEME */

html[data-theme="dark"] #publicAbout .fg-about-platform-base {
  background: linear-gradient(
    145deg,
    #0C4965,
    #082F4B,
    #061E38
  ) !important;
}

html[data-theme="dark"] #publicAbout .fg-about-platform-mid {
  background: linear-gradient(
    145deg,
    #4B999F,
    #237D89,
    #145B6D
  ) !important;
}

html[data-theme="dark"] #publicAbout .fg-about-platform-top {
  background: linear-gradient(
    145deg,
    #DCE9ED,
    #C7DCE2,
    #B5CDD5
  ) !important;

  border-color: #E5F1F4 !important;
}


/* 11 — RESPONSIVE */

@media (max-width: 991px) {
  #publicAbout .fg-about-visual-3d {
    max-width: 350px !important;
  }

  #publicAbout .fg-about-platform {
    width: 75% !important;
  }
}

@media (max-width: 480px) {
  #publicAbout .fg-about-visual-3d {
    max-width: 285px !important;
  }

  #publicAbout .fg-about-platform {
    width: 72% !important;
  }

  #publicAbout .fg-about-cube--hero {
    width: 32px !important;
    height: 32px !important;
  }

  #publicAbout .fg-about-cube--blue {
    width: 21px !important;
    height: 21px !important;
  }

  #publicAbout .fg-about-cube--gold {
    width: 18px !important;
    height: 18px !important;
  }

  #publicAbout .fg-about-cube--ice {
    width: 24px !important;
    height: 24px !important;
  }
}


/* 12 — ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  #publicAbout .fg-about-platform,
  #publicAbout .fg-about-cube,
  #publicAbout .fg-about-sphere {
    animation: none !important;
  }
}

/* ============================================================
   FANAGAAM — LARGE ORIGINAL 3D LOGO
   True front-facing appearance
   Original dimensions / Transparent surroundings
   No tile / No frame / No decorative objects
   ============================================================ */


/* ------------------------------------------------------------
   01. LOGO CONTAINER
   ------------------------------------------------------------ */

#publicAbout .fg-about-logo-3d {
  position: relative !important;
  isolation: isolate !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  max-width: 450px !important;

  aspect-ratio: 1 / 1 !important;

  margin-inline: auto !important;
  padding: 0 !important;

  overflow: visible !important;

  background: transparent !important;

  border: 0 !important;
  border-radius: 0 !important;

  box-shadow: none !important;

  transform: none !important;
  perspective: none !important;
}


/* ------------------------------------------------------------
   02. ORIGINAL LOGO — RESTORE ORIGINAL LARGE DIMENSIONS
   ------------------------------------------------------------ */

#publicAbout .fg-about-logo-3d .fg-geo-main-logo {
  position: relative !important;

  display: block !important;

  width: 100% !important;
  max-width: 320px !important;

  height: auto !important;
  max-height: none !important;

  margin: 0 auto !important;
  padding: 0 !important;

  object-fit: contain !important;
  object-position: center !important;

  opacity: 1 !important;
  visibility: visible !important;

  background: transparent !important;

  border: 0 !important;
  border-radius: 0 !important;

  box-shadow: none !important;

  /* Absolutely front-facing. */
  transform: none !important;
  rotate: none !important;
  animation: none !important;

  /*
   * Layered alpha-based shadows create the appearance
   * of thickness directly on the original logo silhouette.
   * No background plate or extra object is added.
   */
  filter:
    drop-shadow(-1px -1px 0 rgba(255, 255, 255, .38))
    drop-shadow(0 1px 0 rgba(69, 191, 195, .72))
    drop-shadow(0 3px 0 rgba(8, 117, 151, .58))
    drop-shadow(0 5px 0 rgba(5, 67, 105, .34))
    drop-shadow(0 9px 12px rgba(6, 49, 82, .23))
    drop-shadow(0 2px 5px rgba(8, 126, 131, .12)) !important;

  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}


/* ------------------------------------------------------------
   03. REMOVE ANY REMAINING EMBLEM DECORATION
   ------------------------------------------------------------ */

#publicAbout .fg-about-logo-3d::before,
#publicAbout .fg-about-logo-3d::after {
  content: none !important;
  display: none !important;
}


/* ------------------------------------------------------------
   04. DARK THEME
   Preserve logo colors and improve depth contrast.
   ------------------------------------------------------------ */

html[data-theme="dark"] #publicAbout .fg-about-logo-3d {
  background: transparent !important;
}

html[data-theme="dark"] #publicAbout .fg-about-logo-3d .fg-geo-main-logo {
  opacity: 1 !important;

  filter:
    drop-shadow(-1px -1px 0 rgba(255, 255, 255, .32))
    drop-shadow(0 1px 0 rgba(76, 192, 197, .78))
    drop-shadow(0 3px 0 rgba(6, 105, 143, .65))
    drop-shadow(0 5px 0 rgba(2, 47, 80, .48))
    drop-shadow(0 10px 15px rgba(0, 0, 0, .34)) !important;
}


/* ------------------------------------------------------------
   05. TABLET
   ------------------------------------------------------------ */

@media (max-width: 991px) {

  #publicAbout .fg-about-logo-3d {
    width: 100% !important;
    max-width: 350px !important;
    margin-inline: auto !important;
  }

  #publicAbout .fg-about-logo-3d .fg-geo-main-logo {
    max-width: 280px !important;
  }
}


/* ------------------------------------------------------------
   06. MOBILE — RESTORE ORIGINAL MOBILE SIZE
   ------------------------------------------------------------ */

@media (max-width: 480px) {

  #publicAbout .fg-about-logo-3d {
    max-width: 320px !important;
  }

  #publicAbout .fg-about-logo-3d .fg-geo-main-logo {
    max-width: 240px !important;
  }
}

/* ============================================================
   FANAGAAM — ORIGINAL FLOATING 3D LOGO
   Original visual character restored
   Large / Clear / Front-facing / Transparent
   ============================================================ */


/* Main logo */

#publicAbout .fg-about-logo-3d .fg-geo-main-logo {
  position: relative !important;

  display: block !important;

  width: 100% !important;
  max-width: 320px !important;

  height: auto !important;
  max-height: none !important;

  margin: 0 auto !important;

  object-fit: contain !important;
  object-position: center !important;

  opacity: 1 !important;
  visibility: visible !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  /* Keep the logo straight and undistorted. */
  transform: none !important;
  rotate: none !important;

  /* Restore the original soft 3D depth. */
  filter:
    drop-shadow(0 20px 30px rgba(8, 126, 131, .15))
    drop-shadow(0 4px 10px rgba(20, 43, 59, .05)) !important;

  /* Original gentle floating motion. */
  animation: fg-about-original-float 5s ease-in-out infinite !important;

  will-change: translate;
}


/* Gentle vertical floating — no rotation or scaling */

@keyframes fg-about-original-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -12px;
  }
}


/* Original smaller size on tablet and mobile */

@media (max-width: 991px) {
  #publicAbout .fg-about-logo-3d .fg-geo-main-logo {
    max-width: 240px !important;
  }
}


/* Dark theme — preserve logo clarity */

html[data-theme="dark"] #publicAbout .fg-about-logo-3d .fg-geo-main-logo {
  opacity: 1 !important;

  filter:
    drop-shadow(0 20px 30px rgba(0, 0, 0, .25))
    drop-shadow(0 4px 10px rgba(8, 126, 131, .16)) !important;
}


/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  #publicAbout .fg-about-logo-3d .fg-geo-main-logo {
    animation: none !important;
    translate: 0 0;
    will-change: auto;
  }
}

/* ============================================================
   FANAGAAM — PROFESSIONAL PUBLIC FIXED HEADER
   Preserve original dimensions, grid and navigation appearance.
   Dynamic fixed state / Opaque backdrop / No layout jump
   ============================================================ */


/* ------------------------------------------------------------
   01. FLOW SPACER
   Keeps the original document height when header is fixed.
   ------------------------------------------------------------ */

#publicLanding > .fg-topbar-flow-spacer {
  display: block !important;

  width: 100% !important;

  height: 0;

  min-height: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  flex: 0 0 auto !important;

  visibility: hidden !important;

  pointer-events: none !important;
}


/* ------------------------------------------------------------
   02. FIXED HEADER STATE
   The original width and three-column grid are preserved.
   ------------------------------------------------------------ */

html body #publicLanding > header.fg-topbar.fg-topbar-is-fixed {

  position: fixed !important;

  top: 0 !important;

  inset-inline: 0 !important;

  width: min(1320px, 100%) !important;

  max-width: 100% !important;

  margin-inline: auto !important;

  box-sizing: border-box !important;

  z-index: 1200 !important;

  isolation: isolate !important;

  background: transparent !important;

  border-radius: 0 !important;

  transform: none !important;

}


/* ------------------------------------------------------------
   03. FULL-WIDTH OPAQUE BACKGROUND
   The backing spans the viewport while the header content
   retains its original centered width.
   ------------------------------------------------------------ */

/* ============================================================
   FANAGAAM — REFINED STICKY HEADER SHADOW
   Softer shadow / Same layout / Same fixed behavior
   ============================================================ */

html body #publicLanding > header.fg-topbar.fg-topbar-is-fixed::before {

  content: "" !important;

  position: absolute !important;

  inset-block: 0 !important;

  inset-inline: calc(
    (100% - 100vw) / 2 +
    var(--fg-public-scrollbar-compensation, 0px)
  ) !important;

  z-index: -1 !important;

  background: var(
    --bg-1,
    var(--bg-2, #F4F7F9)
  ) !important;

  border: 0 !important;

  border-bottom: 1px solid var(
    --line,
    #D7E3E8
  ) !important;

  box-shadow:
    0 7px 18px rgba(17, 53, 69, .055),
    0 1px 3px rgba(17, 53, 69, .025) !important;

  pointer-events: none !important;

}


/* ------------------------------------------------------------
   04. KEEP ORIGINAL HEADER CONTENT ABOVE THE BACKGROUND
   ------------------------------------------------------------ */

html body #publicLanding > header.fg-topbar.fg-topbar-is-fixed > * {

  position: relative;

  z-index: 1;

}


/* ------------------------------------------------------------
   05. NAVIGATION ANCHOR OFFSETS
   Keep headings visible below the measured fixed header.
   ------------------------------------------------------------ */

.fg-landing #publicPreview,
.fg-landing #publicMethod,
.fg-landing #publicCriteria,
.fg-landing #publicAbout,
.fg-landing #publicFaq {

  scroll-margin-top: var(
    --fg-public-header-scroll-offset,
    112px
  ) !important;

}


/* ------------------------------------------------------------
   06. DARK THEME BACKGROUND
   ------------------------------------------------------------ */

html[data-theme="dark"]
body #publicLanding > header.fg-topbar.fg-topbar-is-fixed::before {

  background: var(
    --bg-1,
    var(--bg-2, #101F2B)
  ) !important;

  border-bottom-color: var(
    --line,
    #334A58
  ) !important;

  box-shadow:
    0 7px 18px rgba(0, 0, 0, .25) !important;

}


/* ------------------------------------------------------------
   07. RESPONSIVE
   The existing mobile grid and navigation rules remain intact.
   The spacer height is measured dynamically by JavaScript.
   ------------------------------------------------------------ */

@media (max-width: 980px) {

  html body #publicLanding > header.fg-topbar.fg-topbar-is-fixed {

    width: 100% !important;

    max-width: 100% !important;

  }

}


/* ------------------------------------------------------------
   08. ACCESSIBILITY
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

  #publicLanding > header.fg-topbar.fg-topbar-is-fixed,
  #publicLanding > header.fg-topbar.fg-topbar-is-fixed::before {

    transition: none !important;

  }

}

/* ============================================================
   FANAGAAM — PREMIUM STICKY HEADER VISUAL REFINEMENT
   Visual polish only. Preserve existing fixed-header behavior.
   Matte surface / restrained teal accent / refined interactions
   ============================================================ */


/* 01. Refined fixed header surface */

html body #publicLanding > header.fg-topbar.fg-topbar-is-fixed {
  transition:
    box-shadow .28s ease,
    border-color .28s ease !important;
}


/* 02. Premium opaque background and layered shadow */

html body #publicLanding > header.fg-topbar.fg-topbar-is-fixed::before {
  background: var(--bg-2, #F6F9FA) !important;

  border-bottom: 1px solid
    color-mix(in srgb, var(--brand-primary) 17%, var(--line)) !important;

  box-shadow:
    0 12px 28px rgba(17, 53, 69, .075),
    0 3px 9px rgba(8, 126, 131, .045),
    inset 0 1px 0 rgba(255, 255, 255, .85) !important;

  transition:
    box-shadow .28s ease,
    background-color .28s ease !important;
}


/* 03. Fine brand-colored bottom signature */

html body #publicLanding > header.fg-topbar.fg-topbar-is-fixed::after {
  content: "" !important;

  position: absolute !important;

  inset-inline: 0 !important;
  bottom: 0 !important;

  height: 2px !important;

  z-index: 5 !important;

  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--brand-primary) 20%, transparent) 12%,
    var(--brand-primary) 50%,
    color-mix(in srgb, var(--brand-primary) 20%, transparent) 88%,
    transparent 100%
  ) !important;

  opacity: .8 !important;

  pointer-events: none !important;
}


/* 04. Refined navigation pill */

html body #publicLanding
.fg-topbar-is-fixed .fg-section-nav {
  background: var(--bg-2, #FFFFFF) !important;

  border-color:
    color-mix(in srgb, var(--brand-primary) 23%, var(--line)) !important;

  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  box-shadow:
    0 5px 15px rgba(20, 43, 59, .055),
    inset 0 1px 0 rgba(255, 255, 255, .95) !important;

  transition:
    border-color .22s ease,
    box-shadow .22s ease !important;
}


/* 05. Smooth navigation interaction */

html body #publicLanding
.fg-topbar-is-fixed .fg-section-nav a {
  transition:
    color .2s ease,
    background-color .2s ease,
    box-shadow .2s ease !important;
}

html body #publicLanding
.fg-topbar-is-fixed .fg-section-nav a:hover {
  background: color-mix(
    in srgb,
    var(--brand-primary) 9%,
    var(--bg-2)
  ) !important;

  color: var(--brand-primary) !important;
}


/* 06. Refined action controls without changing dimensions */

html body #publicLanding
.fg-topbar-is-fixed .public-icon-btn,
html body #publicLanding
.fg-topbar-is-fixed .public-login-btn {
  transition:
    box-shadow .22s ease,
    border-color .22s ease,
    background-color .22s ease,
    transform .22s ease !important;
}


/* Gentle hover — desktop pointing devices only */

@media (hover: hover) and (pointer: fine) {

  html body #publicLanding
  .fg-topbar-is-fixed .public-icon-btn:hover {

    transform: translateY(-2px) !important;

    box-shadow:
      0 7px 15px rgba(8, 126, 131, .12) !important;
  }

  html body #publicLanding
  .fg-topbar-is-fixed .public-login-btn:hover {

    transform: translateY(-2px) !important;

    box-shadow:
      0 9px 19px rgba(8, 126, 131, .23) !important;
  }

}


/* 07. Keyboard accessibility */

html body #publicLanding
.fg-topbar-is-fixed .fg-section-nav a:focus-visible,
html body #publicLanding
.fg-topbar-is-fixed .public-icon-btn:focus-visible,
html body #publicLanding
.fg-topbar-is-fixed .public-login-btn:focus-visible {

  outline: 2px solid var(--brand-primary) !important;

  outline-offset: 3px !important;
}


/* 08. Dark theme */

html[data-theme="dark"] body #publicLanding
> header.fg-topbar.fg-topbar-is-fixed::before {

  background: var(--bg-2, #102330) !important;

  border-bottom-color:
    color-mix(in srgb, var(--brand-primary) 28%, var(--line)) !important;

  box-shadow:
    0 12px 28px rgba(0, 0, 0, .27),
    inset 0 1px 0 rgba(255, 255, 255, .035) !important;
}

html[data-theme="dark"] body #publicLanding
.fg-topbar-is-fixed .fg-section-nav {

  background: var(--bg-2, #102330) !important;

  box-shadow:
    0 5px 15px rgba(0, 0, 0, .2) !important;
}


/* 09. Reduced motion */

@media (prefers-reduced-motion: reduce) {

  html body #publicLanding
  > header.fg-topbar.fg-topbar-is-fixed,
  html body #publicLanding
  > header.fg-topbar.fg-topbar-is-fixed::before,
  html body #publicLanding
  .fg-topbar-is-fixed .fg-section-nav,
  html body #publicLanding
  .fg-topbar-is-fixed .fg-section-nav a {

    transition: none !important;
  }

}

/* ============================================================
   FANAGAAM — CENTERED REGISTRATION EXPERIENCE
   Desktop centered / No normal page scrolling
   3-column form / Tablet 2-column / Mobile 1-column
   Opaque matte surfaces / Persian + English
   ============================================================ */


/* ------------------------------------------------------------
   01. CENTER THE REGISTRATION SCREEN ONLY
   The login screen remains unchanged.
   ------------------------------------------------------------ */

#authScreen.auth-screen.fg-registration-active {
  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;

  min-height: 0 !important;

  padding: 20px !important;

  box-sizing: border-box !important;

  overflow: hidden !important;
  overflow-y: hidden !important;
  overflow-x: hidden !important;

  overscroll-behavior: none !important;
}


/* ------------------------------------------------------------
   02. REGISTRATION CARD — FULL CENTERED LAYOUT
   ------------------------------------------------------------ */

#authScreen #registerCard.fg-register-card {
  width: min(100%, 980px) !important;
  max-width: 980px !important;

  max-height: none !important;
  min-height: 0 !important;

  margin: auto !important;

  padding: 22px 32px 20px !important;

  box-sizing: border-box !important;

  display: flex !important;
  flex-direction: column !important;

  flex-shrink: 0 !important;

  overflow: visible !important;

  background: #FFFFFF !important;

  border: 1px solid #DCE5EB !important;
  border-radius: 20px !important;

  box-shadow:
    0 18px 46px rgba(15, 35, 52, .105),
    0 3px 10px rgba(15, 35, 52, .035) !important;
}


/* Dark theme */

html[data-theme="dark"]
#authScreen #registerCard.fg-register-card {
  background: #172A3A !important;

  border-color: rgba(148, 163, 184, .22) !important;

  box-shadow:
    0 18px 46px rgba(0, 0, 0, .30),
    0 3px 10px rgba(0, 0, 0, .14) !important;
}


/* ------------------------------------------------------------
   03. COMPACT BUT CLEAR REGISTRATION HEADER
   ------------------------------------------------------------ */

#registerCard .fg-register-header {
  margin-bottom: 14px !important;
}

#registerCard .auth-logo {
  width: 46px !important;
  height: 46px !important;

  margin: 0 auto 7px !important;
}

#registerCard .auth-title {
  font-size: 21px !important;
  line-height: 1.4 !important;

  margin: 0 0 4px !important;
}

#registerCard .auth-subtitle {
  max-width: 560px !important;

  font-size: 12px !important;
  line-height: 1.65 !important;

  margin: 0 auto !important;
}


/* ------------------------------------------------------------
   04. THREE-COLUMN DESKTOP GRID
   ------------------------------------------------------------ */

#registerCard .fg-register-grid {
  display: grid !important;

  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;

  align-items: end !important;

  gap: 10px 16px !important;

  width: 100% !important;
  min-width: 0 !important;

  box-sizing: border-box !important;
}

#registerCard .fg-register-field {
  display: flex !important;
  flex-direction: column !important;

  min-width: 0 !important;

  gap: 5px !important;
}


/* The role field gets two columns because its content is longer. */

#registerCard .fg-register-field--wide {
  grid-column: span 2 !important;
}


/* ------------------------------------------------------------
   05. FIELD LABELS AND INPUTS
   ------------------------------------------------------------ */

#registerCard .auth-label {
  display: block !important;

  width: 100% !important;

  margin: 0 !important;

  font-size: 11.5px !important;
  line-height: 1.55 !important;

  font-weight: 800 !important;

  color: var(--text-1) !important;
}

#registerCard .auth-input {
  width: 100% !important;
  min-width: 0 !important;

  min-height: 43px !important;

  box-sizing: border-box !important;

  padding-top: 9px !important;
  padding-bottom: 9px !important;

  font-size: 12.5px !important;

  border-radius: 11px !important;
}

#registerCard .auth-input::placeholder {
  font-size: 11.5px !important;
}


/* Email remains LTR in both interface languages. */

#registerCard #registerEmail {
  direction: ltr !important;
  text-align: left !important;

  font-family: Inter, "Segoe UI", Arial, sans-serif !important;

  font-variant-numeric: lining-nums tabular-nums !important;
}


/* Location follows the selected interface language. */

html[lang="fa"] #registerCard #registerLocation {
  direction: rtl !important;
  text-align: right !important;
}

html[lang="en"] #registerCard #registerLocation {
  direction: ltr !important;
  text-align: left !important;
}


/* ------------------------------------------------------------
   06. PASSWORD INPUTS
   ------------------------------------------------------------ */

#registerCard #registerPassword,
#registerCard #registerConfirmPassword {
  min-height: 43px !important;

  direction: ltr !important;
  text-align: left !important;

  font-family: Inter, "Segoe UI", Arial, sans-serif !important;

  font-variant-numeric: lining-nums tabular-nums !important;
}

#registerCard .fg-register-password-hint {
  margin-top: 2px !important;

  font-size: 10px !important;
  line-height: 1.5 !important;
}


/* ------------------------------------------------------------
   07. PROFILE PHOTO — COMPACT OPTIONAL CONTROL
   ------------------------------------------------------------ */

#registerCard .fg-register-avatar-field {
  grid-column: auto !important;
}

#registerCard .fg-register-avatar-control {
  display: flex !important;

  align-items: center !important;

  gap: 10px !important;

  width: 100% !important;
  min-width: 0 !important;

  min-height: 46px !important;

  padding: 4px 9px !important;

  box-sizing: border-box !important;

  border: 1px solid var(--line-bright) !important;
  border-radius: 11px !important;

  background: var(--bg-3) !important;
}

#registerCard .fg-register-avatar-preview {
  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  flex: 0 0 36px !important;

  width: 36px !important;
  height: 36px !important;

  overflow: hidden !important;

  border: 1px solid var(--line) !important;
  border-radius: 50% !important;

  background: var(--bg-2) !important;

  color: var(--brand-primary) !important;

  font-size: 20px !important;
  font-weight: 700 !important;
}

#registerCard .fg-register-avatar-preview img,
#registerCard .fg-register-avatar-image {
  display: block !important;

  width: 100% !important;
  height: 100% !important;

  object-fit: cover !important;
  object-position: center !important;

  border-radius: 50% !important;
}

#registerCard .fg-register-avatar-content {
  display: flex !important;

  flex: 1 1 auto !important;

  min-width: 0 !important;

  flex-wrap: wrap !important;

  align-items: center !important;

  gap: 5px 9px !important;
}

#registerCard .fg-register-avatar-button {
  display: inline-flex !important;

  align-items: center !important;
  justify-content: center !important;

  min-height: 31px !important;

  padding: 5px 11px !important;

  border: 1px solid color-mix(
    in srgb,
    var(--brand-primary) 35%,
    var(--line)
  ) !important;

  border-radius: 8px !important;

  background: var(--bg-2) !important;

  color: var(--brand-primary) !important;

  font-size: 10.5px !important;
  font-weight: 800 !important;

  cursor: pointer !important;

  transition:
    background-color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease !important;
}

#registerCard .fg-register-avatar-button:hover {
  background: color-mix(
    in srgb,
    var(--brand-primary) 7%,
    var(--bg-2)
  ) !important;

  border-color: var(--brand-primary) !important;
}

#registerCard .fg-register-avatar-hint {
  display: block !important;

  min-width: 0 !important;

  color: var(--text-2) !important;

  font-size: 9.5px !important;
  line-height: 1.5 !important;
}


/* ------------------------------------------------------------
   08. SUBMIT AND FOOTER
   ------------------------------------------------------------ */

#registerCard .fg-register-submit {
  width: 100% !important;

  min-height: 46px !important;

  margin-top: 13px !important;

  padding: 10px 20px !important;

  font-size: 13.5px !important;
}

#registerCard .fg-register-footer {
  margin-top: 9px !important;
  padding-top: 0 !important;
}

#registerCard .fg-register-footer a {
  font-size: 11.5px !important;
}


/* The demo notice is removed from the HTML.
   This is an additional safeguard against accidental reappearance. */

#registerCard .fg-register-demo-note {
  display: none !important;
}


/* ------------------------------------------------------------
   09. TABLET — TWO COLUMNS
   ------------------------------------------------------------ */

@media screen and (max-width: 980px) and (min-width: 641px) {

  #authScreen.auth-screen.fg-registration-active {
    padding: 18px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  #authScreen #registerCard.fg-register-card {
    width: min(100%, 820px) !important;
    max-width: 820px !important;

    padding: 20px 24px !important;
  }

  #registerCard .fg-register-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

    gap: 11px 14px !important;
  }

  #registerCard .fg-register-field--wide,
  #registerCard .fg-register-avatar-field {
    grid-column: 1 / -1 !important;
  }

}


/* ------------------------------------------------------------
   10. MOBILE — ONE COLUMN
   Allow natural scrolling when the viewport is too short.
   This protects readability instead of shrinking the fields.
   ------------------------------------------------------------ */

@media screen and (max-width: 640px) {

  #authScreen.auth-screen.fg-registration-active {
    align-items: flex-start !important;
    justify-content: center !important;

    padding: 76px 14px 20px !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    box-sizing: border-box !important;

    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
  }

  #authScreen #registerCard.fg-register-card {
    width: 100% !important;
    max-width: 520px !important;

    max-height: none !important;

    margin: 0 auto !important;

    padding: 21px 18px 19px !important;

    overflow: visible !important;

    border-radius: 17px !important;
  }

  #registerCard .fg-register-header {
    margin-bottom: 16px !important;
  }

  #registerCard .fg-register-grid {
    grid-template-columns: minmax(0, 1fr) !important;

    gap: 12px !important;
  }

  #registerCard .fg-register-field--wide,
  #registerCard .fg-register-avatar-field {
    grid-column: auto !important;
  }

  #registerCard .auth-input {
    min-height: 45px !important;
  }

  #registerCard .fg-register-avatar-control {
    min-height: 50px !important;
  }

}


/* ------------------------------------------------------------
   11. SHORT DESKTOP VIEWPORTS
   Compact spacing before allowing any fallback scrolling.
   ------------------------------------------------------------ */

@media screen and (max-height: 680px) and (min-width: 641px) {

  #authScreen.auth-screen.fg-registration-active {
    padding: 12px !important;
  }

  #authScreen #registerCard.fg-register-card {
    padding: 15px 24px 14px !important;
  }

  #registerCard .fg-register-header {
    margin-bottom: 9px !important;
  }

  #registerCard .auth-logo {
    width: 38px !important;
    height: 38px !important;

    margin-bottom: 4px !important;
  }

  #registerCard .auth-title {
    font-size: 19px !important;
    margin-bottom: 2px !important;
  }

  #registerCard .auth-subtitle {
    font-size: 11px !important;
  }

  #registerCard .fg-register-grid {
    gap: 7px 12px !important;
  }

  #registerCard .auth-input {
    min-height: 39px !important;

    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  #registerCard .fg-register-submit {
    min-height: 41px !important;
    margin-top: 9px !important;
  }

  #registerCard .fg-register-footer {
    margin-top: 5px !important;
  }

}


/* ------------------------------------------------------------
   12. DARK THEME PHOTO CONTROL
   ------------------------------------------------------------ */

html[data-theme="dark"] #registerCard .fg-register-avatar-control {
  background: #20384A !important;
  border-color: #496271 !important;
}

html[data-theme="dark"] #registerCard .fg-register-avatar-preview {
  background: #172A3A !important;
  border-color: #496271 !important;
}

html[data-theme="dark"] #registerCard .fg-register-avatar-button {
  background: #172A3A !important;
  border-color: #527884 !important;
}

html[data-theme="dark"] #registerCard .fg-register-avatar-button:hover {
  background: #203F4C !important;
}


/* ------------------------------------------------------------
   13. REDUCED MOTION
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

  #registerCard .fg-register-avatar-button {
    transition: none !important;
  }

}
/* ============================================================
   FANAGAAM — AUTH VIEW STATE
   Only one authentication page may be visible at a time.
   ============================================================ */

/* Login view: hide registration card */
#authScreen[data-auth-view="login"] #registerCard,

/* Registration view: hide login card */
#authScreen[data-auth-view="register"] #authLoginCard {
  display: none !important;
}

/* Login view: show login card */
#authScreen[data-auth-view="login"] #authLoginCard,

/* Registration view: show registration card */
#authScreen[data-auth-view="register"] #registerCard {
  display: flex !important;
}
/* ============================================================
   FANAGAAM — LOGIN CARD OPTICAL VERTICAL ALIGNMENT
   Move login card slightly upward without affecting registration.
   ============================================================ */

#authScreen[data-auth-view="login"] #authLoginCard {
  transform: translateY(-12px) !important;
}
/* ============================================================
   FANAGAAM — REGISTRATION TYPOGRAPHY
   Persian: Vazirmatn
   English: Inter
   ============================================================ */

/* Persian registration interface */
html[lang="fa"] #registerCard,
html[lang="fa"] #registerCard * {
  font-family: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif !important;
  font-synthesis: none !important;
}

/* Preserve Latin values in credential fields */
html[lang="fa"] #registerCard #registerUsername,
html[lang="fa"] #registerCard #registerPhone,
html[lang="fa"] #registerCard #registerEmail,
html[lang="fa"] #registerCard #registerPassword,
html[lang="fa"] #registerCard #registerConfirmPassword {
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

/* Persian placeholders must still use Vazirmatn */
html[lang="fa"] #registerCard .auth-input::placeholder {
  font-family: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif !important;
}

/* Email placeholder is English */
html[lang="fa"] #registerCard #registerEmail::placeholder {
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

/* English registration interface */
html[lang="en"] #registerCard,
html[lang="en"] #registerCard * {
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-synthesis: none !important;
}
/* ============================================================
   FANAGAAM — LARGE SQUARE PROFILE PHOTO UPLOAD
   ============================================================ */

#registerCard .fg-register-avatar-field {
  align-items: flex-start !important;
}

#registerCard .fg-register-avatar-control {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;

  flex: 0 0 160px !important;
  width: 160px !important;
  height: 160px !important;
  min-height: 160px !important;

  padding: 10px !important;
  gap: 7px !important;

  box-sizing: border-box !important;
  border-radius: 14px !important;
}

/* Larger image preview */
#registerCard .fg-register-avatar-preview {
  display: flex !important;
  flex: 0 0 64px !important;

  width: 64px !important;
  height: 64px !important;

  align-items: center !important;
  justify-content: center !important;

  overflow: hidden !important;
  border-radius: 12px !important;
}

#registerCard .fg-register-avatar-preview img,
#registerCard .fg-register-avatar-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 11px !important;
}

#registerCard .fg-register-avatar-content {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;

  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  min-width: 0 !important;
  gap: 4px !important;
}

#registerCard .fg-register-avatar-button {
  min-height: 30px !important;
  padding: 4px 10px !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}

#registerCard .fg-register-avatar-hint {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;

  font-size: 9px !important;
  line-height: 1.4 !important;
  text-align: center !important;
  overflow-wrap: anywhere !important;
}

/* Tablet */
@media screen and (max-width: 980px) {
  #registerCard .fg-register-avatar-field {
    align-items: center !important;
  }
}

/* Mobile */
@media screen and (max-width: 640px) {
  #registerCard .fg-register-avatar-control {
    flex-basis: 144px !important;
    width: 144px !important;
    height: 144px !important;
    min-height: 144px !important;
  }

  #registerCard .fg-register-avatar-preview {
    flex-basis: 58px !important;
    width: 58px !important;
    height: 58px !important;
  }
}
/* ============================================================
   FANAGAAM — PASSWORD INPUT TOP ALIGNMENT
   Align password and confirmation fields at the same top edge.
   ============================================================ */

#registerCard .fg-register-grid > .fg-register-password-field {
  align-self: start !important;
  margin-top: 0 !important;
}
/* ============================================================
   FANAGAAM — ORGANIZATIONAL ROLE TOP ALIGNMENT
   Keep role field at the top of its grid row.
   ============================================================ */

#registerCard .fg-register-grid > .fg-register-field--wide {
  align-self: start !important;
  margin-top: 0 !important;
}
/* ============================================================
   FANAGAAM — PASSWORD FIELDS COMPACT GRID PLACEMENT
   Place both password fields beneath the role field,
   alongside the square avatar tile.
   Desktop only.
   ============================================================ */

@media screen and (min-width: 981px) {

  /* Avatar occupies two grid rows */
  #registerCard .fg-register-grid > .fg-register-avatar-field {
    grid-row: span 2 !important;
    align-self: start !important;
  }

  /* Role and password fields stay at the top of their grid areas */
  #registerCard .fg-register-grid > .fg-register-field--wide,
  #registerCard .fg-register-grid > .fg-register-password-field {
    align-self: start !important;
    margin-top: 0 !important;
  }

}

/* Tablet and mobile: preserve the original stacked layout */
@media screen and (max-width: 980px) {

  #registerCard .fg-register-grid > .fg-register-avatar-field {
    grid-row: auto !important;
  }

}
/* FANAGAAM — CENTER AVATAR TILE IN ITS EXISTING GRID SPACE */

@media screen and (min-width: 981px) {
  #registerCard .fg-register-avatar-field > .fg-register-avatar-control {
    align-self: center !important;
    margin-inline: auto !important;
  }
}
/* FANAGAAM — CENTER PROFILE PHOTO LABEL */

#registerCard .fg-register-avatar-field > .auth-label {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  align-self: stretch !important;
}
/* ============================================================
   FANAGAAM — PREMIUM PROFILE PHOTO PLACEHOLDER ICON
   Camera with sparkle
   ============================================================ */

#registerCard .fg-register-avatar-placeholder-icon {
  display: block !important;

  width: 38px !important;
  height: 38px !important;

  flex: 0 0 auto !important;

  color: var(--brand-primary) !important;

  overflow: visible !important;
  transition: transform .22s ease, color .22s ease !important;
}

#registerCard .fg-register-avatar-preview:hover
.fg-register-avatar-placeholder-icon {
  transform: scale(1.08) !important;
  color: var(--brand-accent) !important;
}
/* FANAGAAM — CENTER ENGLISH PROFILE PHOTO LABEL */

html[lang="en"] #registerCard .fg-register-avatar-field > #registerAvatarLabel {
  display: block !important;
  width: 100% !important;
  align-self: stretch !important;
  text-align: center !important;
}
/* ============================================================
   FANAGAAM — DISABLED PASSWORD CONFIRMATION
   ============================================================ */

#registerCard #registerConfirmPassword:disabled {
  opacity: .58 !important;
  cursor: not-allowed !important;

  background: var(--bg-3) !important;
  border-color: var(--line) !important;
}

#registerCard .password-toggle-btn:disabled {
  opacity: .4 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
/* ============================================================
   FanaGaam — Scrollable Technology Type Field
   ============================================================ */

#npTechTypeScroll.form-input {
  display: flex;
  align-items: center;

  box-sizing: border-box;
  width: 100%;
  min-width: 0;

  overflow-x: auto;
  overflow-y: hidden;

  white-space: nowrap;
  text-overflow: clip;

  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
}

html[dir="ltr"] #npTechTypeScroll {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] #npTechTypeScroll {
  direction: rtl;
  text-align: right;
}

#npTechTypeScroll:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

#npTechTypeScroll::-webkit-scrollbar {
  height: 5px;
}

#npTechTypeScroll::-webkit-scrollbar-thumb {
  background: var(--text-1);
  border-radius: 10px;
}

#npTechTypeScroll::-webkit-scrollbar-track {
  background: transparent;
}
#registerCard .fg-register-avatar-hint {
  white-space: pre-line !important;
  text-align: center !important;
}
/* ============================================================
   FANAGAAM — FINAL PREMIUM MOBILE TECHNOLOGY CARDS
   Design: Rounded Premium + Turquoise Top Accent
   Scope: Responsive registered-technology library only
   ============================================================ */

@media screen and (max-width: 991px) {

  /* Card separation */
  #view-home .dashboard-library-table tbody {
    gap: 16px !important;
  }

  /* Main card surface */
  #view-home .dashboard-library-table tbody tr {
    position: relative !important;
    isolation: isolate !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;

    width: 100% !important;
    min-width: 0 !important;

    padding: 8px 15px 10px !important;

    border: 1px solid #D4E1E5 !important;
    border-radius: 21px !important;

    background: linear-gradient(
      180deg,
      #FFFFFF 0%,
      #FBFDFD 55%,
      #F6FAFB 100%
    ) !important;

    box-shadow:
      0 3px 0 #E1EAED,
      0 12px 25px -17px rgba(24, 69, 84, .25),
      inset 0 1px 0 rgba(255, 255, 255, .98),
      inset 0 -1px 0 rgba(82, 126, 141, .045) !important;

    box-sizing: border-box !important;
    overflow: hidden !important;

    transform: none !important;

    transition:
      border-color .22s ease,
      box-shadow .22s ease !important;
  }

  /* Full-width turquoise accent on every technology card */
  #view-home .dashboard-library-table tbody tr:not(:has(> td[colspan]))::before {
    content: "" !important;

    position: absolute !important;

    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    display: block !important;

    width: auto !important;
    height: 5px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 20px 20px 0 0 !important;

    background: linear-gradient(
      90deg,
      #087E83 0%,
      #20A8A5 52%,
      #69D2C9 100%
    ) !important;

    pointer-events: none !important;
    z-index: 2 !important;
  }

  /* Vertical information layout */
  #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty) {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) !important;

    align-items: center !important;
    justify-items: stretch !important;

    gap: 5px !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 12px 5px !important;

    box-sizing: border-box !important;

    border: 0 !important;
    border-bottom: 1px solid #E7EEF0 !important;

    border-radius: 0 !important;
    background: transparent !important;

    color: #526C78 !important;

    text-align: center !important;
    white-space: normal !important;

    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Field labels */
  #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty)::before {
    display: block !important;

    width: fit-content !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 1px 0 !important;

    justify-self: start !important;

    color: #788D96 !important;

    font-size: 10.5px !important;
    font-weight: 850 !important;
    line-height: 1.8 !important;

    text-align: start !important;
    white-space: normal !important;

    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Row number */
  #view-home .dashboard-library-table tbody td.dashboard-library-row-number {
    padding-top: 14px !important;
    padding-bottom: 11px !important;

    color: #087E83 !important;

    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.8 !important;

    font-variant-numeric: tabular-nums !important;
  }

  /* Technology title — carefully emphasized */
  #view-home .dashboard-library-table tbody td:nth-child(2) {
    margin: 5px 0 !important;
    padding: 13px 11px !important;

    border: 1px solid #E0ECEE !important;
    border-radius: 13px !important;

    background: linear-gradient(
      180deg,
      #FAFDFD 0%,
      #F1F8F8 100%
    ) !important;

    box-shadow:
      inset 0 1px 0 #FFFFFF,
      0 2px 5px rgba(24, 69, 84, .035) !important;
  }

  #view-home .dashboard-library-table tbody td:nth-child(2)::before {
    color: #087E83 !important;
    font-weight: 900 !important;
  }

  #view-home .dashboard-library-table tbody td .dashboard-library-open-name {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    justify-self: center !important;

    padding: 0 !important;
    margin: 0 !important;

    color: #203E4B !important;

    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.9 !important;

    text-align: center !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Responsible person */
  #view-home .dashboard-library-table tbody td:nth-child(3) {
    color: #526D79 !important;

    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.9 !important;
  }

  /* Start date */
  #view-home .dashboard-library-table tbody td.dashboard-library-date {
    color: #607984 !important;

    font-size: 12px !important;
    font-weight: 750 !important;

    font-variant-numeric: tabular-nums !important;
  }

  /* Description */
  #view-home .dashboard-library-table tbody td.dashboard-library-description-cell > span {
    display: -webkit-box !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    justify-self: center !important;

    color: #657D87 !important;

    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.9 !important;

    text-align: center !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Status badge */
  #view-home .dashboard-library-table tbody td .dashboard-library-status {
    justify-self: center !important;

    width: fit-content !important;
    max-width: 100% !important;

    padding: 7px 13px !important;

    border-radius: 999px !important;

    font-size: 10.5px !important;
    font-weight: 850 !important;
    line-height: 1.7 !important;

    text-align: center !important;
  }

  /* Progress area */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) auto !important;

    align-items: center !important;
    justify-items: center !important;

    column-gap: 12px !important;
    row-gap: 7px !important;

    white-space: normal !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell::before {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;

    justify-self: start !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > .dashboard-library-progress-track {
    grid-column: 1 !important;
    grid-row: 2 !important;

    justify-self: center !important;

    width: 88px !important;
    max-width: 100% !important;

    height: 8px !important;

    margin: 0 !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > strong {
    grid-column: 2 !important;
    grid-row: 2 !important;

    justify-self: center !important;

    color: #087E83 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    white-space: nowrap !important;
  }

  /* Action controls */
  #view-home .dashboard-library-table tbody td .dashboard-library-actions {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    flex-wrap: wrap !important;
    gap: 11px !important;

    width: 100% !important;
  }

  #view-home .dashboard-library-table tbody td .dashboard-library-actions button {
    width: 38px !important;
    height: 38px !important;

    min-width: 38px !important;
    min-height: 38px !important;

    border-radius: 11px !important;

    box-shadow:
      0 2px 0 #DCE7EA,
      0 4px 9px rgba(20, 60, 75, .085),
      inset 0 1px 0 #FFFFFF !important;
  }

  /* Final row: clean card ending */
  #view-home .dashboard-library-table tbody td:last-child {
    border-bottom: 0 !important;

    padding-bottom: 11px !important;
  }

  /* Empty state */
  #view-home .dashboard-library-table tbody td.dashboard-library-empty {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 120px !important;

    padding: 20px 16px !important;

    text-align: center !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-empty::before {
    content: none !important;
    display: none !important;
  }
}

/* ============================================================
   DARK THEME — PREMIUM MATTE MOBILE CARDS
   ============================================================ */

@media screen and (max-width: 991px) {

  html[data-theme="dark"] #view-home .dashboard-library-table tbody tr {
    border-color: #3B5965 !important;

    background: linear-gradient(
      180deg,
      #203B48 0%,
      #1B3440 55%,
      #152C37 100%
    ) !important;

    box-shadow:
      0 3px 0 #102530,
      0 12px 25px -17px rgba(0, 0, 0, .45),
      inset 0 1px 0 rgba(255, 255, 255, .07),
      inset 0 -1px 0 rgba(0, 0, 0, .10) !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty) {
    border-bottom-color: #304B57 !important;

    background: transparent !important;
    color: #D5E3E8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty)::before {
    color: #A5BBC4 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:nth-child(2) {
    border-color: #355A60 !important;

    background: linear-gradient(
      180deg,
      #24474E 0%,
      #1D3D45 100%
    ) !important;

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .06),
      0 2px 5px rgba(0, 0, 0, .13) !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:nth-child(2)::before {
    color: #75D0C8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td .dashboard-library-open-name {
    color: #E5F0F3 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:nth-child(3),
  html[data-theme="dark"] #view-home .dashboard-library-table tbody td.dashboard-library-date,
  html[data-theme="dark"] #view-home .dashboard-library-table tbody td.dashboard-library-description-cell > span {
    color: #C0D1D8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > strong {
    color: #75D0C8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td .dashboard-library-actions button {
    border-color: #496572 !important;

    background: linear-gradient(
      180deg,
      #294653 0%,
      #203A46 100%
    ) !important;

    box-shadow:
      0 2px 0 #172F3A,
      0 4px 9px rgba(0, 0, 0, .25),
      inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  }
}

/* Fine-pointer hover only — no movement on touch screens */
@media screen and (max-width: 991px) and (hover: hover) and (pointer: fine) {

  #view-home .dashboard-library-table tbody tr:hover {
    border-color: #B5D5D7 !important;

    box-shadow:
      0 3px 0 #E1EAED,
      0 16px 28px -17px rgba(8, 126, 131, .23),
      inset 0 1px 0 #FFFFFF !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody tr:hover {
    border-color: #52777D !important;

    box-shadow:
      0 3px 0 #102530,
      0 16px 28px -17px rgba(0, 0, 0, .42),
      inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  }
}

/* Accessibility — reduced motion */
@media (prefers-reduced-motion: reduce) {
  #view-home .dashboard-library-table tbody tr {
    transition: none !important;
  }
}
#registerCard .fg-register-avatar-hint {
  white-space: pre-line !important;
  text-align: center !important;
}

/* FANAGAAM MOBILE RTL DASHBOARD VERSION POSITION */
@media (max-width: 640px) {
  html[dir="rtl"] #view-home .app-version-footer {
    margin-top: 16px !important;
  }
}
/* ============================================================
   FANAGAAM — RESPONSIVE TECHNOLOGY LIBRARY TABLE FIX
   Stable two-column field/value layout for Persian and English.
   ============================================================ */

@media screen and (max-width: 991px) {

  /* Each table cell uses a dedicated label and value column. */
  #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty) {
    display: grid !important;

    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr) !important;

    align-items: start !important;
    justify-content: stretch !important;

    column-gap: 12px !important;
    row-gap: 4px !important;

    width: 100% !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    text-align: start !important;
    white-space: normal !important;

    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Field labels: first column, respecting RTL and LTR direction. */
  #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty)::before {
    display: block !important;

    grid-column: 1 !important;
    grid-row: 1 !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    flex: none !important;

    text-align: start !important;
    white-space: normal !important;

    overflow-wrap: normal !important;
    word-break: normal !important;

    line-height: 1.8 !important;
  }

  /* Direct value elements: second column with unrestricted usable width. */
  #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty) > * {
    grid-column: 2 !important;

    min-width: 0 !important;
    max-width: 100% !important;

    justify-self: start !important;

    box-sizing: border-box !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Technology title */
  #view-home .dashboard-library-table tbody td .dashboard-library-open-name {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    text-align: start !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;

    line-height: 1.8 !important;
  }

  /* Description */
  #view-home .dashboard-library-table tbody td.dashboard-library-description-cell > span {
    display: -webkit-box !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;

    text-align: start !important;
  }

  /* Status badge */
  #view-home .dashboard-library-table tbody td .dashboard-library-status {
    width: fit-content !important;
    max-width: 100% !important;

    justify-self: start !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;

    text-align: start !important;
  }

  /* Progress: keep the progress bar and percentage on one line. */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell {
    grid-template-columns: minmax(92px, 34%) minmax(42px, 1fr) auto !important;

    align-items: center !important;
    white-space: normal !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell::before {
    grid-column: 1 !important;
    grid-row: 1 !important;

    align-self: center !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > .dashboard-library-progress-track {
    grid-column: 2 !important;
    grid-row: 1 !important;

    width: 48px !important;
    max-width: 100% !important;

    margin-inline: 0 !important;
    justify-self: start !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > strong {
    grid-column: 3 !important;
    grid-row: 1 !important;

    justify-self: start !important;

    white-space: nowrap !important;
  }

  /* Action buttons */
  #view-home .dashboard-library-table tbody td .dashboard-library-actions {
    width: 100% !important;
    max-width: 100% !important;

    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  /* Empty table state: do not show a field label. */
  #view-home .dashboard-library-table tbody td.dashboard-library-empty {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    text-align: center !important;
    white-space: normal !important;

    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-empty::before {
    content: none !important;
    display: none !important;
  }
}
/* ============================================================
   FANAGAAM — CENTER EMPTY TECHNOLOGY LIBRARY MESSAGE
   ============================================================ */

@media screen and (max-width: 991px) {

  #view-home .dashboard-library-table tbody td.dashboard-library-empty {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-width: 0 !important;
    min-height: 120px !important;

    box-sizing: border-box !important;

    padding: 20px 16px !important;
    margin: 0 !important;

    text-align: center !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-empty::before {
    content: none !important;
    display: none !important;
  }
}
/* ============================================================
   FANAGAAM — PREMIUM MOBILE TECHNOLOGY CARDS
   Desktop-inspired layered matte surfaces.
   Preserve vertical information layout in RTL and LTR.
   ============================================================ */

@media screen and (max-width: 991px) {

  /* Space between technology cards */
  #view-home .dashboard-library-table tbody {
    gap: 15px !important;
  }

  /* Individual technology card */
  #view-home .dashboard-library-table tbody tr {
    position: relative !important;
    isolation: isolate !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;

    width: 100% !important;
    min-width: 0 !important;

    padding: 13px 14px 10px !important;

    border: 1px solid #C7D9DE !important;
    border-radius: 18px !important;

    background: linear-gradient(
      180deg,
      #FFFFFF 0%,
      #FAFCFD 48%,
      #F3F8FA 100%
    ) !important;

    box-shadow:
      0 3px 0 #E0E9EC,
      0 12px 24px -17px rgba(24, 69, 84, .28),
      inset 0 1px 0 rgba(255, 255, 255, .98),
      inset 0 -1px 0 rgba(82, 126, 141, .07) !important;

    transform: none !important;
    transition:
      box-shadow .22s ease,
      border-color .22s ease !important;
  }

  /* Subtle raised turquoise accent */
  #view-home .dashboard-library-table tbody tr::before {
    content: "" !important;

    position: absolute !important;

    inset-block-start: 0 !important;
    inset-inline-start: 18px !important;

    width: 58px !important;
    height: 3px !important;

    border-radius: 0 0 5px 5px !important;

    background: linear-gradient(
      90deg,
      #087E83 0%,
      #55C5BF 100%
    ) !important;

    box-shadow:
      0 1px 3px rgba(8, 126, 131, .20) !important;

    pointer-events: none !important;
  }

  /* Each field remains vertically stacked inside the card */
  #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;

    align-items: center !important;
    justify-items: stretch !important;

    gap: 6px !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 12px 5px !important;

    box-sizing: border-box !important;

    border: 0 !important;
    border-bottom: 1px solid #E5EDF0 !important;

    border-radius: 0 !important;

    background: transparent !important;

    color: #405C69 !important;

    text-align: center !important;
    white-space: normal !important;

    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Compact, refined field labels */
  #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty)::before {
    display: block !important;

    width: fit-content !important;
    max-width: 100% !important;

    justify-self: start !important;
    align-self: center !important;

    flex: none !important;

    padding: 2px 0 !important;

    color: #718792 !important;

    font-size: 10.5px !important;
    font-weight: 850 !important;
    line-height: 1.8 !important;

    text-align: start !important;
    white-space: normal !important;

    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Row number */
  #view-home .dashboard-library-table tbody td.dashboard-library-row-number {
    padding-top: 9px !important;
    padding-bottom: 11px !important;

    color: #087E83 !important;

    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.7 !important;

    font-variant-numeric: tabular-nums !important;
  }

  /* Technology title — primary visual element */
  #view-home .dashboard-library-table tbody td:nth-child(2) {
    margin: 5px 0 !important;
    padding: 12px 10px !important;

    border: 1px solid #DDEBED !important;
    border-radius: 11px !important;

    background: linear-gradient(
      180deg,
      #F8FCFC 0%,
      #EFF7F7 100%
    ) !important;

    box-shadow:
      inset 0 1px 0 #FFFFFF,
      0 1px 2px rgba(24, 69, 84, .035) !important;
  }

  #view-home .dashboard-library-table tbody td:nth-child(2)::before {
    color: #087E83 !important;
    font-weight: 900 !important;
  }

  #view-home .dashboard-library-table tbody td .dashboard-library-open-name {
    display: inline-block !important;

    width: 100% !important;
    max-width: 100% !important;

    justify-self: center !important;

    color: #213F4C !important;

    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.9 !important;

    text-align: center !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Responsible person and date */
  #view-home .dashboard-library-table tbody td:nth-child(3),
  #view-home .dashboard-library-table tbody td.dashboard-library-date {
    color: #526D79 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-date {
    font-variant-numeric: tabular-nums !important;
  }

  /* Description */
  #view-home .dashboard-library-table tbody td.dashboard-library-description-cell > span {
    display: -webkit-box !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    justify-self: center !important;

    color: #607985 !important;

    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.9 !important;

    text-align: center !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Status badge */
  #view-home .dashboard-library-table tbody td .dashboard-library-status {
    justify-self: center !important;

    width: fit-content !important;
    max-width: 100% !important;

    padding: 7px 13px !important;

    font-size: 10.5px !important;
    font-weight: 850 !important;
    line-height: 1.7 !important;

    text-align: center !important;
  }

  /* Progress: label above, bar and percentage below */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) auto !important;

    align-items: center !important;
    justify-items: center !important;

    column-gap: 12px !important;
    row-gap: 7px !important;

    white-space: normal !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell::before {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;

    justify-self: start !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > .dashboard-library-progress-track {
    grid-column: 1 !important;
    grid-row: 2 !important;

    justify-self: center !important;

    width: 82px !important;
    max-width: 100% !important;

    height: 8px !important;

    margin: 0 !important;
  }

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > strong {
    grid-column: 2 !important;
    grid-row: 2 !important;

    justify-self: center !important;

    color: #087E83 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    white-space: nowrap !important;
  }

  /* Action buttons */
  #view-home .dashboard-library-table tbody td .dashboard-library-actions {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    flex-wrap: wrap !important;
    gap: 10px !important;

    width: 100% !important;
  }

  #view-home .dashboard-library-table tbody td .dashboard-library-actions button {
    width: 38px !important;
    height: 38px !important;

    min-width: 38px !important;
    min-height: 38px !important;

    border-radius: 10px !important;

    box-shadow:
      0 2px 0 #D6E3E7,
      0 4px 9px rgba(20, 60, 75, .09),
      inset 0 1px 0 #FFFFFF !important;
  }

  /* Remove the final divider inside each card */
  #view-home .dashboard-library-table tbody td:last-child {
    border-bottom: 0 !important;

    padding-bottom: 9px !important;
  }

  /* Empty-state layout remains independent */
  #view-home .dashboard-library-table tbody td.dashboard-library-empty {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    min-height: 120px !important;

    padding: 20px 16px !important;

    text-align: center !important;
  }
}

/* Dark theme — same depth, opaque matte surfaces */
@media screen and (max-width: 991px) {

  html[data-theme="dark"] #view-home .dashboard-library-table tbody tr {
    border-color: #3B5965 !important;

    background: linear-gradient(
      180deg,
      #203B48 0%,
      #192F3B 55%,
      #142B37 100%
    ) !important;

    box-shadow:
      0 3px 0 #102530,
      0 12px 24px -17px rgba(0, 0, 0, .48),
      inset 0 1px 0 rgba(255, 255, 255, .07),
      inset 0 -1px 0 rgba(0, 0, 0, .10) !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty) {
    border-bottom-color: #304B57 !important;
    background: transparent !important;
    color: #D5E3E8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty)::before {
    color: #A5BBC4 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:nth-child(2) {
    border-color: #355A60 !important;

    background: linear-gradient(
      180deg,
      #24474E 0%,
      #1D3D45 100%
    ) !important;

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .06),
      0 1px 3px rgba(0, 0, 0, .12) !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:nth-child(2)::before {
    color: #75D0C8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td .dashboard-library-open-name {
    color: #E5F0F3 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td:nth-child(3),
  html[data-theme="dark"] #view-home .dashboard-library-table tbody td.dashboard-library-date,
  html[data-theme="dark"] #view-home .dashboard-library-table tbody td.dashboard-library-description-cell > span {
    color: #C0D1D8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > strong {
    color: #75D0C8 !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody td .dashboard-library-actions button {
    border-color: #496572 !important;

    background: linear-gradient(
      180deg,
      #294653 0%,
      #203A46 100%
    ) !important;

    box-shadow:
      0 2px 0 #172F3A,
      0 4px 9px rgba(0, 0, 0, .25),
      inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  }
}

/* Hover elevation only where a precise pointer exists */
@media screen and (max-width: 991px) and (hover: hover) and (pointer: fine) {

  #view-home .dashboard-library-table tbody tr:hover {
    border-color: #A8CBCD !important;

    box-shadow:
      0 4px 0 #DCE8EA,
      0 16px 28px -17px rgba(8, 126, 131, .24),
      inset 0 1px 0 #FFFFFF !important;
  }

  html[data-theme="dark"] #view-home .dashboard-library-table tbody tr:hover {
    border-color: #52777D !important;

    box-shadow:
      0 4px 0 #102530,
      0 16px 28px -17px rgba(0, 0, 0, .42),
      inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  #view-home .dashboard-library-table tbody tr {
    transition: none !important;
  }
}
/* ============================================================
   FANAGAAM — PURE WHITE MOBILE TECHNOLOGY CARD SURFACES
   Preserve turquoise accent, rounded corners and 3D shadows.
   ============================================================ */

@media screen and (max-width: 991px) {

  /* Every technology card: pure white */
  html:not([data-theme="dark"]) #view-home .dashboard-library-table tbody tr {
    background: #FFFFFF !important;
  }

  /* Every information row: pure white */
  html:not([data-theme="dark"]) #view-home .dashboard-library-table tbody td:not(.dashboard-library-empty) {
    background: #FFFFFF !important;
  }

  /* Technology title inset surface: also pure white */
  html:not([data-theme="dark"]) #view-home .dashboard-library-table tbody td:nth-child(2) {
    background: #FFFFFF !important;
    background-image: none !important;
  }

  /* Keep the empty-state card consistent */
  html:not([data-theme="dark"]) #view-home .dashboard-library-table tbody td.dashboard-library-empty {
    background: #FFFFFF !important;
  }
}
/* ============================================================
   FANAGAAM — REMOVE EXPOSED OUTER TABLE CORNERS ON MOBILE
   Keep only the individually rounded white technology cards.
   ============================================================ */

@media screen and (max-width: 991px) {

  html:not([data-theme="dark"]) #view-home .dashboard-library-table-wrap {
    border: 0 !important;
    border-radius: 0 !important;

    background: #FFFFFF !important;
    background-image: none !important;

    box-shadow: none !important;

    overflow: visible !important;

    padding: 0 !important;
  }

  html:not([data-theme="dark"]) #view-home .dashboard-library-table {
    border: 0 !important;
    border-radius: 0 !important;

    background: #FFFFFF !important;
    background-image: none !important;

    box-shadow: none !important;

    overflow: visible !important;
  }
}
/* ============================================================
   FANAGAAM — RESPONSIVE OWNER AND DATE VALUE ALIGNMENT
   Persian: physical left
   English: physical right
   Scope: only responsible person and start date values
   ============================================================ */

@media screen and (max-width: 991px) {

  /* Persian — align values to the left edge */
  html[dir="rtl"] #view-home .dashboard-library-table tbody td:nth-child(3),
  html[dir="rtl"] #view-home .dashboard-library-table tbody td.dashboard-library-date {
    text-align: left !important;
  }

  /* English — align values to the right edge */
  html[dir="ltr"] #view-home .dashboard-library-table tbody td:nth-child(3),
  html[dir="ltr"] #view-home .dashboard-library-table tbody td.dashboard-library-date {
    text-align: right !important;
  }

}
/* ============================================================
   FANAGAAM — SOFT TURQUOISE TECHNOLOGY TITLE SURFACE
   ============================================================ */

@media screen and (max-width: 991px) {

  html:not([data-theme="dark"]) #view-home
  .dashboard-library-table tbody td:nth-child(2) {

    background: linear-gradient(
      180deg,
      #F0FAF9 0%,
      #E8F6F5 100%
    ) !important;

    border: 1px solid #CBE6E4 !important;
    border-radius: 13px !important;

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .95),
      0 2px 5px rgba(8, 126, 131, .05) !important;
  }

  html:not([data-theme="dark"]) #view-home
  .dashboard-library-table tbody td:nth-child(2)::before {
    color: #087E83 !important;
  }
}
/* ============================================================
   FANAGAAM — COMPACT SIDE-BY-SIDE MOBILE PROGRESS GROUP
   Keep percentage and progress bar adjacent in RTL and LTR.
   ============================================================ */

@media screen and (max-width: 991px) {

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell {
    display: grid !important;

    grid-template-columns: max-content max-content !important;
    grid-template-rows: auto auto !important;

    align-items: center !important;
    justify-content: center !important;
    justify-items: center !important;

    column-gap: 10px !important;
    row-gap: 7px !important;

    white-space: nowrap !important;
  }

  /* Progress label remains above the two adjacent elements */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell::before {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;

    justify-self: start !important;
  }

  /* Progress bar */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > .dashboard-library-progress-track {
    grid-column: 1 !important;
    grid-row: 2 !important;

    justify-self: center !important;

    width: 88px !important;
    max-width: 100% !important;
    height: 8px !important;

    margin: 0 !important;
  }

  /* Percentage */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > strong {
    grid-column: 2 !important;
    grid-row: 2 !important;

    justify-self: center !important;

    color: #087E83 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    white-space: nowrap !important;
  }
}
/* ============================================================
   FANAGAAM — RESPONSIVE PROGRESS ALIGNMENT
   RTL: Label right / Progress group left
   LTR: Label left / Progress group right
   ============================================================ */

@media screen and (max-width: 991px) {

  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) 88px max-content !important;
    grid-template-rows: auto auto !important;

    align-items: center !important;
    justify-items: stretch !important;

    column-gap: 10px !important;
    row-gap: 8px !important;

    width: 100% !important;
    box-sizing: border-box !important;

    padding: 12px 5px !important;

    white-space: normal !important;
  }

  /* Progress label: inline-start
     Persian = right / English = left */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell::before {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;

    justify-self: start !important;
    align-self: center !important;

    width: fit-content !important;
    max-width: 100% !important;

    text-align: start !important;
  }

  /* Progress bar */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > .dashboard-library-progress-track {
    grid-column: 2 !important;
    grid-row: 2 !important;

    justify-self: center !important;

    display: block !important;

    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;

    height: 8px !important;

    margin: 0 !important;
  }

  /* Percentage */
  #view-home .dashboard-library-table tbody td.dashboard-library-progress-cell > strong {
    grid-column: 3 !important;
    grid-row: 2 !important;

    justify-self: start !important;
    align-self: center !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #087E83 !important;

    font-size: 11px !important;
    font-weight: 900 !important;

    white-space: nowrap !important;
    text-align: start !important;
  }
}
/* ============================================================
   FANAGAAM — FULL-WIDTH RESPONSIVE DESCRIPTION FIELD
   Label on first line, complete description below.
   Persian RTL / English LTR.
   ============================================================ */

@media screen and (max-width: 991px) {

  /* Description field becomes an independent full-width section */
  #view-home .dashboard-library-table tbody td.dashboard-library-description-cell {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;

    align-items: start !important;
    justify-content: stretch !important;
    justify-items: stretch !important;

    gap: 8px !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    padding: 13px 6px !important;

    box-sizing: border-box !important;

    text-align: start !important;
    white-space: normal !important;
  }

  /* Description label */
  #view-home .dashboard-library-table tbody td.dashboard-library-description-cell::before {
    display: block !important;

    grid-column: 1 !important;
    grid-row: 1 !important;

    justify-self: stretch !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: start !important;

    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Full-width description text */
  #view-home .dashboard-library-table tbody td.dashboard-library-description-cell > span {
    display: block !important;

    grid-column: 1 !important;
    grid-row: 2 !important;

    justify-self: stretch !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;

    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;

    color: #526D79 !important;

    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.95 !important;

    text-align: start !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Dark theme */
  html[data-theme="dark"] #view-home .dashboard-library-table tbody td.dashboard-library-description-cell > span {
    color: #C0D1D8 !important;
  }
}
/* ============================================================
   FANAGAAM — FULL-WIDTH MOBILE TECHNOLOGY TITLE
   Label above / Technology name below
   Persian RTL / English LTR
   Preserve the soft turquoise title surface.
   ============================================================ */

@media screen and (max-width: 991px) {

  /* Technology title container */
  #view-home .dashboard-library-table tbody td.dashboard-library-project-title {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;

    align-items: start !important;
    justify-items: stretch !important;

    gap: 8px !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    box-sizing: border-box !important;

    padding: 13px 11px !important;

    text-align: start !important;
    white-space: normal !important;
  }

  /* Technology title label — first line */
  #view-home .dashboard-library-table tbody td.dashboard-library-project-title::before {
    display: block !important;

    grid-column: 1 !important;
    grid-row: 1 !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    justify-self: stretch !important;

    text-align: start !important;

    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Actual technology name — second line, full width */
  #view-home .dashboard-library-table tbody td.dashboard-library-project-title > .dashboard-library-open-name {
    display: block !important;

    grid-column: 1 !important;
    grid-row: 2 !important;

    justify-self: stretch !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    background: transparent !important;

    text-align: start !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;

    line-height: 1.95 !important;
  }
}
/* ============================================================
   FANAGAAM — RESPONSIVE REGISTRATION HEADER FLOW FIX

   Fix:
   Prevent language/theme and top-right actions from
   overlapping the registration form during mobile scrolling.

   Scope:
   Registration screen only.
   Responsive screens up to 980px.
   Login and desktop layouts remain unchanged.
   ============================================================ */

@media screen and (max-width: 980px) {

  /* ----------------------------------------------------------
     1. Reserve a safe area above the registration card.
     ---------------------------------------------------------- */

  #authScreen.auth-screen.fg-registration-active {

    padding-top: calc(env(safe-area-inset-top, 0px) + 94px) !important;

    box-sizing: border-box !important;
  }


  /* ----------------------------------------------------------
     2. Move both control groups into the registration
        screen's scroll context instead of fixing them
        to the viewport.
     ---------------------------------------------------------- */

  #authScreen.auth-screen.fg-registration-active
  .auth-top-left-actions {

    position: absolute !important;

    top: calc(env(safe-area-inset-top, 0px) + 16px) !important;

    left: calc(env(safe-area-inset-left, 0px) + 16px) !important;
    right: auto !important;

    z-index: 110 !important;
  }


  #authScreen.auth-screen.fg-registration-active
  .auth-top-right-actions {

    position: absolute !important;

    top: calc(env(safe-area-inset-top, 0px) + 16px) !important;

    right: calc(env(safe-area-inset-right, 0px) + 16px) !important;
    left: auto !important;

    z-index: 110 !important;
  }

}

/* ============================================================
   END — RESPONSIVE REGISTRATION HEADER FLOW FIX
   ============================================================ */
   /* ============================================================
   FANAGAAM — RESPONSIVE FORGOT PASSWORD HEADER FLOW FIX

   Keep top controls and recovery card in one scroll context.
   Do not modify login or registration screens.
   ============================================================ */

@media screen and (max-width: 767px) {

  /* Recovery page becomes the single vertical scroll container. */
  #forgotPasswordScreen.auth-screen {

    align-items: center !important;
    justify-content: center !important;

    padding:
      calc(env(safe-area-inset-top, 0px) + 94px)
      16px
      20px !important;

    box-sizing: border-box !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
  }

  /* Language and theme controls */
  #forgotPasswordScreen .auth-top-left-actions {

    position: absolute !important;

    top: calc(env(safe-area-inset-top, 0px) + 16px) !important;

    left: calc(env(safe-area-inset-left, 0px) + 16px) !important;
    right: auto !important;

    z-index: 110 !important;
  }

  /* Back to sign-in button */
  #forgotPasswordScreen > .auth-back-btn {

    position: absolute !important;

    top: calc(env(safe-area-inset-top, 0px) + 16px) !important;

    right: calc(env(safe-area-inset-right, 0px) + 16px) !important;
    left: auto !important;

    margin: 0 !important;

    z-index: 110 !important;

    max-width: calc(100vw - 150px) !important;
    box-sizing: border-box !important;
  }

  /* Let the outer recovery page handle scrolling,
     instead of scrolling inside the card. */
  #forgotPasswordScreen .auth-card {

    margin: 0 auto !important;

    max-height: none !important;
    min-height: 0 !important;

    overflow: visible !important;

    flex: 0 0 auto !important;

    box-sizing: border-box !important;
  }

}

/* END — RESPONSIVE FORGOT PASSWORD HEADER FLOW FIX */
/* ============================================================
   FANAGAAM — FULL ENGLISH MOBILE FOOTER CENTERING

   Center the complete footer composition:
   Brand / Logo / Description / Quick Links / Footer links.

   English responsive only.
   Preserve Persian and desktop layouts.
   ============================================================ */

@media screen and (max-width: 767px) {

  /* 1. Center the complete footer grid */

  html[lang="en"] #publicFooter .footer-grid {

    display: grid !important;

    grid-template-columns: minmax(0, 1fr) !important;

    justify-items: center !important;
    align-items: center !important;

    width: 100% !important;
    max-width: 100% !important;

    margin-inline: auto !important;

    text-align: center !important;

    gap: 26px !important;
  }


  /* 2. Center both footer columns */

  html[lang="en"] #publicFooter .footer-grid > .footer-col {

    display: flex !important;

    flex-direction: column !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    margin-inline: auto !important;

    direction: ltr !important;
    text-align: center !important;
  }


  /* 3. Center logo and brand name as one group */

  html[lang="en"] #publicFooter .footer-logo {

    display: flex !important;

    flex-direction: row !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    max-width: 100% !important;

    margin-inline: auto !important;

    direction: ltr !important;

    text-align: center !important;

    gap: 12px !important;
  }

  html[lang="en"] #publicFooter .footer-logo-mark {

    flex: 0 0 auto !important;
  }

  html[lang="en"] #publicFooter .footer-logo > span:last-child {

    min-width: 0 !important;

    text-align: center !important;
  }


  /* 4. Center the complete English description */

  html[lang="en"] #publicFooter .footer-desc {

    display: block !important;

    width: 100% !important;

    max-width: 520px !important;

    margin-inline: auto !important;

    direction: ltr !important;

    text-align: center !important;

    overflow-wrap: break-word !important;
  }


  /* 5. Center Quick Links heading */

  html[lang="en"] #publicFooter .footer-title {

    display: block !important;

    width: 100% !important;

    margin-inline: auto !important;

    text-align: center !important;
  }


  /* 6. Center every Quick Links item */

  html[lang="en"] #publicFooter .footer-grid > .footer-col a {

    display: block !important;

    width: fit-content !important;

    max-width: 100% !important;

    align-self: center !important;

    margin-inline: auto !important;

    direction: ltr !important;

    text-align: center !important;
  }


  /* 7. Keep the footer bottom centered */

  html[lang="en"] #publicFooter .footer-bottom-complex,
  html[lang="en"] #publicFooter .footer-bottom-content {

    text-align: center !important;
  }

}

/* END — FULL ENGLISH MOBILE FOOTER CENTERING */
/* ============================================================
   FANAGAAM — USER ROLE TEXT OVERFLOW FIX
   Keep long user roles inside the account dropdown.
   Responsive on desktop, tablet and mobile.
   Preserve the original text and compact badge appearance.
   ============================================================ */

/* Allow the text column to shrink beside the avatar. */

#userMenu .user-menu-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Truncate long role labels with an ellipsis. */

#userMenu .user-menu-role {
  display: inline-block !important;

  width: fit-content !important;
  max-width: 100% !important;

  box-sizing: border-box !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;

  vertical-align: top !important;
}
/* ============================================================
   FANAGAAM — REGISTERED TECHNOLOGY TITLE
   Display as plain, non-interactive text.
   Same behavior on desktop, tablet and mobile.
   ============================================================ */

#view-home .dashboard-library-open-name,
#view-home .dashboard-library-open-name:hover {
  color: var(--text-0) !important;

  cursor: default !important;

  text-decoration: none !important;
  text-underline-offset: initial !important;

  outline: none !important;
}
/* ============================================================
   FANAGAAM — DARK MODE ACTION ARROW CONTRAST REFINEMENT
   Dashboard action cards
   Desktop / Tablet / Mobile
   Preserve arrow geometry, direction and movement.
   ============================================================ */

/* Dark theme: clear, solid and high-contrast circular button. */

html[data-theme="dark"] #view-home .dashboard-action-arrow {
  box-sizing: border-box !important;

  background-color: #087E83 !important;
  background-image: none !important;

  color: #FFFFFF !important;

  border: 1px solid #63D9D1 !important;

  opacity: 1 !important;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, .34),
    0 0 0 1px rgba(99, 217, 209, .16),
    inset 0 1px 0 rgba(255, 255, 255, .14) !important;

  transition:
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease !important;
}


/* Keep the arrow fully visible and crisp. */

html[data-theme="dark"] #view-home .dashboard-action-arrow svg {
  color: #FFFFFF !important;
  stroke: currentColor !important;

  opacity: 1 !important;
  filter: none !important;
}


/* Desktop hover and keyboard focus: brighter turquoise surface. */

html[data-theme="dark"]
#view-home .dashboard-action-card:hover .dashboard-action-arrow,

html[data-theme="dark"]
#view-home .dashboard-action-card:focus-visible .dashboard-action-arrow {
  background-color: #0B989D !important;
  background-image: none !important;

  color: #FFFFFF !important;

  border-color: #9AF0E9 !important;

  opacity: 1 !important;

  box-shadow:
    0 6px 16px rgba(0, 0, 0, .38),
    0 0 0 3px rgba(99, 217, 209, .17),
    inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}


/* Touch feedback for mobile and tablet. */

html[data-theme="dark"]
#view-home .dashboard-action-card:active .dashboard-action-arrow {
  background-color: #066B72 !important;

  color: #FFFFFF !important;
  border-color: #63D9D1 !important;

  box-shadow:
    0 2px 7px rgba(0, 0, 0, .35),
    inset 0 1px 2px rgba(0, 0, 0, .18) !important;
}


/* Preserve full contrast on touch devices as well. */

@media (hover: none) and (pointer: coarse) {

  html[data-theme="dark"]
  #view-home .dashboard-action-arrow {
    opacity: 1 !important;
    color: #FFFFFF !important;
    background-color: #087E83 !important;
  }

  html[data-theme="dark"]
  #view-home .dashboard-action-arrow svg {
    opacity: 1 !important;
    stroke: currentColor !important;
  }

}
/* =====================================================================
   FANAGAAM — NOTIFICATION PANEL VISUAL SYSTEM V1

   Desktop + Responsive
   Persian RTL + English LTR
   Light Theme + Dark Theme

   Consistent hierarchy:
   Icon → Title → Time → Description

   ===================================================================== */


/* ============================================================
   1. MAIN NOTIFICATION PANEL
   ============================================================ */

#notifPanel {
  width: 408px !important;
  max-width: calc(100vw - 40px) !important;

  max-height:
    min(680px, calc(100dvh - var(--header-h) - var(--safe-top) - 20px))
    !important;

  min-height: 0 !important;

  overflow: hidden !important;

  border: 1px solid var(--line-bright) !important;
  border-radius: 18px !important;

  background: var(--bg-2) !important;

  box-shadow:
    0 22px 58px rgba(10, 35, 48, .20) !important;

  flex-direction: column !important;
}

#notifPanel:not(.open) {
  display: none !important;
}

#notifPanel.open {
  display: flex !important;
}

#notifPanel::before {
  height: 2px !important;

  animation: none !important;

  background: linear-gradient(
    90deg,
    var(--brand-primary),
    var(--brand-accent)
  ) !important;
}


/* ============================================================
   2. HEADER
   ============================================================ */

#notifPanel .notif-header {
  flex: 0 0 auto !important;

  min-height: 62px;

  padding: 14px 18px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;

  gap: 12px !important;

  border-bottom: 1px solid var(--line) !important;

  background: var(--bg-2) !important;
}

#notifPanel .notif-header h3 {
  min-width: 0;

  margin: 0 !important;

  color: var(--text-0) !important;

  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
}

#notifPanel .notif-header button {
  min-height: 34px;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 6px 11px !important;

  border: 1px solid
    color-mix(in srgb, var(--brand-primary) 24%, var(--line)) !important;

  border-radius: 9px !important;

  background:
    color-mix(in srgb, var(--brand-primary) 7%, var(--bg-2)) !important;

  color: var(--brand-primary) !important;

  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;

  white-space: nowrap;
}

#notifPanel .notif-header button:hover {
  background:
    color-mix(in srgb, var(--brand-primary) 12%, var(--bg-2)) !important;

  border-color:
    color-mix(in srgb, var(--brand-primary) 40%, var(--line)) !important;
}


/* ============================================================
   3. NOTIFICATION LIST
   Only the middle list scrolls.
   Header and footer remain stable.
   ============================================================ */

#notifPanel .notif-list {
  flex: 1 1 auto !important;

  min-height: 0 !important;

  overflow-x: hidden !important;
  overflow-y: auto !important;

  display: flex !important;
  flex-direction: column !important;

  gap: 10px !important;

  padding: 12px !important;

  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: var(--line-bright) transparent;
}


/* ============================================================
   4. NOTIFICATION CARD
   ============================================================ */

#notifPanel .notif-item {
  width: 100% !important;
  min-width: 0 !important;

  flex: 0 0 auto !important;

  margin: 0 !important;
  padding: 13px 14px !important;

  display: flex !important;
  align-items: flex-start !important;

  gap: 12px !important;

  border: 1px solid var(--line-bright) !important;
  border-radius: 14px !important;

  background: var(--bg-1) !important;

  box-shadow: none !important;

  position: relative !important;

  cursor: pointer;

  transition:
    background-color .18s ease,
    border-color .18s ease !important;

  text-align: start !important;
}

#notifPanel .notif-item:hover {
  background: var(--bg-3) !important;

  border-color:
    color-mix(in srgb, var(--brand-primary) 36%, var(--line-bright)) !important;

  transform: none !important;
  box-shadow: none !important;
}

#notifPanel .notif-item:focus-visible {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 2px !important;
}


/* ============================================================
   5. UNREAD NOTIFICATIONS
   ============================================================ */

#notifPanel .notif-item.unread {
  border-inline-start: 3px solid var(--brand-primary) !important;

  background:
    color-mix(in srgb, var(--brand-primary) 7%, var(--bg-2)) !important;
}

/* Remove overlapping legacy pulse effects. */

#notifPanel .notif-item.unread::before,
#notifPanel .notif-item.unread .notif-item-icon::before {
  content: none !important;
  display: none !important;
  animation: none !important;
}

/* One small, consistent unread indicator. */

#notifPanel .notif-item.unread .notif-item-title::after {
  content: "" !important;

  display: inline-block !important;

  width: 6px !important;
  height: 6px !important;

  margin-inline-start: 7px !important;

  border-radius: 50% !important;

  background: #C6284B !important;

  vertical-align: middle !important;

  box-shadow: none !important;
}


/* ============================================================
   6. NOTIFICATION ICON
   ============================================================ */

#notifPanel .notif-item-icon {
  width: 40px !important;
  height: 40px !important;

  flex: 0 0 40px !important;

  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  position: relative !important;

  margin: 1px 0 0 !important;

  border: 1px solid var(--line-bright) !important;
  border-radius: 11px !important;

  box-shadow: none !important;
  transform: none !important;
}

#notifPanel .notif-item-icon svg {
  width: 20px !important;
  height: 20px !important;

  display: block !important;
}


/* ============================================================
   7. SEMANTIC ICON COLORS — LIGHT THEME
   Matte surfaces, without heavy glow.
   ============================================================ */

#notifPanel .notif-item-icon-success {
  background: #E8F5EF !important;
  color: #08764E !important;
  border-color: #B9DECC !important;
}

#notifPanel .notif-item-icon-warning {
  background: #FFF5DF !important;
  color: #94620B !important;
  border-color: #EED8A4 !important;
}

#notifPanel .notif-item-icon-info,
#notifPanel .notif-item-icon-lock {
  background: #E8F3F3 !important;
  color: #087E83 !important;
  border-color: #BBD9D8 !important;
}

#notifPanel .notif-item-icon-error {
  background: #FBECEF !important;
  color: #B4233B !important;
  border-color: #EBC4CC !important;
}


/* ============================================================
   8. SEMANTIC ICON COLORS — DARK THEME
   ============================================================ */

html[data-theme="dark"] #notifPanel .notif-item-icon-success {
  background: #173B31 !important;
  color: #72D6B0 !important;
  border-color: #326C59 !important;
}

html[data-theme="dark"] #notifPanel .notif-item-icon-warning {
  background: #3A301C !important;
  color: #F0C66A !important;
  border-color: #75602D !important;
}

html[data-theme="dark"] #notifPanel .notif-item-icon-info,
html[data-theme="dark"] #notifPanel .notif-item-icon-lock {
  background: #173B40 !important;
  color: #75D5D0 !important;
  border-color: #32666A !important;
}

html[data-theme="dark"] #notifPanel .notif-item-icon-error {
  background: #3B242D !important;
  color: #F19AAA !important;
  border-color: #74404D !important;
}


/* ============================================================
   9. NOTIFICATION CONTENT
   Title and time are now separate stacked rows.
   ============================================================ */

#notifPanel .notif-item-body {
  flex: 1 1 0 !important;

  min-width: 0 !important;

  display: flex !important;
  flex-direction: column !important;

  gap: 0 !important;

  text-align: start !important;
}

#notifPanel .notif-item-heading {
  width: 100% !important;
  min-width: 0 !important;

  display: flex !important;
  flex-direction: column !important;

  align-items: flex-start !important;
  justify-content: flex-start !important;

  gap: 2px !important;

  margin: 0 0 6px !important;
}


/* Title */

#notifPanel .notif-item-title {
  width: 100% !important;
  min-width: 0 !important;

  margin: 0 !important;

  color: var(--text-0) !important;

  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.55 !important;

  text-align: start !important;

  overflow-wrap: anywhere !important;
  word-break: normal !important;
}


/* Time */

#notifPanel .notif-item-time {
  display: block !important;

  width: 100% !important;
  min-width: 0 !important;

  margin: 0 !important;

  color: var(--text-2) !important;

  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;

  text-align: start !important;

  white-space: normal !important;
  overflow-wrap: anywhere !important;
}


/* Description */

#notifPanel .notif-item-text {
  display: block !important;

  min-width: 0 !important;

  margin: 0 !important;

  color: var(--text-1) !important;

  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.75 !important;

  text-align: start !important;

  overflow-wrap: anywhere !important;
  word-break: normal !important;
}


/* ============================================================
   10. FOOTER
   ============================================================ */

#notifPanel .notif-footer {
  flex: 0 0 auto !important;

  padding: 11px 12px !important;

  border-top: 1px solid var(--line) !important;

  background: var(--bg-2) !important;
}

#notifPanel .notif-footer button {
  width: 100% !important;
  min-height: 42px !important;

  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  padding: 9px 14px !important;

  border: 1px solid
    color-mix(in srgb, var(--brand-primary) 26%, var(--line)) !important;

  border-radius: 11px !important;

  background:
    color-mix(in srgb, var(--brand-primary) 7%, var(--bg-2)) !important;

  color: var(--brand-primary) !important;

  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1.45 !important;
}

#notifPanel .notif-footer button:hover {
  background:
    color-mix(in srgb, var(--brand-primary) 12%, var(--bg-2)) !important;

  transform: none !important;
}


/* ============================================================
   11. EMPTY NOTIFICATIONS STATE
   ============================================================ */

#notifPanel .notif-empty {
  flex: 1 1 auto;

  min-height: 190px;

  justify-content: center;

  padding: 28px 20px !important;
}

#notifPanel .notif-empty-icon {
  width: 58px !important;
  height: 58px !important;

  border-radius: 17px !important;

  margin-bottom: 4px !important;

  background:
    color-mix(in srgb, var(--brand-primary) 10%, var(--bg-2)) !important;

  border: 1px solid
    color-mix(in srgb, var(--brand-primary) 24%, var(--line)) !important;

  box-shadow: none !important;
}

#notifPanel .notif-empty-icon svg {
  width: 27px !important;
  height: 27px !important;

  opacity: 1 !important;
}

#notifPanel .notif-empty-title {
  color: var(--text-0) !important;

  font-size: 14px !important;
  font-weight: 850 !important;
}

#notifPanel .notif-empty-desc {
  color: var(--text-1) !important;

  font-size: 12px !important;
  line-height: 1.75 !important;
}


/* ============================================================
   12. MOBILE / RESPONSIVE
   ============================================================ */

@media screen and (max-width: 767px) {

  #notifPanel {
    left: max(10px, var(--safe-left)) !important;
    right: max(10px, var(--safe-right)) !important;

    width: auto !important;
    max-width: none !important;

    max-height:
      calc(100dvh - var(--header-h) - var(--safe-top) - 18px) !important;

    border-radius: 16px !important;
  }

  #notifPanel .notif-header {
    min-height: 56px;

    padding: 12px 14px !important;
    gap: 8px !important;
  }

  #notifPanel .notif-header h3 {
    font-size: 15px !important;
  }

  #notifPanel .notif-header button {
    min-height: 32px;

    padding: 5px 9px !important;

    font-size: 11.5px !important;
  }

  #notifPanel .notif-list {
    gap: 9px !important;
    padding: 10px !important;
  }

  #notifPanel .notif-item {
    padding: 12px !important;
    gap: 10px !important;

    border-radius: 12px !important;
  }

  #notifPanel .notif-item-icon {
    width: 38px !important;
    height: 38px !important;

    flex-basis: 38px !important;

    border-radius: 10px !important;
  }

  #notifPanel .notif-item-icon svg {
    width: 19px !important;
    height: 19px !important;
  }

  #notifPanel .notif-item-title {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
  }

  #notifPanel .notif-item-time {
    font-size: 11px !important;
  }

  #notifPanel .notif-item-text {
    font-size: 12px !important;
    line-height: 1.7 !important;
  }

  #notifPanel .notif-footer {
    padding: 9px 10px !important;
  }

  #notifPanel .notif-footer button {
    min-height: 40px !important;
    font-size: 12px !important;
  }

}

/* END — FANAGAAM NOTIFICATION PANEL VISUAL SYSTEM V1 */
/* ================================================================
   FANAGAAM — RESPONSIVE PERSIAN DEEP-ASSESSMENT ANSWER GRID
   All five answers share identical RTL columns:
   1. Fixed-width centered icon on the right
   2. Right-aligned text with a common right edge
   Mobile / Persian only — Stage 2 only
   ================================================================ */

@media screen and (max-width: 767px) {

  /* All five answer buttons use the same RTL grid. */

  html.fg-lang-fa #view-deep .q-answers-vertical .ans-btn {
    display: grid !important;

    grid-template-columns: 24px minmax(0, 1fr) !important;

    align-items: center !important;
    justify-content: initial !important;

    column-gap: 8px !important;

    width: 100% !important;
    box-sizing: border-box !important;

    direction: rtl !important;
    text-align: right !important;
  }

  /* Icon column: fixed width, centered, always on the right. */

  html.fg-lang-fa #view-deep .q-answers-vertical .ans-btn > span:first-child {
    grid-column: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;

    margin: 0 !important;

    text-align: center !important;
    line-height: 1 !important;

    justify-self: center !important;
    box-sizing: border-box !important;
  }

  /* Text column: one shared right edge for all five labels. */

  html.fg-lang-fa #view-deep .q-answers-vertical .ans-btn > span:last-child {
    grid-column: 2 !important;

    display: block !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;

    direction: rtl !important;
    unicode-bidi: isolate !important;

    text-align: right !important;

    justify-self: stretch !important;
    box-sizing: border-box !important;
  }

}

/* END RESPONSIVE PERSIAN DEEP-ASSESSMENT ANSWER GRID */
/* ================================================================
   FANAGAAM — SHORTCUT COMPARISON ICON DARK THEME VISIBILITY
   Technology Comparison icon
   Persian / English
   Desktop / Responsive
   Dark theme only
   ================================================================ */

html[data-theme="dark"]
.shortcut-modal-item[data-shortcut-action="view-compare"]
.shortcut-modal-icon {

  /* Matte, opaque teal surface. */
  background: #164653 !important;
  background-image: none !important;

  /* High-contrast turquoise icon. */
  color: #A5F3FC !important;

  border: 1px solid #387482 !important;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, .24) !important;
}

/* Ensure every SVG stroke follows the visible icon color. */

html[data-theme="dark"]
.shortcut-modal-item[data-shortcut-action="view-compare"]
.shortcut-modal-icon svg {

  color: #A5F3FC !important;
  stroke: currentColor !important;
  fill: none !important;

  opacity: 1 !important;
  visibility: visible !important;
}

/* END DARK THEME SHORTCUT ICON VISIBILITY */
/* ================================================================
   FANAGAAM — GLOBAL PROFILE IMAGE DISPLAY REFINEMENT
   Header / User Menu / Profile / Edit Profile / Registration
   Desktop + Responsive | Persian + English | Light + Dark
   ================================================================ */

/* 1. Improve the small header avatar's visible dimensions. */

#headerAvatar.user-avatar {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  flex: 0 0 46px !important;

  box-sizing: border-box !important;
  overflow: hidden !important;

  border: 2px solid var(--bg-2) !important;
}

/* 2. Responsive header avatar. */

@media screen and (max-width: 767px) {
  #headerAvatar.user-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    flex-basis: 44px !important;
  }
}

/* Preserve header spacing on very narrow devices. */

@media screen and (max-width: 340px) {
  #headerAvatar.user-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex-basis: 40px !important;
  }
}

/* 3. Consistent image rendering across all profile locations. */

.user-avatar > img,
.user-menu-avatar > img,
.profile-avatar-large > img,
.profile-avatar-preview > img,
#registerCard .fg-register-avatar-preview > img,
#registerCard .fg-register-avatar-image {

  display: block !important;

  width: 100% !important;
  height: 100% !important;

  min-width: 0 !important;
  min-height: 0 !important;

  object-fit: cover !important;
  object-position: center center !important;

  border-radius: inherit !important;

  image-rendering: auto !important;

  opacity: 1 !important;
  visibility: visible !important;
}

/* END GLOBAL PROFILE IMAGE DISPLAY REFINEMENT */