/* dashboard.css — Dashboard: i fogli provini degli album.
   Un pezzo del foglio di PicSelect: l'ordine dei pezzi conta (la cascata) ed è in assets/app.js. */

/* ============================================================
   Dashboard — fogli provini.
   Ogni album è una striscia di provini su un fondo scuro che NON
   segue il tema: le foto si giudicano sempre sullo stesso neutro
   (tavolo luminoso). Sotto, la "battuta" del provino stampato:
   titolo + riga tecnica in monospace (la voce delle annotazioni
   EXIF). Niente webfont, niente JS: solo stack di sistema.
   ============================================================ */

:root {
    --sheet: #17171a;        /* fondo striscia, identico nei due temi */
    --sheet-note: #8f8f98;   /* annotazioni sul fondo scuro */
    --frame: clamp(72px, 14vw, 108px);
    --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* riga tecnica sotto il titolo di pagina: quanti album, quante foto */
.dash-stat {
    margin: .15rem 0 0;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.sheet-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: grid;
    gap: 1rem;
}

.sheet {
    position: relative; /* àncora del link steso su tutta la striscia */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .12s, box-shadow .12s;
}

.sheet:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.sheet:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* la striscia: provini quadrati flush, tagliati vivi dal bordo destro
   come un foglio rifilato — nessuna media query per contarli */
.sheet-band {
    display: flex;
    gap: 2px;
    height: var(--frame);
    overflow: hidden;
    background: var(--sheet);
}

.sheet-frame {
    width: var(--frame);
    height: var(--frame);
    flex: none;
    object-fit: cover;
    background: #26262b; /* segnaposto mentre carica, sul fondo scuro */
}

/* senza provini la striscia si assottiglia: spessa = c'è materiale,
   sottile = solo una nota (vuoto / zero-knowledge) */
.sheet-band--note {
    height: auto;
    padding: .6rem 0;
}

/* annotazione al posto dei provini: album vuoto, o zero-knowledge
   (il server non può mostrare anteprime: la striscia lo dice) */
.sheet-note {
    align-self: center;
    padding: 0 1rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sheet-note);
}

/* la battuta: il margine stampato sotto i provini */
.sheet-rebate {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .2rem .6rem;
    padding: .6rem .9rem;
}

.sheet-title {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* tutta la striscia è UN link (niente link annidati, niente JS) */
.sheet-title::after {
    content: '';
    position: absolute;
    inset: 0;
}

.sheet-rebate .enc-badge {
    margin-left: 0;
}

.sheet-meta {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    white-space: nowrap;
}

.sheet-open {
    margin-left: .6rem;
    transition: color .12s;
}

.sheet:hover .sheet-open {
    color: var(--accent);
}

/* archivio vuoto: un foglio ancora da riempire, non un errore */
.sheet-empty {
    margin-top: 2rem;
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
}

.sheet-empty p {
    margin: 0 0 .5rem;
}

.sheet-empty .btn {
    margin-top: .75rem;
}
