/* METODICA — neo-brutalist UI
   Palette acida, bordi neri solidi, ombre piatte sfalsate, zero border-radius. */

:root {
    --bg: #F4F4F0;
    --ink: #121212;
    --paper: #FFFFFF;
    --acid: #CCFF00;
    --pink: #FF00FF;
    --cyan: #00E5FF;
    --warn: #FFD600;
    --danger: #FF3D2E;
    --bd: 3px solid var(--ink);
    --bd-fat: 4px solid var(--ink);
    --shadow: 8px 8px 0 var(--ink);
    --shadow-sm: 4px 4px 0 var(--ink);
    --font-head: 'Archivo Black', 'Arial Black', sans-serif;
    --font-body: 'Space Grotesk', -apple-system, sans-serif;
}

* { box-sizing: border-box; }
::selection { background: var(--acid); color: var(--ink); }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.55 var(--font-body);
}

h1 { font-family: var(--font-head); font-size: 30px; margin: 8px 0 6px; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.1; }
h2 { font-family: var(--font-head); font-size: 16px; margin: 0 0 14px; text-transform: uppercase; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { background: var(--acid); }
.muted { color: #6b6b66; font-size: 14px; }
small { color: #6b6b66; }
code { font-family: ui-monospace, monospace; }

/* ---------- logo ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { background: transparent; }
.logo-mark {
    width: 38px; height: 38px;
    background: var(--ink); color: var(--bg);
    font-family: var(--font-head); font-size: 22px; line-height: 38px;
    text-align: center; display: inline-block;
    box-shadow: 4px 4px 0 var(--acid);
    flex: none;
}
.logo-word { font-family: var(--font-head); font-size: 20px; letter-spacing: .01em; color: var(--ink); }
.logo-word i { font-style: normal; color: var(--pink); }

/* ---------- nav ---------- */

.topnav {
    background: var(--bg);
    border-bottom: var(--bd-fat);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.nav-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-link {
    font-weight: 700; font-size: 13px; text-transform: uppercase;
    text-decoration: none; padding: 4px 8px; letter-spacing: .04em;
}
.nav-link:hover { background: var(--acid); box-shadow: 3px 3px 0 var(--ink); }
.nav-user { color: #6b6b66; font-size: 13px; font-weight: 500; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 30px 20px 90px; }

.page-head { margin-bottom: 22px; }
.crumbs { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { background: var(--acid); }

/* ---------- sticker / decorazioni ---------- */

.sticker {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 5px 12px;
    border: var(--bd);
    box-shadow: var(--shadow-sm);
    transform: rotate(-2deg);
    background: var(--pink);
    color: #fff;
}
.sticker.acid { background: var(--acid); color: var(--ink); transform: rotate(1.5deg); }
.sticker.cyan { background: var(--cyan); color: var(--ink); transform: rotate(-1deg); }

.marquee {
    overflow: hidden; white-space: nowrap;
    background: var(--ink); color: var(--bg);
    border: var(--bd); border-left: 0; border-right: 0;
    font-family: var(--font-head); font-size: 13px; text-transform: uppercase;
    padding: 8px 0; letter-spacing: .08em;
}
.marquee span { display: inline-block; padding-left: 100%; animation: marq 18s linear infinite; }
@keyframes marq { to { transform: translateX(-100%); } }

/* ---------- bottoni e campi ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: var(--bd);
    border-radius: 0;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform .08s, box-shadow .08s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); background: var(--paper); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn.primary { background: var(--acid); }
.btn.primary:hover { background: var(--acid); }
.btn.ok { background: var(--acid); }
.btn.ok:hover { background: var(--acid); }
.btn.pink { background: var(--pink); color: #fff; }
.btn.pink:hover { background: var(--pink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: var(--danger); }
.btn.ghost { background: var(--bg); box-shadow: none; }
.btn.ghost:hover { background: var(--acid); box-shadow: 3px 3px 0 var(--ink); transform: none; }
.btn.ghost.danger { background: var(--bg); color: var(--danger); }
.btn.ghost.danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; box-shadow: 3px 3px 0 var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

input[type="text"], input[type="password"], input[type="number"], textarea, select, input[type="file"] {
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    border: var(--bd);
    border-radius: 0;
    padding: 10px 12px;
    width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; box-shadow: 4px 4px 0 var(--acid), 4px 4px 0 3px var(--ink); }
input[type="color"] { width: 100%; height: 46px; padding: 3px; background: var(--paper); border: var(--bd); cursor: pointer; }
textarea { resize: vertical; }

.fld { display: block; margin-bottom: 14px; }
.fld > span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }

.row-form { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.row-form input[type="text"], .row-form input[type="file"], .row-form input[type="password"] { flex: 1; }
.stack-form { margin-top: 8px; }

.title-form { display: flex; gap: 12px; align-items: center; max-width: 620px; }
.title-input { font-family: var(--font-head) !important; font-size: 22px !important; text-transform: uppercase; }

/* ---------- pannelli e liste ---------- */

.panel {
    background: var(--paper);
    border: var(--bd);
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}
.panel.flat { box-shadow: none; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

.item-list { list-style: none; margin: 10px 0 0; padding: 0; }
.item-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    border-top: 2px solid var(--ink);
}
.item-main { flex: 1; display: flex; flex-direction: column; color: var(--ink); min-width: 0; text-decoration: none; }
.item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.item-main:hover { background: transparent; }
a.item-main:hover strong { background: var(--acid); }

.inline-details { position: relative; }
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details .row-form { margin: 10px 0 0; }

.mini-progress { width: 90px; height: 10px; border: 2px solid var(--ink); background: var(--paper); overflow: hidden; flex: none; }
.mini-progress span { display: block; height: 100%; background: var(--acid); }
.mini-progress.wide { width: 100%; margin-top: 8px; }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.client-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--paper);
    border: var(--bd);
    padding: 18px;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform .08s, box-shadow .08s;
    text-decoration: none;
}
.client-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); background: var(--paper); }
.client-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.client-info strong { font-family: var(--font-head); font-size: 15px; text-transform: uppercase; }
.client-card .go { font-family: var(--font-head); font-size: 20px; }

.avatar {
    width: 44px; height: 44px;
    background: var(--acid);
    border: var(--bd);
    color: var(--ink);
    font-family: var(--font-head);
    display: inline-flex; align-items: center; justify-content: center;
    flex: none;
}
.avatar.lg { width: 54px; height: 54px; font-size: 22px; }
.avatar.lg.inline { vertical-align: -16px; margin-right: 6px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--paper);
    border: 3px dashed var(--ink);
}
.empty-icn { font-family: var(--font-head); font-size: 34px; margin-bottom: 8px; }

.alert { border: var(--bd); padding: 13px 16px; margin-bottom: 18px; font-size: 14px; font-weight: 700; box-shadow: var(--shadow-sm); background: var(--paper); }
.alert.err { background: var(--danger); color: #fff; }
.alert.ok { background: var(--acid); color: var(--ink); }
.alert.creds code {
    display: block; margin-top: 10px; padding: 12px;
    background: var(--paper); border: 2px solid var(--ink);
    font-size: 15px; user-select: all;
}

.danger-zone h2 { color: var(--danger); }

/* ---------- login ---------- */

.auth-bg {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    background: var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--paper);
    border: var(--bd-fat);
    padding: 36px 32px;
    box-shadow: 12px 12px 0 var(--ink);
    position: relative;
    margin: 40px 20px;
}
.auth-card .sticker { position: absolute; top: -16px; right: -14px; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.auth-sub { color: #6b6b66; font-size: 14px; margin: 8px 0 24px; }

/* ---------- layout pagina PED ---------- */

.ped-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    align-items: start;
}
.phone-col { position: sticky; top: 96px; }
.phone-hint { font-size: 13px; font-weight: 500; text-align: center; margin-top: 16px; padding: 0 20px; color: #6b6b66; }

/* ---------- mockup iPhone ---------- */

.iphone {
    width: 330px;
    margin: 0 auto;
    background: #121212;
    border-radius: 48px;
    padding: 12px;
    border: var(--bd);
    box-shadow: 10px 10px 0 var(--acid), 10px 10px 0 3px var(--ink);
    transform: rotate(-1.2deg);
}
.iphone-screen {
    background: #fff;
    border-radius: 38px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 620px;
}
.island { width: 108px; height: 28px; background: #121212; border-radius: 99px; margin: 12px auto 4px; flex: none; }
.ig-top { text-align: center; font-weight: 700; font-size: 15px; padding: 4px 0 8px; flex: none; }
.ig-chev { font-size: 11px; color: #999; }
.ig-head { display: flex; align-items: center; gap: 20px; padding: 6px 18px 4px; flex: none; }
.avatar.ig {
    width: 62px; height: 62px; font-size: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7);
    color: #fff; border: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e3e3e3;
}
.ig-stats { display: flex; flex: 1; justify-content: space-around; text-align: center; }
.ig-stats b { display: block; font-size: 16px; line-height: 1.1; }
.ig-stats span { font-size: 12px; color: #555; }
.ig-name { font-weight: 600; font-size: 13.5px; padding: 4px 18px 8px; flex: none; }
.ig-tabs { display: flex; flex: none; border-top: 1px solid #efefef; }
.ig-tabs .tab { flex: 1; text-align: center; padding: 7px 0; font-size: 17px; color: #bbb; }
.ig-tabs .tab.active { color: #111; border-bottom: 2px solid #111; }

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5px;
    background: #fff;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}
.ig-cell { aspect-ratio: 3 / 4; position: relative; overflow: hidden; background: #f1f0ec; cursor: pointer; }
.ig-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-cell.dragging { opacity: .35; outline: 3px dashed var(--pink); outline-offset: -3px; }
.cell-fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 22px; }
.cell-icn { position: absolute; top: 5px; right: 6px; color: #fff; font-size: 11px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.cell-num {
    position: absolute; bottom: 5px; left: 5px;
    background: var(--ink); color: var(--acid);
    font-size: 10.5px; font-weight: 700;
    padding: 1px 6px;
}
.cell-ok {
    position: absolute; bottom: 5px; right: 5px;
    background: var(--acid); color: var(--ink); border: 2px solid var(--ink);
    width: 18px; height: 18px;
    font-size: 11px; line-height: 14px; text-align: center; font-weight: 700;
}
.grid-empty { grid-column: 1 / -1; padding: 50px 24px; text-align: center; color: #999; font-size: 13.5px; }

/* ---------- pannello statistiche ---------- */

.stats-panel { padding: 16px 18px; }
.stats-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
    background: var(--bg); border: 2px solid var(--ink);
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    padding: 4px 12px;
}
.chip b { font-size: 14px; }
.chip.ok { background: var(--acid); }
.chip.com { background: var(--pink); color: #fff; }
.stats-row .btn { margin-left: auto; }
.progress { height: 12px; border: 2px solid var(--ink); background: var(--paper); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--acid); transition: width .3s; }

/* ---------- dropzone e coda upload ---------- */

.dropzone {
    border: 3px dashed var(--ink);
    background: var(--paper);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}
.dropzone strong { font-family: var(--font-head); font-size: 15px; text-transform: uppercase; }
.dropzone span { font-size: 13px; color: #6b6b66; }
.dropzone.over { border-style: solid; background: var(--acid); }

.upload-queue { margin-bottom: 16px; }
.q-item {
    display: flex; justify-content: space-between; gap: 12px;
    background: var(--paper); border: 2px solid var(--ink);
    padding: 8px 14px; margin-bottom: 6px; font-size: 13.5px; font-weight: 500;
}
.q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-status { color: #6b6b66; flex: none; font-weight: 700; }
.q-item.done { background: var(--acid); }
.q-item.done .q-status { color: var(--ink); }
.q-item.fail { background: var(--danger); color: #fff; }
.q-item.fail .q-status { color: #fff; }

/* ---------- schede contenuto ---------- */

.cards { display: flex; flex-direction: column; gap: 22px; }

.card {
    display: grid;
    grid-template-columns: 270px 1fr;
    background: var(--paper);
    border: var(--bd);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    outline: 3px solid transparent;
    transition: outline-color .25s;
}
.card.is-approved { box-shadow: 8px 8px 0 var(--acid), 8px 8px 0 3px var(--ink); }
.card.flash { outline-color: var(--pink); }

.card-media {
    background: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    border-right: var(--bd);
}
.card-media img, .card-media video { width: 100%; height: 100%; max-height: 430px; object-fit: contain; display: block; }

.card-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos { font-family: var(--font-head); font-size: 15px; }

.badge {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    padding: 3px 10px; border: 2px solid var(--ink); letter-spacing: .03em;
}
.badge.ok { background: var(--acid); }
.badge.wait { background: var(--warn); }
.badge.com { background: var(--pink); color: #fff; }

.theme-chip {
    align-self: flex-start;
    background: var(--ink); color: var(--acid);
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    padding: 4px 12px;
}
.copy-text { white-space: pre-wrap; font-size: 15px; }

.save-state { font-size: 12px; font-weight: 700; text-transform: uppercase; background: var(--acid); align-self: flex-start; padding: 2px 8px; }
.gen-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.comments { display: flex; flex-direction: column; gap: 8px; }
.comment { background: var(--bg); border: 2px solid var(--ink); border-left: 8px solid var(--ink); padding: 10px 13px; }
.comment.is-admin { border-left-color: var(--pink); }
.comment-meta { font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
.comment-body { font-size: 14px; white-space: pre-wrap; }

.comment-box { display: flex; flex-direction: column; gap: 10px; }
.comment-box .btn { align-self: flex-end; }

.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 2px solid var(--ink); }

/* ---------- Reel Studio ---------- */

.steps { display: flex; gap: 0; margin-bottom: 26px; flex-wrap: wrap; }
.step {
    font-family: var(--font-head); font-size: 13px; text-transform: uppercase;
    padding: 10px 18px; border: var(--bd); border-right: none;
    background: var(--paper); cursor: pointer; letter-spacing: .02em;
}
.step:last-child { border-right: var(--bd); }
.step.active { background: var(--ink); color: var(--acid); }
.step.done { background: var(--acid); }

.trend-card {
    border: var(--bd); background: var(--paper); padding: 16px 18px;
    margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.trend-card h3 { font-family: var(--font-head); font-size: 15px; margin: 0 0 6px; text-transform: uppercase; }
.trend-card p { margin: 4px 0; font-size: 14px; }
.trend-card .why { background: var(--acid); display: inline; padding: 0 4px; font-weight: 700; }
.trend-card .src { font-size: 12px; color: #6b6b66; }

.script-block { border: var(--bd); background: var(--paper); padding: 18px; margin-bottom: 14px; }
.script-hook { background: var(--ink); color: var(--acid); padding: 12px 16px; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.scene { border: 2px solid var(--ink); padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.scene .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #6b6b66; display: block; margin-bottom: 3px; }
.scene-num { font-family: var(--font-head); background: var(--pink); color: #fff; padding: 1px 8px; display: inline-block; margin-bottom: 8px; font-size: 12px; }

.out-block { border: var(--bd); background: var(--paper); padding: 16px 18px; margin-bottom: 14px; position: relative; }
.out-block h3 { font-family: var(--font-head); font-size: 13px; text-transform: uppercase; margin: 0 0 10px; }
.out-block pre { white-space: pre-wrap; font-family: inherit; font-size: 14px; margin: 0; }
.btn-copy { position: absolute; top: 12px; right: 12px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--bg); border: 2px solid var(--ink); padding: 2px 10px; font-size: 13px; font-weight: 500; }

.ai-loading {
    display: none; align-items: center; gap: 12px;
    border: var(--bd); background: var(--warn); padding: 14px 18px;
    font-weight: 700; text-transform: uppercase; font-size: 13px;
    margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.ai-loading.show { display: flex; }
.ai-loading .dot { width: 14px; height: 14px; background: var(--ink); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.cover-layout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.cover-canvas-wrap { border: var(--bd); background: #121212; padding: 14px; display: flex; justify-content: center; box-shadow: var(--shadow-sm); }
.cover-canvas-wrap canvas { max-width: 100%; height: auto; display: block; }

.swatches { display: flex; gap: 8px; }
.swatch { width: 36px; height: 36px; border: var(--bd); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.swatch.sel { outline: 3px solid var(--pink); outline-offset: 2px; }

.reel-list li { cursor: default; }

/* ---------- toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: var(--bg);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 3px var(--ink);
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s, transform .15s;
    z-index: 100;
    max-width: min(520px, 90vw);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--acid); color: var(--ink); border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
    .ped-layout { grid-template-columns: 1fr; }
    .phone-col { position: static; }
    .grid2 { grid-template-columns: 1fr; }
    .cover-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .card { grid-template-columns: 1fr; }
    .card-media { border-right: none; border-bottom: var(--bd); }
    .card-media img, .card-media video { max-height: 360px; }
    .row-form { flex-wrap: wrap; }
    .iphone { width: min(330px, 90vw); transform: none; }
    h1 { font-size: 24px; }
    .scene { grid-template-columns: 1fr; }
    .scene-adv { grid-template-columns: 1fr; }
}

/* ---------- galleria / carosello ---------- */

.gallery { position: relative; width: 100%; height: 100%; }
.gallery-slide { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gallery-slide img, .gallery-slide video { width: 100%; height: 100%; max-height: 430px; object-fit: contain; display: block; }
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px;
    background: var(--acid); color: var(--ink);
    border: var(--bd); cursor: pointer;
    font-size: 22px; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 3px 3px 0 var(--ink);
}
.gallery-nav:hover { background: #fff; }
.gallery-nav.prev { left: 8px; }
.gallery-nav.next { right: 8px; }
.gallery-count {
    position: absolute; top: 8px; right: 8px;
    background: var(--ink); color: var(--acid);
    font-size: 12px; font-weight: 700; padding: 2px 9px;
}
.gallery-dl {
    position: absolute; bottom: 8px; right: 8px;
    width: 34px; height: 34px;
    background: var(--acid); color: var(--ink);
    border: var(--bd); box-shadow: 3px 3px 0 var(--ink);
    font-size: 16px; font-weight: 700; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
}
.gallery-dl:hover { background: #fff; }
.is-carousel .gallery-dl { bottom: 8px; }

/* ---------- counter tempo risparmiato ---------- */

.saved-panel {
    display: flex; align-items: center; gap: 16px;
    background: var(--ink); color: var(--bg);
    border: var(--bd); box-shadow: var(--shadow);
    padding: 16px 20px; margin-bottom: 22px;
}
.saved-flash {
    font-family: var(--font-head); font-size: 30px;
    background: var(--acid); color: var(--ink);
    width: 54px; height: 54px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg); transform: rotate(-4deg);
}
.saved-body { flex: 1; }
.saved-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--acid); }
.saved-num { font-family: var(--font-head); font-size: 34px; line-height: 1.1; letter-spacing: -.01em; }
.saved-tag {
    font-family: var(--font-head); font-size: 10px; text-transform: uppercase;
    background: var(--pink); color: #fff; padding: 4px 10px;
    transform: rotate(2deg); align-self: flex-start;
}

/* ---------- Carosello Studio: slide ---------- */

.slides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.slide-card { border: var(--bd); background: var(--bg); padding: 12px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.slide-card.cover { background: var(--acid); }
.slide-card strong { font-size: 14px; }
.slide-n { font-family: var(--font-head); font-size: 11px; background: var(--ink); color: var(--acid); align-self: flex-start; padding: 1px 8px; }
.slide-card.cover .slide-n { background: var(--ink); color: var(--acid); }
.slide-text { font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.slide-card.cover .slide-text { font-family: var(--font-head); font-size: 16px; text-transform: uppercase; }

@media (max-width: 640px) {
    .saved-num { font-size: 26px; }
}

/* ---------- date di uscita ---------- */

.date-fld { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; }
.date-fld input[type="date"] { width: auto; flex: 1; }
.date-chip {
    align-self: flex-start;
    background: var(--cyan); color: var(--ink);
    border: 2px solid var(--ink);
    font-size: 13px; font-weight: 700;
    padding: 4px 10px;
}
.badge.date { background: var(--cyan); }

/* ---------- META ADV ---------- */

.budget-panel .sticker { vertical-align: 4px; }
.budget-big { font-family: var(--font-head); font-size: 30px; margin: 4px 0 12px; }
.budget-notes {
    background: var(--bg); border: var(--bd); padding: 14px 16px;
    font-size: 15px; white-space: pre-wrap; line-height: 1.6;
}

.adv-card .cr-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adv-card .cr-title { font-family: var(--font-head); font-size: 16px; text-transform: uppercase; }
.inp-cr-title { flex: 1; min-width: 180px; }

.copies { margin-top: 6px; border-top: 2px dashed var(--ink); padding-top: 12px; }
.copies-title { font-family: var(--font-head); font-size: 13px; text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.copies-title .muted { font-family: var(--font-body); }
.copies-list { display: flex; flex-direction: column; gap: 12px; }
.copy-item { background: var(--bg); border: 2px solid var(--ink); padding: 12px 14px; }
.copy-head { margin-bottom: 8px; }
.copy-item .copy-text { font-size: 14px; }
.copy-foot { margin-top: 10px; }
.copy-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.copy-item .comment-box { margin-bottom: 10px; }
