/* Merci MyLens — page parts on top of app.css (tokens --ml-*). Day + night via data-bs-theme. */
:root, [data-bs-theme="light"] { --ml-gold-text: #7A5C0E; --ml-gold-wash: #fbf6e8; --ml-code-bg: #1b1f27; --ml-code-ink: #e8e2cf; --ml-ok: #1b7a43; --ml-warn: #9a6400; --ml-bad: #b42318; }
[data-bs-theme="dark"] { --ml-gold-text: #D4B45E; --ml-gold-wash: #1f1a0d; --ml-code-bg: #0b0d12; --ml-code-ink: #e8e2cf; --ml-ok: #4ccf86; --ml-warn: #f0b545; --ml-bad: #ff8a80; }

/* ---------- public site ---------- */
.pub-top { background: color-mix(in srgb, var(--ml-surface) 92%, transparent); }
.eyebrow { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--ml-gold-text); margin-bottom: 14px; }
.gold { color: var(--ml-gold-text); }
.ml-hero { position: relative; overflow: hidden; padding: 64px 0 48px; }
.ml-hero::before { content: ""; position: absolute; right: -140px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: var(--ml-gold); opacity: .18; filter: blur(70px); pointer-events: none; }
.ml-hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 300; line-height: 1.08; letter-spacing: -.025em; }
.ml-hero .lead { font-size: 1.12rem; color: var(--ml-muted); max-width: 600px; }
.ml-hero .fine { font-size: 13px; color: var(--ml-muted); margin-top: 14px; }
.ml-grid2 { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 992px) { .ml-grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.ml-sec { padding: 64px 0; }
.ml-sec.alt { background: var(--ml-surface); border-top: 1px solid var(--ml-border); border-bottom: 1px solid var(--ml-border); }
.ml-sec h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 300; letter-spacing: -.02em; }
.ml-sec .sub { color: var(--ml-muted); max-width: 680px; }
.dot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.dot-list li { display: flex; gap: 12px; font-size: 15px; }
.dot-list li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--ml-gold); }

