/* Iconițe (desen liniar, după setul Lucide, licență ISC), în culoarea textului — deci și în tema întunecată.
   Se folosesc ca mască: `.ico` + `--ico: var(--ico-<nume>)`; în meniu se pun singure, după secțiune și model. */
:root {
  --ico-book: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/><path d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/></svg>");
  --ico-helicopter: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M2 4.5h17'/><path d='M10.5 4.5V8'/><path d='M3.5 15c0-4 3-7 7-7h2.5a3.5 3.5 0 0 1 3.5 3.5V15Z'/><path d='M16.5 11.5H22'/><path d='M22 9.5v4'/><path d='M7 15v3.5'/><path d='M13 15v3.5'/><path d='M4.5 18.5h11'/></svg>");
  --ico-plane: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z'/></svg>");
  --ico-users: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></svg>");
  --ico-folder: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/></svg>");
  --ico-shield: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/><path d='m9 12 2 2 4-4'/></svg>");
  --ico-scale: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/><path d='m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/><path d='M7 21h10'/><path d='M12 3v18'/><path d='M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2'/></svg>");
  --ico-briefcase: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='20' height='14' x='2' y='7' rx='2'/><path d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/></svg>");
  --ico-database: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='12' cy='5' rx='9' ry='3'/><path d='M3 5v14a9 3 0 0 0 18 0V5'/><path d='M3 12a9 3 0 0 0 18 0'/></svg>");
  --ico-lock: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='18' height='11' x='3' y='11' rx='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
  --ico-checks: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 17 2 2 4-4'/><path d='m3 7 2 2 4-4'/><path d='M13 6h8'/><path d='M13 12h8'/><path d='M13 18h8'/></svg>");
  --ico-chart: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 3v18h18'/><path d='M18 17V9'/><path d='M13 17V5'/><path d='M8 17v-3'/></svg>");
  --ico-clock: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 6v6l4 2'/></svg>");
  --ico-pin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/><circle cx='12' cy='10' r='3'/></svg>");
  --ico-cloud: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z'/></svg>");
  --ico-mail: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='20' height='16' x='2' y='4' rx='2'/><path d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/></svg>");
  --ico-alert: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>");
  --ico-file: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/><path d='M14 2v4a2 2 0 0 0 2 2h4'/><path d='M16 13H8'/><path d='M16 17H8'/><path d='M10 9H8'/></svg>");
  --ico-pencil: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21.17 6.81a1 1 0 0 0-3.98-3.98L3.84 16.17a2 2 0 0 0-.5.83l-1.32 4.35a.5.5 0 0 0 .62.62l4.35-1.32a2 2 0 0 0 .83-.5z'/><path d='m15 5 4 4'/></svg>");
  --ico-trash: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6'/><path d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2'/></svg>");
  --ico-message: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/><path d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/><path d='M12 17h.01'/></svg>");
  --ico-building: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='16' height='20' x='4' y='2' rx='2'/><path d='M9 22v-4h6v4'/><path d='M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01'/></svg>");
  --ico-eye: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2.06 12.35a1 1 0 0 1 0-.7 10.75 10.75 0 0 1 19.88 0 1 1 0 0 1 0 .7 10.75 10.75 0 0 1-19.88 0'/><circle cx='12' cy='12' r='3'/></svg>");
  --ico-download: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 15V3'/><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><path d='m7 10 5 5 5-5'/></svg>");
  --ico-takeoff: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 22h20'/><path d='M6.36 17.4 4 17l-2-4 1.1-.55a2 2 0 0 1 1.8 0l.17.1a2 2 0 0 0 1.8 0L8 12 5 6l.9-.45a2 2 0 0 1 2.09.2l4.02 3a2 2 0 0 0 2.1.2l4.19-2.06a2.41 2.41 0 0 1 1.73-.17L21 7a1.4 1.4 0 0 1 .87 1.99l-.38.76c-.23.46-.6.84-1.07 1.08L7.58 17.2a2 2 0 0 1-1.22.18Z'/></svg>");
}

