/* Sprouvo : mise en page et composants. Les couleurs et polices sont dans brand.css. */

/* ---------------------------------------------------------------- type */
.display, .h2, main h1 { font-family: var(--b-font-display); }
.display { font-weight: 700; letter-spacing: -0.045em; line-height: 0.98; font-size: clamp(2.75rem, 1.2rem + 5vw, 5.25rem); }
.h2 { font-weight: 700; letter-spacing: -0.035em; }
html[lang="ar"] .display, html[lang="ar"] .h2, html[lang="ar"] main h1 { font-family: var(--b-font-arabic); letter-spacing: 0; line-height: 1.3; }
.link { text-decoration-color: color-mix(in srgb, var(--b-primary) 40%, transparent); }

/* ------------------------------------------------------------- controls */
.btn { border-radius: 0.45rem; font-weight: 650; letter-spacing: -0.005em; }
.btn-primary { background: var(--b-primary); box-shadow: 0 1px 0 rgb(0 0 0 / 0.15); }
.btn-primary:hover { background: var(--b-primary-deep); }
.btn-quiet { box-shadow: inset 0 0 0 1.5px var(--b-border); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1.5px var(--b-primary); background: #fff; color: var(--b-primary-deep); }
.btn-ink:hover { background: color-mix(in srgb, var(--b-ink) 85%, #fff); }
.input { border-radius: 0.45rem; }
.input:focus { box-shadow: inset 0 0 0 2px var(--b-primary), 0 0 0 4px color-mix(in srgb, var(--b-primary) 15%, transparent); }
.lang-option[aria-current="true"] { background: var(--b-second-soft); }
.pill { border-radius: 0.35rem; }
.pill-pending { background: color-mix(in srgb, var(--b-primary) 12%, transparent); }
.segmented, .menu, .lang-menu { border-radius: 0.6rem; }
.segmented input:checked + span { background: var(--b-primary); }
.avatar { background: var(--b-accent); color: var(--b-ink); font-weight: 800; }

/* the signature of the brand: a solid saffron shadow, offset, under the things that matter */
.glass, .sheet {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0 0 1.5px var(--b-ink), 0.55rem 0.55rem 0 0 var(--b-accent);
}
[dir="rtl"] .glass, [dir="rtl"] .sheet { box-shadow: 0 0 0 1.5px var(--b-ink), -0.55rem 0.55rem 0 0 var(--b-accent); }

/* ------------------------------------------------------- public pages */
.site-body .nav-glass {
  background: var(--b-ink);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 0;
  color: #fff;
}
.site-body .nav-glass .nav-link, .site-body .nav-glass .icon-btn { color: rgb(255 255 255 / 0.8); }
.site-body .nav-glass .nav-link:hover, .site-body .nav-glass .icon-btn:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
.site-body .nav-glass .btn-primary { background: var(--b-accent); color: var(--b-ink); }
.site-body .nav-glass .btn-primary:hover { background: #fff; }
.site-body .nav-glass .btn-quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.35); }
.site-body .nav-glass .lang-menu, .site-body .nav-glass .lang-menu * { color: var(--b-ink); }
.site-body #mobile-menu { border-color: rgb(255 255 255 / 0.12); }

/* hero: a dark ledger, ruled like account paper, the preview first */
.hero { background: var(--b-ink); color: #fff; }
.site-body .hero .mesh {
  background:
    repeating-linear-gradient(to bottom, transparent 0 2.4rem, rgb(255 255 255 / 0.05) 2.4rem calc(2.4rem + 1px)),
    linear-gradient(to right, transparent 0 4.5rem, rgb(245 184 65 / 0.35) 4.5rem calc(4.5rem + 1px), transparent calc(4.5rem + 1px)),
    radial-gradient(50rem 30rem at 85% 110%, rgb(15 118 110 / 0.55), transparent 70%);
}
[dir="rtl"] .site-body .hero .mesh {
  background:
    repeating-linear-gradient(to bottom, transparent 0 2.4rem, rgb(255 255 255 / 0.05) 2.4rem calc(2.4rem + 1px)),
    linear-gradient(to left, transparent 0 4.5rem, rgb(245 184 65 / 0.35) 4.5rem calc(4.5rem + 1px), transparent calc(4.5rem + 1px)),
    radial-gradient(50rem 30rem at 15% 110%, rgb(15 118 110 / 0.55), transparent 70%);
}
.hero .text-muted { color: rgb(255 255 255 / 0.72); }
.hero .display { color: #fff; }
.hero .btn-primary { background: var(--b-accent); color: var(--b-ink); }
.hero .btn-primary:hover { background: #fff; }
.hero .btn-quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.4); }
.hero .btn-quiet:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.hero .glass { color: var(--b-ink); box-shadow: 0 0 0 1.5px var(--b-accent), 0.6rem 0.6rem 0 0 var(--b-accent); }
[dir="rtl"] .hero .glass { box-shadow: 0 0 0 1.5px var(--b-accent), -0.6rem 0.6rem 0 0 var(--b-accent); }
.hero .glass .text-muted { color: var(--b-muted); }
@media (min-width: 64rem) {
  .hero > div { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .hero > div > :first-child { order: 2; }
  .hero > div > :last-child { order: 1; }
}

/* sections of the landing page */
.page-index #product { background: var(--b-background); }
.page-index #notifications { background: #fff; }
.page-index #pricing { background: var(--b-background); }
.page-index #pricing .mesh-soft { display: none; }
.page-index section + section { border-top: 1.5px solid var(--b-ink); }

/* the other public pages (login, sign-up, legal...) */
.site-body .mesh, .site-body .mesh-soft {
  background: repeating-linear-gradient(to bottom, transparent 0 2.4rem, color-mix(in srgb, var(--b-primary) 7%, transparent) 2.4rem calc(2.4rem + 1px)), var(--b-background);
}
.site-body footer { border-top: 1.5px solid var(--b-ink); }

/* ---------------------------------------------- application : sidebar */
.app-bar {
  background: var(--b-sidebar);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 0;
  color: #fff;
}
.app-bar .nav-link, .app-bar .icon-btn { color: rgb(255 255 255 / 0.78); }
.app-bar .nav-link:hover, .app-bar .icon-btn:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
.app-bar .nav-link[aria-current="page"] { color: #fff; background: rgb(255 255 255 / 0.1); box-shadow: inset 3px 0 0 var(--b-accent); }
[dir="rtl"] .app-bar .nav-link[aria-current="page"] { box-shadow: inset -3px 0 0 var(--b-accent); }
.app-bar .menu, .app-bar .lang-menu { color: var(--b-ink); }

@media (min-width: 64rem) {
  .app-body { padding-inline-start: 15.5rem; }
  .app-bar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: 15.5rem;
    z-index: 50;
  }
  .app-bar > div {
    height: 100%;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.4rem 0.9rem 1rem;
  }
  .app-bar > div > a:first-child { padding: 0 0.6rem 1.6rem; font-size: 1.15rem; }
  .app-bar > div > a:first-child > span { display: inline; }
  .app-bar nav { flex-direction: column; align-items: stretch; gap: 0.15rem; margin: 0; }
  .app-bar nav .nav-link { display: flex; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: 0.45rem; }
  .app-bar nav .nav-link::before {
    content: ""; width: 1.15rem; height: 1.15rem; flex-shrink: 0; background: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain;
  }
  .app-bar > div > div:last-child {
    margin: auto 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid rgb(255 255 255 / 0.12);
    justify-content: space-between;
  }
  .app-bar > div > div:last-child > .relative:last-child { order: -1; }
  .app-bar .menu, .app-bar .lang-menu { top: auto; bottom: calc(100% + 0.6rem); }
  .app-bar .menu { inset-inline-start: 0; inset-inline-end: auto; }
  .app-bar .lang-menu { inset-inline-end: 0; }
}
  .app-bar nav a[href^="dashboard.html"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20width%3D%227%22%20height%3D%229%22%20x%3D%223%22%20y%3D%223%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%225%22%20x%3D%2214%22%20y%3D%223%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%229%22%20x%3D%2214%22%20y%3D%2212%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%225%22%20x%3D%223%22%20y%3D%2216%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20width%3D%227%22%20height%3D%229%22%20x%3D%223%22%20y%3D%223%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%225%22%20x%3D%2214%22%20y%3D%223%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%229%22%20x%3D%2214%22%20y%3D%2212%22%20rx%3D%221%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%225%22%20x%3D%223%22%20y%3D%2216%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E"); }
  .app-bar nav a[href^="invoice_builder.html"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M15%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V7Z%22%2F%3E%3Cpath%20d%3D%22M14%202v4a2%202%200%200%200%202%202h4%22%2F%3E%3Cpath%20d%3D%22M9%2015h6%22%2F%3E%3Cpath%20d%3D%22M12%2018v-6%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M15%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V7Z%22%2F%3E%3Cpath%20d%3D%22M14%202v4a2%202%200%200%200%202%202h4%22%2F%3E%3Cpath%20d%3D%22M9%2015h6%22%2F%3E%3Cpath%20d%3D%22M12%2018v-6%22%2F%3E%3C%2Fsvg%3E"); }
  .app-bar nav a[href^="clients.html"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2%22%2F%3E%3Ccircle%20cx%3D%229%22%20cy%3D%227%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M22%2021v-2a4%204%200%200%200-3-3.87%22%2F%3E%3Cpath%20d%3D%22M16%203.13a4%204%200%200%201%200%207.75%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2%22%2F%3E%3Ccircle%20cx%3D%229%22%20cy%3D%227%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M22%2021v-2a4%204%200%200%200-3-3.87%22%2F%3E%3Cpath%20d%3D%22M16%203.13a4%204%200%200%201%200%207.75%22%2F%3E%3C%2Fsvg%3E"); }
  .app-bar nav a[href^="expenses.html"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%202v20l2-1%202%201%202-1%202%201%202-1%202%201%202-1%202%201V2l-2%201-2-1-2%201-2-1-2%201-2-1-2%201Z%22%2F%3E%3Cpath%20d%3D%22M16%208h-6a2%202%200%201%200%200%204h4a2%202%200%201%201%200%204H8%22%2F%3E%3Cpath%20d%3D%22M12%2017.5v-11%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%202v20l2-1%202%201%202-1%202%201%202-1%202%201%202-1%202%201V2l-2%201-2-1-2%201-2-1-2%201-2-1-2%201Z%22%2F%3E%3Cpath%20d%3D%22M16%208h-6a2%202%200%201%200%200%204h4a2%202%200%201%201%200%204H8%22%2F%3E%3Cpath%20d%3D%22M12%2017.5v-11%22%2F%3E%3C%2Fsvg%3E"); }
  .app-bar nav a[href^="products.html"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7.5%204.27%209%205.15%22%2F%3E%3Cpath%20d%3D%22M21%208a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016Z%22%2F%3E%3Cpath%20d%3D%22m3.3%207%208.7%205%208.7-5%22%2F%3E%3Cpath%20d%3D%22M12%2022V12%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m7.5%204.27%209%205.15%22%2F%3E%3Cpath%20d%3D%22M21%208a2%202%200%200%200-1-1.73l-7-4a2%202%200%200%200-2%200l-7%204A2%202%200%200%200%203%208v8a2%202%200%200%200%201%201.73l7%204a2%202%200%200%200%202%200l7-4A2%202%200%200%200%2021%2016Z%22%2F%3E%3Cpath%20d%3D%22m3.3%207%208.7%205%208.7-5%22%2F%3E%3Cpath%20d%3D%22M12%2022V12%22%2F%3E%3C%2Fsvg%3E"); }
  .app-bar nav a[href^="reports.html"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203v18h18%22%2F%3E%3Cpath%20d%3D%22M18%2017V9%22%2F%3E%3Cpath%20d%3D%22M13%2017V5%22%2F%3E%3Cpath%20d%3D%22M8%2017v-3%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203v18h18%22%2F%3E%3Cpath%20d%3D%22M18%2017V9%22%2F%3E%3Cpath%20d%3D%22M13%2017V5%22%2F%3E%3Cpath%20d%3D%22M8%2017v-3%22%2F%3E%3C%2Fsvg%3E"); }

/* ------------------------------------------------------ application body */
.app-body.bg-desk, .app-body { background: var(--b-background); }
.ledger { background: var(--b-ink); }
.metric-value { font-family: var(--b-font-display); letter-spacing: -0.03em; }
html[lang="ar"] .metric-value { font-family: var(--b-font-arabic); letter-spacing: 0; }
.filter[aria-pressed="true"] { background: var(--b-primary); color: #fff; }

/* ------------------------------------------------------ the invoice sheet */
.sheet-stack::before, .sheet-stack::after { display: none; }
.sheet { border-top: 0.45rem solid var(--sheet-accent, var(--b-sheet)); border-radius: 0.5rem; padding-top: 2rem; }
.sheet-title { font-family: var(--b-font-display); font-weight: 700; letter-spacing: -0.03em; font-size: 1.6rem; }
html[lang="ar"] .sheet-title { font-family: var(--b-font-arabic); letter-spacing: 0; }
.sheet-items th { background: var(--sheet-accent, var(--b-sheet)); color: #fff; font-weight: 600; border-bottom: 0; padding-inline: 0.6rem; }
.sheet-items th:first-child { border-start-start-radius: 0.35rem; border-end-start-radius: 0.35rem; }
.sheet-items th:last-child { border-start-end-radius: 0.35rem; border-end-end-radius: 0.35rem; }
.sheet-items td { padding-inline: 0.6rem; border-bottom: 1px solid var(--b-border); }
.sheet-items tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--b-background) 70%, #fff); }

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