/* demo widget (illustration) */
.demo { border: 1px solid var(--ml-border); border-radius: 18px; background: var(--ml-surface); box-shadow: var(--ml-shadow); overflow: hidden; }
.demo-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--ml-border); }
.demo-head img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.demo-head .q { font-size: 13px; color: var(--ml-muted); }
.demo-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; }
.demo-res figure { margin: 0; border: 1px solid var(--ml-border); border-radius: 12px; overflow: hidden; background: var(--ml-surface-2); }
.demo-res img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.demo-res figcaption { padding: 7px 8px; font-size: 12px; }
.demo-res figcaption b { display: block; font-size: 12.5px; }
.demo-foot { padding: 10px 16px; font-size: 12px; color: var(--ml-muted); border-top: 1px solid var(--ml-border); }
.mtag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.mtag.exact { background: var(--ml-gold); color: #0d0d0d; }
.mtag.like { background: var(--ml-brand-soft); color: var(--ml-gold-text); }
.mtag.words { background: var(--ml-surface-2); color: var(--ml-ink); border: 1px solid var(--ml-border); }

.stats-band { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--ml-border); border: 1px solid var(--ml-border); border-radius: 16px; overflow: hidden; }
@media (min-width: 768px) { .stats-band { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats-band div { background: var(--ml-surface); padding: 22px 18px; text-align: center; }
.stats-band b { display: block; font-size: 1.7rem; font-weight: 300; color: var(--ml-gold-text); }
.stats-band span { font-size: 13px; color: var(--ml-muted); }

.steps3 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .steps3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step-card { border: 1px solid var(--ml-border); border-radius: 16px; padding: 22px; background: var(--ml-surface); }
.step-card .n { font-family: ui-monospace, Menlo, monospace; color: var(--ml-gold-text); font-size: 13px; letter-spacing: .2em; }
.step-card h3 { font-size: 1.1rem; margin: 10px 0 8px; }
.step-card p { color: var(--ml-muted); font-size: 14.5px; margin: 0; }

.tiles { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { border: 1px solid var(--ml-border); border-radius: 16px; padding: 20px; background: var(--ml-surface); height: 100%; }
.tile h3 { font-size: 1.02rem; margin-bottom: 6px; }
.tile p { color: var(--ml-muted); font-size: 14px; margin: 0; }
.tile i { font-size: 22px; color: var(--ml-gold-text); display: block; margin-bottom: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 576px) { .photo-grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .photo-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.photo-grid figure { margin: 0; border: 1px solid var(--ml-border); border-radius: 16px; overflow: hidden; background: var(--ml-surface); }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photo-grid figcaption { padding: 9px 11px; font-size: 12.5px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid var(--ml-border); background: var(--ml-surface); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; }
.word-rows { display: grid; gap: 10px; }
.word-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--ml-border); border-radius: 12px; padding: 10px; background: var(--ml-surface); }
.word-row img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; flex: 0 0 52px; }
.word-row .t { min-width: 0; flex: 1; font-size: 13px; color: var(--ml-muted); }
.word-row .t b { display: block; color: var(--ml-ink); font-size: 14px; }
.search-mock { display: flex; align-items: center; gap: 10px; border: 1px solid var(--ml-border); border-radius: 12px; padding: 10px 14px; background: var(--ml-surface); margin-bottom: 10px; font-size: 14px; }

/* plans */
.plan-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--ml-border); border-radius: 18px; padding: 24px 20px; background: var(--ml-surface); box-shadow: var(--ml-shadow); }
.plan-card.is-featured { border: 2px solid var(--ml-gold); }
.plan-flag { position: absolute; top: -12px; left: 20px; background: var(--ml-gold); color: #0d0d0d; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .03em; }
.plan-card h3 { font-size: 1.15rem; margin: 0; }
.plan-cap { color: var(--ml-muted); font-size: 14px; margin: 4px 0 12px; }
.plan-price { margin: 0; } .plan-price .amt { font-size: 2rem; font-weight: 300; } .plan-price .per { color: var(--ml-muted); font-size: 14px; }
.plan-sub { color: var(--ml-muted); font-size: 13px; margin: 2px 0 14px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 7px; font-size: 14px; flex: 1; }
.plan-list i { color: var(--ml-gold-text); margin-right: 6px; }
.plan-card .btn { width: 100%; }
.plan-card.is-current { outline: 3px solid rgba(var(--bs-primary-rgb), .35); outline-offset: 2px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--ml-border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ml-gold-text); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ml-muted); margin: 10px 0 0; }
.cta-band { text-align: center; padding: 72px 0; }
.cta-band h2 { font-weight: 300; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

/* ---------- API docs ---------- */
.api-docs h3 { font-size: 1.35rem; }
.api-pill { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; background: var(--ml-brand-soft); color: var(--ml-gold-text); padding: 3px 10px; border-radius: 999px; }
.api-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin: 18px 0 8px; }
@media (min-width: 992px) { .api-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.api-card { border: 1px solid var(--ml-border); border-radius: 14px; padding: 16px; background: var(--ml-surface-2); }
.api-card h4 { font-size: 15px; } .api-card p { font-size: 14px; margin: 0; color: var(--ml-muted); }
.api-card i { color: var(--ml-gold-text); }
.api-ep { font-size: 1.05rem; margin: 28px 0 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.api-ep .m { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 8px; margin-right: 6px; vertical-align: 2px; font-family: Inter, sans-serif; }
.m-get { background: #e3f2ea; color: #135c33; } .m-post { background: var(--ml-gold); color: #0d0d0d; }
[data-bs-theme="dark"] .m-get { background: #12301f; color: #6fdc9c; }
.api-params { font-size: 14px; } .api-params td:first-child { white-space: nowrap; }
.code-wrap { position: relative; margin: 10px 0 14px; }
.code { background: var(--ml-code-bg); color: var(--ml-code-ink); border-radius: 12px; padding: 16px 16px; font-size: 13px; line-height: 1.55; overflow-x: auto; margin: 0; white-space: pre; }
.code code { color: inherit; }
.code-copy { position: absolute; top: 8px; right: 8px; min-height: 32px; background: rgba(255,255,255,.1); color: #e8e2cf; border: 1px solid rgba(255,255,255,.18); font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.code-copy:hover { background: rgba(255,255,255,.18); color: #fff; }
.api-tabs .nav-link { color: var(--ml-ink); border-radius: 999px; min-height: 38px; }
.api-tabs .nav-link.active { background: var(--ml-gold); color: #0d0d0d; }

/* ---------- panel ---------- */
.proj-pick { min-width: 150px; max-width: 210px; }
.proj-pick .form-select { min-height: 40px; }
.topbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.state-card { border-left: 5px solid var(--ml-gold); }
.state-card.is-active { border-left-color: var(--ml-ok); } .state-card.is-expired, .state-card.is-not_linked { border-left-color: var(--ml-bad); }
.state-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--ml-muted); }
.state-dot.ok { background: var(--ml-ok); } .state-dot.bad { background: var(--ml-bad); } .state-dot.warn { background: var(--ml-warn); }
.img-meter-bar { height: 10px; border-radius: 999px; background: var(--ml-surface-2); border: 1px solid var(--ml-border); overflow: hidden; }
.img-meter-bar span { display: block; height: 100%; background: var(--ml-gold); }
.img-meter.is-near .img-meter-bar span { background: #e0a43a; } .img-meter.is-over .img-meter-bar span { background: var(--ml-bad); }
.img-meter-tx { font-size: 13px; color: var(--ml-muted); margin-top: 6px; }
.img-meter.is-over .img-meter-tx { color: var(--ml-bad); }
.gal { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 576px) { .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .gal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .gal { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.gal-it { position: relative; border: 1px solid var(--ml-border); border-radius: 14px; overflow: hidden; background: var(--ml-surface); display: flex; flex-direction: column; min-width: 0; }
.gal-it button.gal-open { border: 0; padding: 0; background: var(--ml-surface-2); display: block; width: 100%; cursor: zoom-in; }
.gal-it img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gal-it .gal-tx { padding: 8px 10px; font-size: 12.5px; min-width: 0; }
.gal-it .gal-tx b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-it .gal-tx span { color: var(--ml-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-it .gal-n { position: absolute; top: 8px; right: 8px; background: rgba(13,13,13,.72); color: #fff; font-size: 11px; border-radius: 999px; padding: 2px 8px; }
.gal-it .gal-pct { position: absolute; top: 8px; left: 8px; }
.gal-it .gal-like { border: 0; border-top: 1px solid var(--ml-border); background: transparent; color: var(--ml-gold-text); font-size: 12.5px; font-weight: 600; min-height: 38px; }
.gal-it .gal-like:hover { background: var(--ml-brand-soft); }
.ml-lightbox .modal-content { background: var(--ml-surface); }
.ml-lightbox .lb-img { width: 100%; max-height: 70vh; object-fit: contain; background: var(--ml-surface-2); border-radius: 12px; }
.ml-lightbox .lb-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ml-lightbox .lb-thumbs button { border: 2px solid transparent; border-radius: 8px; padding: 0; background: none; }
.ml-lightbox .lb-thumbs button.on { border-color: var(--ml-gold); }
.ml-lightbox .lb-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.sbox { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .sbox { grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; } }
.drop { border: 2px dashed var(--ml-border); border-radius: 14px; padding: 18px; text-align: center; color: var(--ml-muted); cursor: pointer; background: var(--ml-surface-2); }
.drop.on, .drop:hover { border-color: var(--ml-gold); color: var(--ml-ink); }
.drop img { max-height: 120px; border-radius: 10px; margin-top: 8px; }
.key-once { background: var(--ml-gold-wash); border: 1px solid var(--ml-gold); border-radius: 12px; padding: 14px; }
.key-once code { font-size: 14px; overflow-wrap: anywhere; color: var(--ml-ink); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tbl-cards td, .tbl-cards th { vertical-align: middle; }
@media (max-width: 767.98px) {
  .tbl-cards thead { display: none; }
  .tbl-cards tr { display: block; border: 1px solid var(--ml-border); border-radius: 12px; margin-bottom: 10px; padding: 6px 10px; background: var(--ml-surface); }
  .tbl-cards td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; text-align: right; overflow-wrap: anywhere; }
  .tbl-cards td::before { content: attr(data-label); font-weight: 600; color: var(--ml-muted); text-align: left; flex: 0 0 auto; }
  .tbl-cards td[data-label=""]::before { content: none; }
}
.chart-box { width: 100%; height: 300px; }

/* invoice (screen + A4 print) */
.inv { max-width: 820px; margin: 0 auto; background: #fff; color: #0d0d0d; border-radius: 12px; border: 1px solid #e6e1d2; padding: 34px 38px; font-size: 13px; }
.inv h1 { font-size: 22px; margin: 0; letter-spacing: .02em; }
.inv .inv-band { background: #fbf6e8; border: 1px solid #efe4c4; border-radius: 10px; padding: 12px 14px; }
.inv table { width: 100%; border-collapse: collapse; }
.inv .it th { background: #f6efd9; text-align: left; padding: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.inv .it td { padding: 8px; border-bottom: 1px solid #eee7d3; }
.inv .r { text-align: right; } .inv .tot td { font-weight: 700; font-size: 14px; border-top: 2px solid #0d0d0d; border-bottom: 0; }
.inv .muted { color: #55524a; } .inv .gold-rule { height: 4px; background: #C9A84C; border-radius: 4px; margin: 14px 0 18px; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .no-print, .topbar, .sidebar, .alert { display: none !important; }
  .content, .page { margin: 0 !important; padding: 0 !important; }
  .inv { border: 0; padding: 0; max-width: none; }
}
/* Company logo: home "Trusted by" strip + Profile preview (app/lib/brand.php) */
.brands-strip { padding: 28px 0 32px; margin-bottom: 1.5rem; border-top: 1px solid var(--ml-border); border-bottom: 1px solid var(--ml-border); background: var(--ml-surface-2); }
.brands-h { text-align: center; color: var(--ml-muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.brand-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; }
.brand-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 140px; text-align: center; }
.brand-item img { max-width: 120px; max-height: 48px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 6px; }
.brand-mono { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--ml-surface); border: 1px solid var(--ml-border); color: var(--ml-ink); font-size: 17px; font-weight: 700; }
.brand-item span { font-size: 12.5px; font-weight: 600; color: var(--ml-ink); line-height: 1.25; overflow-wrap: anywhere; }
.logo-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px; border: 1px dashed var(--ml-border); border-radius: 10px; background: #fff; }
.logo-preview img { max-width: 160px; max-height: 64px; object-fit: contain; }
.logo-preview span { color: #1d2330; }
@media (max-width: 575.98px) { .brand-row { gap: 14px; } .brand-item { width: calc(50% - 7px); } }