.ico {
  content: ""; display: inline-block; width: 1.1em; height: 1.1em; flex: none; vertical-align: -.2em; margin-right: .45em;
  background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}

/* meniul (bara laterală): secțiunile */
.app-flightlog > table > caption > .section { --ico: var(--ico-book); }
.app-fleet > table > caption > .section { --ico: var(--ico-helicopter); }
.app-pilots > table > caption > .section { --ico: var(--ico-users); }
.app-documents > table > caption > .section { --ico: var(--ico-folder); }
.app-compliance > table > caption > .section { --ico: var(--ico-shield); }
.app-weightbalance > table > caption > .section { --ico: var(--ico-scale); }
.app-personnel > table > caption > .section { --ico: var(--ico-briefcase); }
.app-core > table > caption > .section { --ico: var(--ico-database); }
.app-auth > table > caption > .section { --ico: var(--ico-lock); }
.app-flightlog > table > caption > .section::before,
.app-fleet > table > caption > .section::before,
.app-pilots > table > caption > .section::before,
.app-documents > table > caption > .section::before,
.app-compliance > table > caption > .section::before,
.app-weightbalance > table > caption > .section::before,
.app-personnel > table > caption > .section::before,
.app-core > table > caption > .section::before,
.app-auth > table > caption > .section::before {
  content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .45em; vertical-align: -.18em;
  background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}

/* meniul: intrările importante */
#nav-sidebar tr.model-techlogpage > th > a { --ico: var(--ico-book); }
#nav-sidebar tr.model-techlogchecks > th > a { --ico: var(--ico-checks); }
#nav-sidebar tr.model-techlogreview > th > a { --ico: var(--ico-message); }
#nav-sidebar tr.model-flightreports > th > a { --ico: var(--ico-chart); }
#nav-sidebar tr.model-dutyperiod > th > a { --ico: var(--ico-clock); }
#nav-sidebar tr.model-landingsite > th > a { --ico: var(--ico-pin); }
#nav-sidebar tr.model-maileddocument > th > a { --ico: var(--ico-mail); }
#nav-sidebar tr.model-meteobriefing > th > a { --ico: var(--ico-cloud); }
#nav-sidebar tr.model-restrictionsbriefing > th > a { --ico: var(--ico-alert); }
#nav-sidebar tr.model-flight > th > a { --ico: var(--ico-takeoff); }
#nav-sidebar tr.model-pilot > th > a { --ico: var(--ico-users); }
#nav-sidebar tr.model-aircraft > th > a { --ico: var(--ico-helicopter); }
#nav-sidebar tr.model-partner > th > a { --ico: var(--ico-building); }
#nav-sidebar tr.model-document > th > a { --ico: var(--ico-file); }
#nav-sidebar tr.model-certificatesfolder > th > a { --ico: var(--ico-shield); }
#nav-sidebar tr.model-unlinkeddocuments > th > a { --ico: var(--ico-alert); }
#nav-sidebar tr.model-compliancerequirement > th > a { --ico: var(--ico-shield); }
#nav-sidebar tr.model-backuprun > th > a { --ico: var(--ico-database); }
#nav-sidebar tr.model-user > th > a { --ico: var(--ico-users); }
#nav-sidebar tr.model-pilotsstatus > th > a { --ico: var(--ico-users); }
#nav-sidebar tr.model-aircraftstatus > th > a { --ico: var(--ico-helicopter); }
#nav-sidebar tr.model-partnersstatus > th > a { --ico: var(--ico-building); }
#nav-sidebar tr.model-manualsections > th > a { --ico: var(--ico-file); }
#nav-sidebar tr.model-authorityletter > th > a { --ico: var(--ico-mail); }
#nav-sidebar tr.model-authorityaction > th > a { --ico: var(--ico-checks); }
#nav-sidebar tr.model-pilotsstatus > th > a::before,
#nav-sidebar tr.model-aircraftstatus > th > a::before,
#nav-sidebar tr.model-partnersstatus > th > a::before,
#nav-sidebar tr.model-manualsections > th > a::before,
#nav-sidebar tr.model-authorityletter > th > a::before,
#nav-sidebar tr.model-authorityaction > th > a::before,
#nav-sidebar tr.model-unlinkeddocuments > th > a::before,
#nav-sidebar tr.model-techlogpage > th > a::before,
#nav-sidebar tr.model-techlogchecks > th > a::before,
#nav-sidebar tr.model-techlogreview > th > a::before,
#nav-sidebar tr.model-flightreports > th > a::before,
#nav-sidebar tr.model-dutyperiod > th > a::before,
#nav-sidebar tr.model-landingsite > th > a::before,
#nav-sidebar tr.model-maileddocument > th > a::before,
#nav-sidebar tr.model-meteobriefing > th > a::before,
#nav-sidebar tr.model-restrictionsbriefing > th > a::before,
#nav-sidebar tr.model-flight > th > a::before,
#nav-sidebar tr.model-pilot > th > a::before,
#nav-sidebar tr.model-aircraft > th > a::before,
#nav-sidebar tr.model-partner > th > a::before,
#nav-sidebar tr.model-document > th > a::before,
#nav-sidebar tr.model-certificatesfolder > th > a::before,
#nav-sidebar tr.model-compliancerequirement > th > a::before,
#nav-sidebar tr.model-backuprun > th > a::before,
#nav-sidebar tr.model-user > th > a::before {
  content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .4em; vertical-align: -.16em; opacity: .85;
  background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}

