/* Rilayer · apple-inspired.css — override finale, da collegare per ultimo.
   Precisione sobria: system font, superfici charcoal arrotondate, quasi nessun bordo,
   nero #08080a, accenti magenta/arancio solo su logo e CTA. Non tocca `display` di
   .filters / .filter-toggle: il comportamento mobile Mostra/Nascondi resta al JS. */

:root {
  --ap-bg: #08080a; --ap-surface: #161618; --ap-surface-2: #1e1e21; --ap-text: #f5f5f7; --ap-muted: #9a9aa3;
  --ap-hair: rgba(255,255,255,.07); --ap-magenta: #e879f9; --ap-orange: #fb923c;
  --ap-grad: linear-gradient(100deg, #e879f9, #fb923c); --ap-ease: cubic-bezier(.25,.1,.25,1);
  --ap-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Arial, Rilayer, sans-serif;
}

/* ── Base ─────────────────────────────────────────────────────────── */
html { background: var(--ap-bg); }
html body, html body button, html body input, html body select, html body textarea, html body .logo,
html body h1, html body h2, html body h3 { font-family: var(--ap-font); }
html body { background: var(--ap-bg); color: var(--ap-text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
html body::before { background: radial-gradient(70vw 40vw at 50% -20%, rgba(124,58,237,.12), transparent 70%); }
html body::after { background: none; animation: none; opacity: 0; }
html body h1, html body h2, html body h3 { font-weight: 600; letter-spacing: -.022em; color: var(--ap-text); -webkit-text-fill-color: var(--ap-text); background: none; text-transform: none; }
html body h1 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.06; margin: 6px 0 10px; }
html body h2 { font-size: 26px; }
html body p, html body dd { color: var(--ap-text); }
html body .muted, html body .intro p, html body label, html body dt, html body .toolbar label, html body footer { color: var(--ap-muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
html body .eyebrow { font-size: 14px; font-weight: 500; color: var(--ap-muted); text-transform: none; letter-spacing: 0; }
html body .intro p { font-size: 17px; line-height: 1.45; }
html body ::selection { background: rgba(232,121,249,.35); }

/* ── Avviso, nav traslucida, logo ─────────────────────────────────── */
html body .notice { background: rgba(255,255,255,.04); color: var(--ap-muted); font-size: 12.5px; border: 0; letter-spacing: 0; text-transform: none; }
html body header {
  position: sticky; top: 0; z-index: 5; padding: 12px 5%; gap: 16px; border: 0;
  background: rgba(8,8,10,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 -1px 0 var(--ap-hair);
}
html body .logo { font-size: 24px; font-weight: 700; letter-spacing: -.03em; text-transform: none; background: var(--ap-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
html body nav { gap: 2px; }

/* ── Pulsanti pill ────────────────────────────────────────────────── */
html body button { font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--ap-grad); color: #08080a; transition: background-color .2s var(--ap-ease), color .2s, transform .15s var(--ap-ease), box-shadow .2s, filter .2s; }
html body button:hover { filter: brightness(1.05); box-shadow: 0 8px 24px -12px rgba(232,121,249,.55); }
html body button:active { transform: scale(.98); }
html body button.secondary, html body button.close, html body button.heart { background: var(--ap-surface-2); color: var(--ap-text); border: 0; box-shadow: none; }
html body button.secondary:hover, html body button.close:hover, html body button.heart:hover { background: #2a2a2e; filter: none; box-shadow: none; }
html body nav button.secondary { background: transparent; color: var(--ap-muted); padding: 8px 14px; }
html body nav button.secondary:hover { color: var(--ap-text); background: rgba(255,255,255,.06); }
html body button.heart { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; color: var(--ap-muted); }
html body button.heart[aria-pressed="true"] { color: var(--ap-magenta); background: rgba(232,121,249,.12); }
html body .card button:not(.heart) { font-size: 13px; padding: 9px 15px; }
html body .filters button.secondary, html body #filter-toggle { background: var(--ap-surface); }

/* ── Campi e focus ────────────────────────────────────────────────── */
html body input, html body select, html body textarea { font-size: 15px; padding: 11px 14px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--ap-surface-2); color: var(--ap-text); box-shadow: inset 0 0 0 1px var(--ap-hair); }
html body input:focus-visible, html body select:focus-visible, html body textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--ap-orange), 0 0 0 4px rgba(251,146,60,.28); border-color: transparent; }
html body :focus-visible { outline: 2px solid var(--ap-orange); outline-offset: 3px; box-shadow: none; }
html body button:focus-visible { outline-offset: 2px; }
html body input[type="file"]::file-selector-button { font-family: var(--ap-font); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; border: 0; border-radius: 999px; padding: 7px 14px; background: #2a2a2e; color: var(--ap-text); }
html body .search-input input { border-radius: 14px; background: var(--ap-surface); border: 0; padding: 15px 18px 15px 48px; }
html body .searchbar > label { color: var(--ap-muted) !important; }

/* ── Catalogo ─────────────────────────────────────────────────────── */
html body main { padding: 32px 5% 64px; }
html body .intro { margin-bottom: 28px; gap: 40px; }
html body .layout { gap: 36px; }
html body .filters { background: transparent; border: 0; padding: 4px 0; gap: 16px; }
html body .filter-heading { font-size: 15px; font-weight: 600; color: var(--ap-text); }
html body .filters label { font-size: 13px; }
html body .toolbar { border: 0; padding: 0; margin-bottom: 18px; }
html body .toolbar select { margin-top: 0; padding: 8px 34px 8px 14px; border-radius: 999px; font-size: 14px; }
html body #count { font-size: 14px; letter-spacing: 0; text-transform: none; }
html body .grid { gap: 20px; }

/* ── Schede: foto protagonista, superficie liscia, glow tenue ─────── */
html body .card { background: var(--ap-surface); border: 0; border-radius: 22px; box-shadow: 0 0 0 1px var(--ap-hair); transition: transform .3s var(--ap-ease), box-shadow .3s var(--ap-ease); }
html body .card:hover, html body .card:focus-within { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 24px 48px -28px rgba(232,121,249,.35); }
html body .art { height: 210px; border: 0; background: #1c1c1f; }
html body .art.resina { background: #1e1a24; }
html body .art svg { height: 165px; width: 185px; }
html body .art svg ellipse { fill: #000; opacity: .35; }
html body .art svg path:nth-of-type(1) { stroke: #8e8e96; } html body .art svg path:nth-of-type(2) { fill: #2c2c31; }
html body .art svg path:nth-of-type(3) { stroke: #55555e; } html body .art svg path:nth-of-type(4) { fill: #232327; }
html body .art svg path:nth-of-type(5) { stroke: var(--ap-orange); } html body .art svg path:nth-of-type(6) { fill: var(--ap-orange); }
html body .art svg path:nth-of-type(7) { stroke: rgba(8,8,10,.45); } html body .art.resina svg path:nth-of-type(6) { fill: #c084fc; }
html body .badge { left: 14px; top: 14px; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 4px 9px; border-radius: 999px; border: 0; background: rgba(8,8,10,.55); color: #d4d4d8; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html body .cardbody { padding: 18px 20px 20px; }
html body .card h3 { font-size: 18px; font-weight: 600; margin: 6px 0 4px; line-height: 1.3; }
html body .price { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin: 12px 0; color: var(--ap-text); -webkit-text-fill-color: var(--ap-text); background: none; }
html body .tag { border: 0; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--ap-text); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
/* Stato dell'annuncio nella vista del proprietario: testo + punto, mai solo colore */
html body .status-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--ap-muted); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
html body .status-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
html body .status-tag.is-pending_review { color: var(--ap-orange); }
html body .status-tag.is-active { color: var(--ap-magenta); }
html body .status-tag.is-rejected { color: #fca5a5; }
html body .status-reason { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: var(--ap-text); }
html body .status-reason b { color: #fca5a5; font-weight: 600; }
html body .empty { background: var(--ap-surface); border: 0; border-radius: 22px; }

/* ── Modulo, dialog, toast, footer ────────────────────────────────── */
html body .panel { background: var(--ap-surface); border: 0; border-radius: 24px; padding: 36px; -webkit-backdrop-filter: none; backdrop-filter: none; }
html body .panel h2 { font-size: 17px; font-weight: 600; color: var(--ap-text); }
html body .step { border-top: 1px solid var(--ap-hair); margin-top: 30px; padding-top: 24px; }
html body .preview { border: 0; border-radius: 12px; }
html body dialog { background: var(--ap-surface); border: 0; border-radius: 24px; padding: 36px; box-shadow: 0 0 0 1px var(--ap-hair), 0 40px 100px -30px rgba(0,0,0,.9); }
html body dialog::backdrop { background: rgba(8,8,10,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
html body .detail .art { border-radius: 16px; }
html body dialog form { border-top: 1px solid var(--ap-hair); }
html body dialog b { font-family: var(--ap-font); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ap-orange); }
html body .toast { font-family: var(--ap-font); font-size: 14px; font-weight: 500; letter-spacing: 0; padding: 14px 22px; border: 0; border-radius: 999px; background: rgba(30,30,33,.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--ap-hair), 0 16px 40px -16px rgba(0,0,0,.8); }
html body footer { border-top: 1px solid var(--ap-hair); background: transparent; font-size: 12.5px; line-height: 1.7; }

/* ── Movimento delicato ───────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html body .card { animation: ap-in .5s var(--ap-ease) both; }
  html body .card:nth-child(2) { animation-delay: 50ms; } html body .card:nth-child(3) { animation-delay: 100ms; } html body .card:nth-child(n+4) { animation-delay: 150ms; }
  html body dialog[open] { animation: ap-pop .28s var(--ap-ease); }
  html body .toast { animation: ap-toast .28s var(--ap-ease); }
  @keyframes ap-in { from { opacity: 0; transform: translateY(6px); } }
  @keyframes ap-pop { from { opacity: 0; transform: scale(.97); } }
  @keyframes ap-toast { from { opacity: 0; transform: translate(-50%, 8px); } }
}
@media (prefers-reduced-motion: reduce) { html body .card, html body dialog[open], html body .toast { animation: none; } html body .card:hover { transform: none; } html body button:active { transform: none; } }

/* ── Mobile: filtri compatti dentro il pannello a comparsa ─────────── */
@media (max-width: 650px) {
  html body header { padding: 10px 5%; }
  html body h1 { font-size: 32px; }
  html body #filter-toggle { border-radius: 14px; padding: 12px 16px; }
  html body .filters.is-open { background: var(--ap-surface); border-radius: 18px; padding: 16px; gap: 12px; margin-top: 10px; }
  html body .filters input, html body .filters select { padding: 9px 12px; font-size: 14px; }
  html body .art { height: 220px; }
  html body .panel, html body dialog { padding: 22px; border-radius: 20px; }
}
