/* Notifiche: campanella nella barra in alto, preferenze in Impostazioni, dati di fatturazione, pagina di disiscrizione. */
.nt-scope {
}

/* Campanella */
.nt-bell-wrap { position: relative; display: flex; align-items: center; }
.nt-bell {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--app-line); border-radius: 10px; background: var(--fg-surface); color: var(--ink);
}
.nt-bell:hover { background: var(--app-hover); }
.nt-bell .icon { width: 20px; height: 20px; }
.nt-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--fg-danger); color: var(--fg-surface); font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--fg-surface);
}
.nt-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: min(400px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 100px)); display: flex; flex-direction: column;
  background: var(--fg-surface); border: 1px solid var(--app-line); border-radius: 14px; box-shadow: 0 18px 40px #14213d26;
}
.nt-panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--app-line); }
.nt-panel-head h2 { margin-right: auto; font-size: 17px; letter-spacing: -.02em; }
.nt-panel-head h2:focus { outline: none; }
.nt-mark-all { font-size: 13px; }
.nt-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.nt-close:hover { background: var(--app-hover); }
.nt-status { margin: 0; padding: 0 18px; font-size: 13px; color: var(--muted); }
.nt-status:empty { display: none; }
.nt-panel > .nt-status { padding-top: 8px; }
.nt-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1 1 auto; }
.nt-empty { padding: 22px 14px; font-size: 14px; color: var(--muted); text-align: center; }
.nt-item + .nt-item { border-top: 1px solid var(--fg-neutral-soft); }
.nt-item-button {
  display: grid; gap: 4px; width: 100%; padding: 11px 12px 11px 22px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; text-align: left; position: relative;
}
.nt-item-button:hover { background: var(--app-hover); }
.nt-unread .nt-item-button::before { content: ""; position: absolute; left: 8px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-brand); }
.nt-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nt-when { font-size: 12px; color: var(--muted); }
.nt-item-title { font-size: 14px; line-height: 1.35; font-weight: 650; }
.nt-unread .nt-item-title { font-weight: 780; }
.nt-item-meta { font-size: 12.5px; color: var(--muted); }
.nt-item-meta:empty { display: none; }
.nt-panel-foot { display: flex; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--app-line); }

/* Impostazioni e fatturazione */
.nt-settings, .nt-billing { margin-top: 18px; }
.nt-settings h3:focus { outline: none; }
.nt-hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 12px; }
.nt-notice { padding: 8px 11px; border-radius: 9px; background: var(--fg-warning-soft); color: #6b4600; }
.nt-form { display: grid; gap: 14px; }
.nt-form > .button { justify-self: start; }
.nt-fieldset { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--app-line); border-radius: 12px; }
.nt-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 750; }
.nt-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 600; }
.nt-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.nt-check span { display: grid; gap: 2px; }
.nt-check small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.nt-field { display: grid; gap: 4px; margin: 0; font-size: 13px; font-weight: 700; }
.nt-field select, .nt-field input { margin-top: 0; }
.nt-inline { max-width: 260px; padding-left: 28px; }
.nt-search { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(170px, 220px); align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--fg-neutral-soft); }
.nt-search:first-of-type { border-top: 0; }
.nt-search-name { display: grid; gap: 2px; min-width: 0; }
.nt-search-name strong { overflow-wrap: anywhere; }
.nt-search-name small { font-size: 12px; color: var(--aa-maybe); }
.nt-search .nt-field span { font-size: 12px; }
.nt-log { margin-top: 12px; }
.nt-log summary { cursor: pointer; font-size: 13.5px; font-weight: 700; }
.nt-log-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.nt-log-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: 9px; background: var(--fg-surface-2); font-size: 13px; }
.nt-log-item small { color: var(--muted); }
.nt-billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.nt-billing-ragioneSociale, .nt-billing-indirizzo { grid-column: 1 / -1; }
.nt-field-hint { font-size: 12px; font-weight: 500; color: var(--muted); }
.nt-error { font-size: 12.5px; font-weight: 650; color: var(--fg-danger); }
.nt-field input[aria-invalid="true"] { border-color: var(--fg-danger); }

@media (max-width: 700px) {
  .nt-panel { position: fixed; top: calc(var(--app-header, 65px) + 6px); left: 8px; right: 8px; width: auto; max-height: calc(100vh - var(--app-header, 65px) - 16px); }
  .nt-search { grid-template-columns: minmax(0, 1fr) auto; }
  .nt-search .nt-field { grid-column: 1 / -1; }
  .nt-billing-grid { grid-template-columns: minmax(0, 1fr); }
  .nt-inline { padding-left: 0; max-width: none; }
  .nt-item-button { min-height: 44px; }
}

/* Pagina di disiscrizione (fuori dall'app) */
.nt-page { margin: 0; min-height: 100vh; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px 16px; background: var(--fg-surface-2); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--fg-ink); }
.nt-page-card { box-sizing: border-box; width: min(520px, 100%); padding: 28px; background: var(--fg-surface); border: 1px solid var(--fg-line); border-radius: 14px; }
.nt-page .nt-page-brand { margin: 0 0 14px; font-weight: 800; color: #174b7a; }
.nt-page h1 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.02em; }
.nt-page p { margin: 0 0 14px; line-height: 1.5; color: #3b4760; }
.nt-page-button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 9px; background: #174b7a; color: var(--fg-surface); font: inherit; font-weight: 700; cursor: pointer; }
.nt-page-button:focus-visible { outline: 3px solid var(--fg-brand); outline-offset: 3px; }
.nt-page form { margin: 4px 0 16px; }
.nt-page-note { font-size: 14px; }
