/* Cartella importazioni del gestionale */

.fd-drop {
  display: grid; justify-items: center; gap: 10px; padding: 46px 24px 40px; text-align: center; cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.3s;
}
.fd-drop::after { content: ""; position: absolute; inset: 10px; border-radius: calc(var(--radius) - 6px); border: 1.5px dashed var(--line-strong); pointer-events: none; transition: border-color 0.3s, inset 0.4s var(--ease); }
.fd-drop:hover::after { border-color: rgb(var(--text-rgb) / 0.35); }
.fd-drop.over { transform: scale(1.01); }
.fd-drop.over::after { border-color: var(--text); inset: 6px; }
.fd-drop.busy { pointer-events: none; }
.fd-title { font-size: 21px; letter-spacing: -0.025em; }
.fd-drop .muted { max-width: 560px; font-size: 14px; }

.fd-folder { position: relative; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--text); color: var(--page); box-shadow: 0 16px 32px -14px rgb(var(--text-rgb) / 0.7); transition: transform 0.5s var(--ease); }
.fd-folder .ico { width: 28px; height: 28px; }
.fd-folder.sm { width: 42px; height: 42px; border-radius: 13px; box-shadow: none; }
.fd-folder.sm .ico { width: 20px; height: 20px; }
.fd-drop:hover .fd-folder { transform: translateY(-3px) rotate(-3deg); }
.fd-drop.over .fd-folder { transform: translateY(-6px) scale(1.08); }
.fd-pulse { position: absolute; inset: -6px; border-radius: 24px; border: 1.5px solid rgb(var(--text-rgb) / 0.25); animation: fd-pulse 2.4s var(--ease) infinite; }
.fd-drop.busy .fd-pulse { animation-duration: 0.9s; }
@keyframes fd-pulse { 0% { opacity: 0.9; transform: scale(0.92); } 100% { opacity: 0; transform: scale(1.25); } }

.fd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.fd-stats > .panel, .fd-stats > .panel + .panel { margin-top: 0; padding: 18px 20px; }
.fd-stats b { display: block; margin-top: 12px; font-family: var(--font-mono); font-weight: 400; font-size: 34px; letter-spacing: -0.04em; line-height: 1; }
.fd-stats b.fd-last { font-size: 24px; }

.fd-list { display: grid; gap: 8px; }
.fd-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 13px; background: rgb(var(--text-rgb) / 0.03); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.2s, transform 0.3s var(--ease); }
.fd-list > .fd-file:not(.clickable) { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.fd-file.clickable { cursor: pointer; }
.fd-file.clickable:hover { background: rgb(var(--text-rgb) / 0.06); transform: translateX(3px); }
.fd-file.arriving { animation: rise 0.45s var(--ease) both; background: rgb(var(--text-rgb) / 0.05); }
.fd-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgb(var(--text-rgb) / 0.06); color: var(--muted); }
.fd-ico .ico { width: 17px; height: 17px; }
.fd-ico.s-done { --c: var(--done); background: rgb(var(--c) / 0.12); color: rgb(var(--c)); }
.fd-ico.s-notdone { --c: var(--notdone); background: rgb(var(--c) / 0.12); color: rgb(var(--c)); }
.fd-name { display: grid; gap: 2px; min-width: 0; }
.fd-name b { font-weight: 500; }
.fd-when { color: var(--muted); white-space: nowrap; }
.fd-empty { padding: 22px; text-align: center; color: var(--muted); border-radius: 13px; box-shadow: inset 0 0 0 1px var(--line); }
.spinner.sm { width: 20px; height: 20px; margin: 0; }

.fd-more summary { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; list-style: none; }
.fd-more summary::-webkit-details-marker { display: none; }
.fd-more summary .ico { color: var(--label); }
.fd-more-body { display: grid; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.fd-more-body b { color: var(--text); font-weight: 500; }
.fd-more-body code.art { display: inline-block; margin-top: 8px; white-space: normal; word-break: break-all; line-height: 1.6; }

.fd-link { display: flex; align-items: center; gap: 16px; color: var(--text); transition: transform 0.35s var(--ease); }
.fd-link:hover { text-decoration: none; transform: translateY(-2px); }
.fd-link > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.fd-link b { font-weight: 500; }

@media (max-width: 880px) {
  .fd-stats { grid-template-columns: minmax(0, 1fr); }
  .fd-file, .fd-list > .fd-file:not(.clickable) { grid-template-columns: auto minmax(0, 1fr) auto; }
  .fd-file .fd-when, .fd-file .chip { display: none; }
}
.fd-stats + .panel { margin-top: 16px; }

/* interruttore "Anteprima prima di importare" sopra il riquadro */
.fd-drop-wrap { position: relative; }
.fd-switch { position: absolute; top: 22px; right: 24px; z-index: 2; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.fd-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fd-switch-track { position: relative; width: 34px; height: 20px; border-radius: 99px; background: rgb(var(--text-rgb) / 0.14); transition: background 0.3s; }
.fd-switch-track i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--panel-top); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1); }
.fd-switch input:checked + .fd-switch-track { background: var(--text); }
.fd-switch input:checked + .fd-switch-track i { transform: translateX(14px); }
.fd-switch input:focus-visible + .fd-switch-track { box-shadow: 0 0 0 3px rgb(var(--text-rgb) / 0.2); }
.fd-switch:hover { color: var(--text); }
@media (max-width: 640px) { .fd-switch { position: static; margin: 0 0 10px; } }

