/* =========================================================
   Area file - Don Corrado Cannizzaro
   Foglio di stile unico, pensato prima per cellulare,
   poi adattato a tablet e computer.
   ========================================================= */

:root {
    --bg: #f7f3f1;
    --panel: #ffffff;
    --text: #172033;
    --muted: #5d6778;
    --line: #e4d9d6;
    --soft: #fbf8f7;
    --primary: #8e1a1d;
    --primary-dark: #6b1215;
    --brand: #631312;
    --accent: #9a5a2a;
    --danger: #b42318;
    --ok: #067647;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(23, 32, 51, .08);
    --gutter: 16px;
    --tap: 46px;               /* altezza minima comoda per il dito */
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
    font-size: 16px;           /* 16px evita lo zoom automatico di iPhone sui campi */
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    overflow-wrap: anywhere;
}

a { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h3 { font-size: 1.1rem; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 100;
    padding: 10px 14px; background: var(--brand); color: #fff; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid rgba(142, 26, 29, .4); outline-offset: 2px; }

/* ---------- Contenitore ---------- */
.shell {
    width: min(1180px, 100% - 2 * var(--gutter));
    margin: 0 auto;
    padding: 20px 0 calc(48px + env(safe-area-inset-bottom));
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .75rem;
}

.page-title { margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; }

/* ---------- Barra superiore (dopo l'accesso) ---------- */
.app-bar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
    -webkit-backdrop-filter: saturate(1.4) blur(8px);
    backdrop-filter: saturate(1.4) blur(8px);
}
.app-bar-inner {
    width: min(1180px, 100% - 2 * var(--gutter));
    margin: 0 auto;
    min-height: 60px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    color: var(--brand); text-decoration: none; font-weight: 800;
    font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem;
}
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs {
    width: min(1180px, 100% - 2 * var(--gutter));
    margin: 0 auto;
    display: flex; gap: 4px;
    overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    flex: 0 0 auto;
    padding: 10px 14px;
    color: var(--muted); text-decoration: none; font-weight: 700;
    border-bottom: 3px solid transparent;
}
.tabs a.active { color: var(--primary-dark); border-color: var(--primary); }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.logout-form { margin: 0; }

/* ---------- Pulsanti ---------- */
.button,
button {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: var(--tap);
    padding: 0 16px;
    font: inherit; font-weight: 800;
    text-decoration: none; text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color .15s, border-color .15s, color .15s;
}
.primary { background: var(--primary); color: #fff; }
.primary:hover { background: var(--primary-dark); }
.secondary { background: #f6e4e2; color: var(--primary-dark); }
.secondary:hover { background: #efd3d0; }
.ghost { background: #fff; border-color: var(--line); color: var(--text); }
.ghost:hover { border-color: var(--primary); }
.danger { background: #fff1f0; color: var(--danger); border-color: #fecdca; }
.danger:hover { background: #fee4e2; }
.small { min-height: 40px; padding: 0 12px; font-size: .9rem; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Riquadri ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---------- Moduli ---------- */
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    min-height: var(--tap);
    border: 1px solid #d6cac7;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit; font-weight: 400; font-size: 16px;
    color: var(--text);
    background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(142, 26, 29, .15); border-color: var(--primary); }
textarea { resize: vertical; min-height: 110px; }
input[type="file"] { padding: 10px; background: var(--soft); }
input[type="checkbox"], input[type="radio"] {
    width: 22px; height: 22px; min-height: 22px; flex: 0 0 22px;
    margin: 0; accent-color: var(--primary);
}
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; min-width: 0; }
legend { padding: 0 6px; font-weight: 800; }
.hint { margin: -4px 0 0; color: var(--muted); font-size: .9rem; }

.password-field { position: relative; display: block; }
.password-field input { padding-right: 96px; }
.toggle-password {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    min-height: 38px; padding: 0 12px;
    background: transparent; color: var(--primary-dark); font-size: .9rem;
}

/* ---------- Messaggi ---------- */
.notice {
    padding: 12px 14px; margin-bottom: 16px;
    border-radius: 8px; border: 1px solid #abefc6;
    background: #ecfdf3; color: var(--ok); font-weight: 700;
}
.notice.error { background: #fff1f0; color: var(--danger); border-color: #fecdca; }
.warning {
    padding: 14px 16px; margin-bottom: 16px;
    border: 1px solid #f5c26b; border-radius: 8px;
    background: #fff7e8; color: #7a3e08;
}
.warning a { color: inherit; font-weight: 800; }
.empty {
    padding: 24px; border: 1px dashed #b9c7cd; border-radius: var(--radius);
    background: #fff; color: var(--muted); text-align: center;
}
.muted, small { color: var(--muted); }

.badge {
    display: inline-flex; align-items: center;
    min-height: 30px; padding: 0 12px;
    border-radius: 999px;
    background: #fff4e0; color: #8a4d0f;
    font-weight: 800; font-size: .88rem; white-space: nowrap;
}

/* ---------- Pagina file (utente) ---------- */
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.welcome .page-title { margin: 0; }

.search-box { margin-bottom: 14px; }
.search-box input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235d6778' stroke-width='2'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E") no-repeat 12px center; padding-left: 42px; }
.search-empty { margin: 10px 0 0; }

.folder-jump {
    display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 0 var(--gutter) 4px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.folder-jump::-webkit-scrollbar { display: none; }
.folder-jump a {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 14px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line);
    color: var(--text); text-decoration: none; font-weight: 700;
}
.folder-jump a span { color: var(--muted); font-weight: 600; font-size: .85rem; }

.folder-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.folder-card { padding: 16px; scroll-margin-top: 80px; }
.folder-card > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.folder-title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.count { color: var(--muted); font-weight: 700; white-space: nowrap; }

.folder-icon {
    display: inline-block; flex: 0 0 22px; width: 22px; height: 17px; position: relative;
    background: #e0a84a; border-radius: 2px 4px 4px 4px;
}
.folder-icon::before {
    content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 5px;
    background: #e0a84a; border-radius: 2px 3px 0 0;
}

.file-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center; gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 8px;
    background: var(--soft);
}
.file-info { display: grid; gap: 1px; min-width: 0; }
.file-info strong { font-weight: 700; line-height: 1.3; }
.file-dir { color: var(--muted); font-size: .85rem; }
.file-info small { font-size: .85rem; font-weight: 400; }

.file-type {
    display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 8px;
    font-size: .68rem; font-weight: 900; letter-spacing: .02em;
    color: #fff; background: #7b8794;
}
.t-pdf { background: #c0392b; }
.t-doc { background: #2b6cb0; }
.t-sheet { background: #1f8a4c; }
.t-slide { background: #d4692a; }
.t-img { background: #8e44ad; }
.t-media { background: #b83280; }
.t-zip { background: #6b5b3e; }

.login-mark {
    width: 46px; height: 46px; flex: 0 0 46px;
    display: grid; place-items: center;
    border-radius: 8px; background: var(--brand); color: #fff;
    font-family: Georgia, "Times New Roman", serif; font-weight: 700;
}
.small-mark { width: 36px; height: 36px; flex-basis: 36px; font-size: .85rem; }

/* ---------- Amministrazione ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stats div {
    display: grid; gap: 2px; padding: 14px; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.stats strong { font-size: 1.6rem; color: var(--brand); line-height: 1; }
.stats span { color: var(--muted); font-size: .88rem; }

.admin-menu { display: grid; grid-template-columns: 1fr; gap: 12px; }
.menu-button {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; min-height: 110px;
    text-decoration: none; color: var(--text);
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
}
.menu-button:hover { border-color: var(--primary); transform: translateY(-2px); }
.menu-button strong { font-size: 1.2rem; color: var(--primary-dark); }
.menu-button span { color: var(--muted); }

.admin-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.admin-card { padding: 18px; min-width: 0; }
.admin-card > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.full { grid-column: 1 / -1; }

.stack { display: grid; gap: 14px; }
.split { display: grid; grid-template-columns: 1fr; gap: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.checks { display: grid; gap: 4px; }
.checks label, .check-line {
    display: flex; align-items: center; gap: 10px;
    min-height: 40px; font-weight: 600; cursor: pointer;
}
.folder-checks { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.manage-list { display: grid; gap: 10px; }
.manage-item {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; scroll-margin-top: 120px;
}
.manage-item > summary {
    display: grid; gap: 2px;
    padding: 14px 44px 14px 16px;
    cursor: pointer; list-style: none; position: relative;
    min-height: var(--tap);
}
.manage-item > summary::-webkit-details-marker { display: none; }
.manage-item > summary::after {
    content: ""; position: absolute; right: 18px; top: 50%;
    width: 10px; height: 10px; margin-top: -7px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .15s;
}
.manage-item[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.manage-item[open] > summary { border-bottom: 1px solid var(--line); }
.summary-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.manage-item > summary .muted { font-size: .9rem; }
.manage-body { display: grid; gap: 16px; padding: 16px; background: var(--soft); border-radius: 0 0 var(--radius) var(--radius); }
.folder-admin { box-shadow: none; }

.permission-form { padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone { padding-top: 14px; border-top: 1px dashed #f1b7b1; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .grow { flex: 1 1 220px; }
.select-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.selectable li { grid-template-columns: minmax(0, 1fr) auto; background: #fff; }
.selectable .check-line { min-width: 0; align-items: center; }

.more-options > summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); min-height: 36px; display: flex; align-items: center; }
.more-options[open] { display: grid; gap: 12px; }

.upload-progress {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px;
    padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft);
}
.progress-track { height: 12px; overflow: hidden; border-radius: 6px; background: #eadcd9; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--primary); transition: width .15s linear; }
.progress-file, .progress-count { grid-column: 1 / -1; }
.progress-file { font-weight: 700; }

/* =========================================================
   Solo cellulari piccoli
   ========================================================= */
@media (max-width: 559px) {
    .actions .button, .actions button { min-height: 40px; padding: 0 12px; font-size: .9rem; }
    .brand span:last-child { max-width: 42vw; }

    /* Il pulsante Scarica va sotto al nome, a tutta larghezza: facile da toccare */
    .file-list li { grid-template-columns: auto minmax(0, 1fr); }
    .file-list li .download { grid-column: 1 / -1; width: 100%; }
    .selectable li { grid-template-columns: minmax(0, 1fr); }
    .selectable li .button { width: 100%; }

    .danger-zone .button, .inline-form .button { width: 100%; }
}

/* =========================================================
   Tablet (verticale) e oltre
   ========================================================= */
@media (min-width: 560px) {
    :root { --gutter: 24px; }
    .shell { padding-top: 28px; }
    .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .menu-button { min-height: 150px; justify-content: space-between; }
    .folder-card { padding: 20px; }
}

/* Tablet orizzontale e computer: due colonne */
@media (min-width: 900px) {
    .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .folder-jump { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }

}

@media (min-width: 1200px) {
    .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Chi preferisce meno animazioni */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Stampa: solo l'elenco dei file */
@media print {
    .app-bar, .search-box, .folder-jump, .button, .skip-link { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; }
}

/* =========================================================
   PAGINA DI ACCESSO
   - cellulare e tablet: versione 2 "moderna e minimale"
   - computer: versione 1 "classica ed elegante"
   ========================================================= */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); }

.login-page {
    --wine: #8e1a1d;
    --wine-dark: #631312;
    --paper: #f8f0ec;
    --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    background: #fff;
}

.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }

/* ---- Riquadro rosso (versione 2) ---- */
.login-brand {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
    padding: calc(28px + env(safe-area-inset-top)) 24px 26px;
    color: #fff;
    background: radial-gradient(120% 90% at 30% 0%, #74171a 0%, var(--wine-dark) 55%, #4f0e0f 100%);
}
.login-brand .logo { display: block; height: auto; }
.logo-color { display: none !important; }
.logo-white { width: 104px; }

.brand-text { display: grid; gap: 10px; justify-items: center; }
.brand-text::before { content: ""; width: 44px; height: 1px; background: rgba(255, 255, 255, .55); margin-bottom: 4px; }
.login h1 {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(1.9rem, 7.5vw, 2.4rem); line-height: 1.02;
    color: inherit; letter-spacing: .005em;
}
.login h1 .don, .login h1 .nome { display: block; }
.subtitle {
    margin: 0;
    font-family: var(--serif); font-weight: 600;
    font-size: .82rem; letter-spacing: .26em; text-transform: uppercase;
    color: rgba(255, 255, 255, .88);
}
.subtitle span { display: block; }

.motto {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 6px 0 0; color: rgba(255, 255, 255, .9);
}
.motto em { font-family: var(--serif); font-size: 1.05rem; letter-spacing: .04em; text-align: left; line-height: 1.35; }
.motto svg { flex: 0 0 auto; opacity: .95; }

/* ---- Lato bianco con il modulo ---- */
.login-side {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 30px 22px calc(40px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
.login-side::after {           /* la Salute, sbiadita, in basso a destra */
    content: ""; position: absolute; right: -12%; bottom: 0; z-index: 0;
    width: 72%; height: 78%;
    background: url("login-salute.jpg?v=2") no-repeat right bottom / contain;
    opacity: .30; mix-blend-mode: multiply; pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}

.login-card { position: relative; z-index: 1; width: 100%; max-width: 380px; display: grid; gap: 14px; }
.login-card h2 {
    font-family: var(--serif); font-weight: 600;
    font-size: 2rem; color: var(--wine); line-height: 1.1;
}
.lead { margin: -6px 0 6px; font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; color: #4b3f3e; }
.lead span { display: block; }
.login-card .notice { margin: 0; }

.field input {
    min-height: 50px; padding-left: 46px;
    border-color: #d9cfcc; border-radius: 4px; background-color: #fff;
    background-repeat: no-repeat; background-position: 15px center; background-size: 17px 17px;
}
.field-user input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23707070'%3E%3Ccircle cx='12' cy='7.5' r='4.5'/%3E%3Cpath d='M3 21c0-4.7 4-8 9-8s9 3.3 9 8z'/%3E%3C/svg%3E"); }
.field-pass input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23707070'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1.5A1.5 1.5 0 0 1 20 11.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10zm2.5 0h5V7a2.5 2.5 0 0 0-5 0z'/%3E%3C/svg%3E"); }
.field input:focus { border-color: var(--wine); outline: 3px solid rgba(142, 26, 29, .14); }
.login-card .toggle-password { color: var(--wine); }

.login-button {
    width: 100%; min-height: 52px; margin-top: 4px;
    border-radius: 4px; color: #fff;
    font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .02em;
    background: linear-gradient(180deg, #a52024 0%, #82161a 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.login-button:hover { background: linear-gradient(180deg, #8f1b1f 0%, #6e1215 100%); }

.forgot { text-align: center; }
.forgot summary {
    display: inline-block; list-style: none; cursor: pointer;
    padding: 6px 4px; color: var(--wine);
    font-family: var(--serif); font-size: 1.02rem; text-decoration: underline; text-underline-offset: 3px;
}
.forgot summary::-webkit-details-marker { display: none; }
.forgot p { margin: 4px 0 0; color: #5b4f4d; font-size: .92rem; }

/* ---- Tablet: rosso a sinistra, modulo a destra ---- */
@media (min-width: 700px) {
    .login { grid-template-columns: minmax(300px, 42%) 1fr; }
    .login-brand {
        align-items: flex-start; text-align: left; justify-content: space-between;
        padding: 56px clamp(26px, 4vw, 56px) 48px;
    }
    .logo-white { width: 150px; align-self: center; }
    .brand-text { justify-items: start; margin-top: auto; gap: 14px; }
    .brand-text::before { align-self: center; justify-self: center; margin-bottom: 26px; width: 52px; }
    .brand-text { width: 100%; }
    .login h1 { font-size: clamp(1.9rem, 3.9vw, 2.9rem); }
    .login h1 .nome { white-space: nowrap; }
    .subtitle { font-size: clamp(.7rem, 1.25vw, .86rem); letter-spacing: .22em; }
    .motto { justify-content: flex-start; margin-top: auto; padding-top: 40px; gap: 20px; }
    .motto svg { width: 44px; height: 33px; }
    .login-side { align-items: center; padding: 48px clamp(28px, 6vw, 72px); }
    .login-side::after { right: -8%; width: 70%; height: 92%; }
}

/* ---- Computer: versione 1 ---- */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
    .login-page {
        background: #f8f0ec url("login-desktop.jpg?v=2") no-repeat center bottom / 100% auto;
    }
    .login {
        width: min(1480px, 100%); margin: 0 auto;
        grid-template-columns: minmax(0, 1fr) 390px;
        align-items: start; gap: 40px;
        padding: clamp(40px, 6vh, 80px) clamp(40px, 5vw, 80px) 40px;
    }
    .login-brand {
        flex-direction: row; align-items: flex-start; text-align: left; gap: clamp(28px, 3vw, 52px);
        padding: 0; background: none; color: var(--wine);
    }
    .logo-white, .motto { display: none !important; }
    .logo-color { display: block !important; width: clamp(130px, 10.5vw, 170px); mix-blend-mode: multiply; }
    .brand-text { justify-items: start; gap: 0; padding-top: clamp(14px, 2vw, 28px); }
    .brand-text::before { display: none; }
    .login h1 {
        font-size: clamp(3.4rem, 4.6vw, 4.9rem); line-height: .98; color: var(--wine);
        padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(142, 26, 29, .55);
    }
    .subtitle { color: #6a5552; font-weight: 500; font-size: clamp(.95rem, 1.2vw, 1.12rem); letter-spacing: .3em; line-height: 1.9; }

    .login-side { padding: 0; background: none; overflow: visible; margin-top: clamp(10px, 3vh, 40px); }
    .login-side::after { display: none; }
    .login-card {
        max-width: none; padding: 46px 40px 34px; gap: 16px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(142, 26, 29, .08); border-radius: 12px;
        box-shadow: 0 24px 60px rgba(99, 19, 18, .14), 0 2px 6px rgba(0, 0, 0, .04);
        text-align: center;
    }
    .login-card h2 { font-size: 2.35rem; font-weight: 500; }
    .lead { margin: -8px 0 12px; font-size: 1.14rem; color: #4f4543; }
    .login-card .notice { text-align: left; }
}
