@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --black: #0B0B0C; --brand: #465FFF; --bg: #F6F7F8; --card: #FFFFFF; --text: #0B0B0C;
  --muted: #667085; --line: #E5E7EB; --ok: #16845B; --warn: #B7791F; --danger: #C83D4D;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; font-size: 14px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.ghost-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); }
.btn.big { padding: 15px 26px; font-size: 17px; border-radius: 12px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* Barra superiore */
.bar { position: sticky; top: 0; z-index: 10; background: var(--black); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px; }
.bar img { height: 22px; width: auto; display: block; }
.bar .r { display: flex; gap: 8px; align-items: center; }
.bar .btn { padding: 8px 14px; border-radius: 8px; }

/* Vetrina */
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #AEB9FF; margin-bottom: 18px; }
.eyebrow.dark { color: var(--brand); margin-bottom: 10px; }

.hero { position: relative; color: #fff; background: #0B0B0C url("img/bg-login-wide.jpg") center / cover no-repeat; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(to bottom, transparent, rgba(11,11,12,.55)); pointer-events: none; }
.hero-in { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: clamp(40px, 9vh, 96px) 24px clamp(44px, 9vh, 100px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; align-items: center; }
.hero h1 { margin: 0 0 18px; font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.025em; font-weight: 700; }
.hero p { margin: 0 0 30px; max-width: 520px; color: rgba(255,255,255,.76); font-size: clamp(16px, 1.8vw, 19px); }
.hero-img img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 50px rgba(0,0,0,.45)); }
@media (max-width: 860px) {
  .hero { background-image: url("img/bg-login-phone.jpg"); }
  .hero-in { grid-template-columns: 1fr; text-align: center; padding-top: 44px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-img { order: -1; max-width: 340px; margin: 0 auto; }
}

.section { max-width: 1040px; margin: 0 auto; padding: 72px 24px 8px; }
.section h2 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; line-height: 1.1; }
.lead { margin: 0 0 32px; color: var(--muted); max-width: 640px; font-size: 18px; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.value { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.value h3 { margin: 14px 0 6px; font-size: 18px; }
.value p { margin: 0; color: var(--muted); font-size: 15px; }
.vi { width: 44px; height: 44px; border-radius: 12px; background: #EEF1FF; color: var(--brand); display: grid; place-items: center; }

.scenes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.scene { margin: 0; position: relative; border-radius: 18px; overflow: hidden; background: #0F1430; aspect-ratio: 4 / 3; }
.scene img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.scene:hover img { transform: scale(1.05); }
.scene figcaption { position: absolute; left: 14px; bottom: 14px; background: rgba(11,11,12,.72); color: #fff; backdrop-filter: blur(6px);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }

.cta { max-width: 1040px; margin: 72px auto 0; padding: 56px 24px; text-align: center; color: #fff; border-radius: 24px;
  background: #0B0B0C url("img/bg-login-wide.jpg") center / cover no-repeat; width: calc(100% - 40px); }
.cta h2 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.02em; }
.cta p { margin: 0 0 26px; color: rgba(255,255,255,.75); }
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; padding: 36px 24px calc(36px + env(safe-area-inset-bottom)); }
.foot img { opacity: .8; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .scene img { transition: none; } }

/* Tag usato nella home riservata */
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tag.on { background: #E3F4EC; color: var(--ok); }
.tag.soon { background: #F1F2F4; color: var(--muted); }
.ico { width: 40px; height: 40px; border-radius: 10px; background: #EEF1FF; color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 15px; }

/* Login */
.login { max-width: 380px; margin: 0 auto; padding: calc(9vh + env(safe-area-inset-top)) 24px 24px; text-align: center; }
.login .logo { width: 120px; height: auto; margin: 0 auto 10px; display: block; }
.login .payoff { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.login h1 { margin: 0 0 4px; font-size: 20px; }
.login form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; text-align: left; }
.login .back { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 14px; background: none; border: 0; cursor: pointer; }
input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
label.f { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* Home sistemi */
main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 48px; }
main h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.01em; }
main .sub { margin: 0 0 24px; color: var(--muted); }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.app { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  transition: border-color .15s, transform .15s; }
a.app:hover { border-color: var(--brand); transform: translateY(-2px); }
.app h3 { margin: 12px 0 4px; font-size: 18px; }
.app p { margin: 0; color: var(--muted); font-size: 14.5px; }
.app .go { margin-top: 14px; color: var(--brand); font-weight: 600; font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }

/* Admin */
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.c, th.c { text-align: center; }
td input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.inactive { opacity: .55; }
.back-link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; margin-bottom: 14px; font-size: 14px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--black); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
#toast.show { opacity: 1; transform: translateX(-50%); }