/* anteprima di un file prima della conferma */
.fd-preview { margin-top: 16px; animation: rise 0.5s var(--ease) both; }
.fd-pv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.fd-pv-head b { font-weight: 500; }
.fd-pv-head .ico { width: 18px; height: 18px; }
.fd-preview .row-actions { margin-top: 18px; }

/* ------------------------------------------------------------------ Registro importazioni: lista semplice per giorno */
.rl { padding: 22px 22px 14px; }
.rl-head { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.rl-count { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--text); color: var(--page); flex: none; line-height: 1; }
.rl-count b { font: 300 24px/1 var(--font-sans); letter-spacing: -0.03em; }
.rl-count span { font: 400 10px/1 var(--font-mono); opacity: 0.7; margin-top: -10px; }
.rl-head-txt { display: grid; gap: 3px; }
.rl-head-txt b { font-weight: 500; font-size: 16px; }
.rl-day { display: grid; gap: 4px; padding: 14px 0 6px; }
.rl-day > .label { padding: 0 12px 6px; }
.rl-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, auto) auto; align-items: center; gap: 16px;
  padding: 12px; border-radius: 14px; color: var(--text); transition: background 0.2s, transform 0.3s var(--ease);
}
.rl-row:hover { background: rgb(var(--text-rgb) / 0.045); text-decoration: none; transform: translateX(3px); }
.rl-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; --c: var(--done); background: rgb(var(--c) / 0.12); color: rgb(var(--c)); }
.rl-row.is-failed .rl-ico { --c: var(--notdone); }
.rl-ico .ico { width: 17px; height: 17px; }
.rl-main { display: grid; gap: 3px; min-width: 0; }
.rl-main b { font-weight: 500; font-size: 15px; }
.rl-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.rl-result { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.rl-pill { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 10px; border-radius: 99px; font-size: 12.5px; color: var(--muted); background: rgb(var(--text-rgb) / 0.05); white-space: nowrap; }
.rl-pill b { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.rl-pill.new { background: rgb(var(--done) / 0.1); }
.rl-pill.new b { color: rgb(var(--done)); }
.rl-pill.warn { background: rgb(var(--todo) / 0.12); }
.rl-pill.warn b { color: rgb(var(--todo)); }
.rl-pill.bad b { color: rgb(var(--notdone)); }
.rl-error { font-size: 13px; color: rgb(var(--notdone)); text-align: right; }
.rl-go { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: rgb(var(--text-rgb) / 0.05); transition: background 0.2s, color 0.2s; }
.rl-go .ico { width: 15px; height: 15px; }
.rl-row:hover .rl-go { background: var(--text); color: var(--page); }
@media (max-width: 760px) {
  .rl-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rl-result { grid-column: 2 / -1; justify-content: flex-start; }
  .rl-error { text-align: left; }
}

/* registro senza card: direttamente sulla pagina, separato da fili sottili */
.rl { padding: 8px 0 0; }
.rl-head { padding: 0 0 22px; margin-bottom: 4px; border-bottom: 1px solid var(--line); gap: 14px; }
.rl-count { width: 52px; height: 52px; border-radius: 15px; }
.rl-count b { font-size: 21px; }
.rl-head-txt b { font-size: 15px; }
.rl-day { gap: 0; padding: 22px 0 0; }
.rl-day > .label { padding: 0 0 8px; }
.rl-row { padding: 14px 10px; margin: 0 -10px; border-radius: 12px; border-top: 1px solid var(--line); }
.rl-day > .label + .rl-row { border-top-color: transparent; }
.rl-row:hover { background: rgb(var(--text-rgb) / 0.035); transform: none; }
.rl-row:hover, .rl-row:hover + .rl-row { border-top-color: transparent; }
.rl-ico { width: 34px; height: 34px; border-radius: 10px; }
.rl-pill { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.rl-pill.new { background: transparent; box-shadow: inset 0 0 0 1px rgb(var(--done) / 0.35); }
.rl-pill.warn { background: transparent; box-shadow: inset 0 0 0 1px rgb(var(--todo) / 0.4); }
.rl-pill.bad { box-shadow: inset 0 0 0 1px rgb(var(--notdone) / 0.35); }
.rl-go { background: transparent; }