/* Linkurile de fișier, în tot proiectul (admin și zona pilotului): ochi = deschide / previzualizează, săgeată = descarcă.
   Doar iconița; textul („Deschide”, „Previzualizare”, „Descarcă”) e în title și aria-label (documents.links). */
a.ico-open, a.ico-download {
  display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; margin: -.3rem 0;
  border-radius: 6px; vertical-align: middle; text-decoration: none;
}
a.ico-open { --ico: var(--ico-eye); }
a.ico-download { --ico: var(--ico-download); }
a.ico-open::before, a.ico-download::before, .with-ico::before {
  content: ""; width: 1.2rem; height: 1.2rem; flex: none; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
a.ico-open:hover, a.ico-download:hover, a.ico-open:focus-visible, a.ico-download:focus-visible {
  background: color-mix(in srgb, currentColor 12%, transparent);
}
/* butoane și linkuri cu text lung („Descarcă dosarul (ZIP …)”): iconița înaintea textului */
.with-ico { display: inline-flex; align-items: center; gap: .45em; }
.with-ico.ico-dl { --ico: var(--ico-download); }
.with-ico.ico-eye { --ico: var(--ico-eye); }
.with-ico.ico-edit { --ico: var(--ico-pencil); }
.with-ico.ico-trash { --ico: var(--ico-trash); }
.with-ico::before { width: 1.1em; height: 1.1em; }

/* Buton mic cu iconiță și text scurt (ex. pagina din jurnal în lista zborurilor): fără sublinierea linkului. */
a.ico-chip {
  --ico: var(--ico-book); display: inline-flex; align-items: center; gap: .35em; padding: 1px 8px 1px 6px; border-radius: 6px;
  border: 1px solid var(--hairline-color); white-space: nowrap; text-decoration: none;
}
a.ico-chip::before {
  content: ""; width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
#content a.ico-chip:link, #content a.ico-chip:visited { text-decoration: none; }  /* peste a:not(…#content-main.app-list a) din Django */
a.ico-chip:hover, a.ico-chip:focus-visible { background: color-mix(in srgb, currentColor 12%, transparent); border-color: transparent; }

/* E-mail / telefon mascat, cu ochi (core/masking.py, reveal.js) */
.masked-value { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.reveal-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin: -.3rem 0;
  padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; --ico: var(--ico-eye);
}
.reveal-btn::before {
  content: ""; width: 1.1rem; height: 1.1rem; background: currentColor; opacity: .75;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.reveal-btn:hover, .reveal-btn:focus-visible { background: color-mix(in srgb, currentColor 12%, transparent); }
.masked-value[data-shown] .reveal-btn::before { opacity: 1; }
