/* ─── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=DM+Serif+Display:ital@0;1&display=swap');

/* ─── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand — dal logo render.casa */
  --brand-pink:     #C91B8C;
  --brand-red:      #E03030;
  --brand-orange:   #F06820;
  --brand-yellow:   #F5B800;
  --brand-gradient: linear-gradient(110deg, #C91B8C 0%, #E03030 38%, #F06820 68%, #F5B800 100%);

  /* Superfici */
  --bg:          #F8F7F5;
  --surface:     #FFFFFF;
  --border:      #E6E3DE;
  --border-dark: #C8C4BE;

  /* Testo */
  --text-primary:   #111111;
  --text-secondary: #5C5852;
  --text-muted:     #9C9890;

  /* Feedback */
  --danger:  #C0392B;
  --success: #1E8449;

  /* Tipografia */
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;

  /* Forma */
  --radius:    4px;
  --radius-lg: 8px;

  /* Ombre */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.15);

  --transition: .18s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text-primary); min-height: 100vh; }
a    { color: inherit; text-decoration: none; }
img  { display: block; max-width: 100%; height: auto; }

/* ─── Utilities ─────────────────────────────────────────────────────────────── */
.td-center  { text-align: center; }
.td-muted   { color: var(--text-muted); font-size: .85rem; }
.td-actions { white-space: nowrap; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  border-radius: var(--radius); transition: all var(--transition);
}
.btn--primary        { background: var(--text-primary); color: #fff; }
.btn--primary:hover  { background: #2a2a2a; }
.btn--secondary      { background: var(--surface); color: var(--text-primary); border: 1.5px solid var(--border); }
.btn--secondary:hover{ border-color: var(--text-primary); }
.btn--ghost          { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border); }
.btn--ghost:hover    { border-color: var(--text-primary); background: rgba(0,0,0,.03); }
.btn--ghost-white    { background: rgba(255,255,255,.15); color: #fff; border: 1.5px solid rgba(255,255,255,.5); backdrop-filter: blur(8px); }
.btn--ghost-white:hover { background: rgba(255,255,255,.25); border-color: #fff; }
.btn--danger         { background: transparent; color: var(--danger); border: 1.5px solid currentColor; }
.btn--danger:hover   { background: var(--danger); color: #fff; }
.btn--full           { width: 100%; justify-content: center; }
.btn--sm             { padding: 7px 14px; font-size: .75rem; }
.btn:disabled        { opacity: .4; cursor: not-allowed; pointer-events: none; }

.btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface);
  cursor: pointer; font-family: var(--font-body); transition: all var(--transition);
}
.btn-sm--save   { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.btn-sm--cancel:hover { border-color: var(--text-primary); }

.btn-edit-img {
  font-size: .75rem; color: var(--text-secondary); background: none; border: none;
  cursor: pointer; padding: 2px 0; text-decoration: underline; font-family: var(--font-body);
}
.btn-edit-img:hover { color: var(--text-primary); }

.btn-delete-img {
  font-size: .75rem; color: var(--text-muted); background: none; border: none;
  cursor: pointer; font-family: var(--font-body);
}
.btn-delete-img:hover { color: var(--danger); }

.btn-copy-small {
  font-size: .75rem; background: none; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 3px 8px; cursor: pointer; font-family: var(--font-body); color: var(--text-secondary);
}
.btn-copy-small:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* ─── Download all button (client) ─────────────────────────────────────────── */
.btn--download-all {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(201,27,140,.3);
}
.btn--download-all:hover { opacity: .9; box-shadow: 0 4px 18px rgba(201,27,140,.4); }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.field          { margin-bottom: 18px; }
.field--compact { margin-bottom: 10px; }
.field-required { color: var(--brand-pink); }
.form-row       { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.field-hint     { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

label { display: block; font-size: .75rem; font-weight: 600; margin-bottom: 5px;
        color: var(--text-secondary); letter-spacing: .05em; text-transform: uppercase; }

input[type=text],
input[type=email],
input[type=password],
input[type=date],
select,
.input-sm {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-body); font-size: .95rem; color: var(--text-primary);
  background: var(--surface); transition: border-color var(--transition);
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus { outline: none; border-color: var(--brand-pink); box-shadow: 0 0 0 3px rgba(201,27,140,.08); }
.input-sm { padding: 6px 10px; font-size: .85rem; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.form-card    { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }

/* ─── Alerts ─────────────────────────────────────────────────────────────────── */
.alert          { padding: 12px 16px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 20px; }
.alert--error   { background: #FDF2F2; border-left: 3px solid var(--danger);  color: var(--danger); }
.alert--success { background: #F2FBF6; border-left: 3px solid var(--success); color: var(--success); }

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge              { display: inline-block; padding: 3px 9px; border-radius: 20px;
                      font-size: .72rem; font-weight: 600; letter-spacing: .05em; }
.badge--published   { background: #E8F5EF; color: var(--success); }
.badge--draft       { background: #F2F0ED; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════════════════
   LOGIN
   ════════════════════════════════════════════════════════════════════════════ */
.login-page  { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box   { width: 100%; max-width: 380px; padding: 20px; }
.login-logo  { text-align: center; margin-bottom: 28px; }
.login-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400;
               margin-bottom: 24px; text-align: center; color: var(--text-primary); }
.login-form  { background: var(--surface); border: 1px solid var(--border);
               border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ════════════════════════════════════════════════════════════════════════════ */
.admin-page { background: var(--bg); }

.admin-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 58px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.admin-brand img { height: 30px; width: auto; max-width: none; }
.admin-nav       { display: flex; align-items: center; gap: 16px; }
.admin-logout    { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.admin-logout:hover { color: var(--text-primary); }

.admin-main      { padding: 32px 0 80px; }
.admin-container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.admin-container--narrow { max-width: 560px; }

.page-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; margin-bottom: 24px; }
.breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-primary); }

/* ── Dashboard table ────────────────────────────────────────────────────────── */
.deliveries-table-wrap { overflow-x: auto; background: var(--surface);
                         border: 1px solid var(--border); border-radius: var(--radius-lg); }
.deliveries-table      { width: 100%; border-collapse: collapse; }
.deliveries-table th   {
  text-align: left; padding: 11px 16px;
  font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.deliveries-table td   { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.deliveries-table tr:last-child td { border-bottom: none; }
.deliveries-table tbody tr:hover td { background: #FAFAF8; }
.table-link { font-weight: 500; }
.table-link:hover { text-decoration: underline; }
.copy-link  {
  font-size: .8rem; color: var(--text-muted); cursor: pointer;
  max-width: 280px; display: inline-block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-link:hover { color: var(--brand-pink); }
.empty-state { padding: 48px 0; color: var(--text-muted); }

/* ── Filter bar (dashboard search/filter) ───────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-bar__search-wrap {
  position: relative; flex: 1 1 200px; min-width: 0;
}
.filter-bar__icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.filter-bar__input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-body); font-size: .88rem; background: var(--surface);
  color: var(--text-primary); transition: border-color var(--transition);
}
.filter-bar__input:focus {
  outline: none; border-color: var(--brand-pink);
}
.filter-bar__select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-body); font-size: .88rem; background: var(--surface);
  color: var(--text-primary); cursor: pointer;
  transition: border-color var(--transition);
}
.filter-bar__select:focus { outline: none; border-color: var(--brand-pink); }
.filter-bar__count {
  font-size: .8rem; color: var(--text-muted); white-space: nowrap; margin-left: 4px;
}
.filter-bar__empty {
  padding: 32px 0; text-align: center; color: var(--text-muted); font-size: .9rem;
}

/* ── Delivery header ────────────────────────────────────────────────────────── */
.delivery-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.delivery-header .page-title { margin-bottom: 4px; }
.delivery-meta { font-size: .88rem; color: var(--text-secondary); }
.delivery-header__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.published-link-bar {
  display: flex; align-items: center; gap: 10px;
  background: #F2FBF6; border: 1px solid #C3E9D4;
  border-radius: var(--radius); padding: 10px 16px; margin-bottom: 24px; font-size: .85rem;
}
.pub-link { color: var(--text-primary); word-break: break-all; flex: 1; }

/* ── Meta editor (details/summary) ─────────────────────────────────────────── */
.meta-editor {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: 28px; overflow: hidden;
}
.meta-editor__toggle {
  padding: 14px 20px; cursor: pointer; font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary);
  user-select: none; list-style: none;
}
.meta-editor__toggle::-webkit-details-marker { display: none; }
.meta-editor__toggle::before { content: '▸ '; }
details[open] .meta-editor__toggle::before { content: '▾ '; }
.meta-editor__form {
  padding: 20px; border-top: 1px solid var(--border);
}
.meta-editor__fields {
  display: grid; grid-template-columns: 1fr 1fr 1fr 180px; gap: 16px; margin-bottom: 16px;
}

/* ── Upload zone ────────────────────────────────────────────────────────────── */
.upload-section { margin-bottom: 36px; }
.section-label  {
  font-size: .72rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px;
}
.section-label .count { color: var(--text-secondary); font-weight: 400; }

.drop-zone {
  position: relative; border: 2px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--surface); transition: all var(--transition); cursor: pointer;
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--brand-pink); background: #FFF8FD;
}
.drop-zone__inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; gap: 10px; color: var(--text-secondary); text-align: center;
  pointer-events: none;
}
.drop-zone__inner svg { opacity: .35; }
.drop-zone__inner p   { font-size: .95rem; line-height: 1.5; }
.drop-zone__formats   { color: var(--text-muted); font-size: .78rem; }
.drop-zone__input     { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* Upload queue */
.upload-queue  { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.upload-item   {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; font-size: .85rem;
}
.upload-item__name     { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item__status   { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
.upload-item__status.ok  { color: var(--success); font-weight: 500; }
.upload-item__status.err { color: var(--danger); font-weight: 500; }
.upload-progress       { flex-shrink: 0; width: 100px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.upload-progress__bar  { height: 100%; background: var(--brand-pink); border-radius: 2px; transition: width .15s; }

/* ── Images grid (admin) ────────────────────────────────────────────────────── */
.images-section    { margin-top: 8px; }
.img-section-block { margin-bottom: 32px; }
.img-section-title {
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.img-group       { margin-bottom: 20px; }
.img-group-title { font-size: .88rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 10px; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.img-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.img-card__thumb         { aspect-ratio: 4/3; overflow: hidden; background: var(--bg); }
.img-card__thumb img     { width: 100%; height: 100%; object-fit: cover; }
.img-card__body          { padding: 10px; }
.img-card__name          { font-size: .78rem; color: var(--text-secondary); margin-bottom: 8px;
                           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-card__edit          { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.img-card__form          { margin-bottom: 8px; }
.img-card__form-actions  { display: flex; gap: 6px; margin-top: 8px; }
.img-card__footer        { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.img-size                { font-size: .72rem; color: var(--text-muted); }
.img-tag                 { display: inline-block; padding: 2px 7px; border-radius: 3px;
                           font-size: .72rem; font-weight: 500; background: var(--bg); color: var(--text-secondary); }
.img-tag--section        { background: var(--text-primary); color: #fff; }

/* ════════════════════════════════════════════════════════════════════════════
   CLIENTE — pagina pubblica
   ════════════════════════════════════════════════════════════════════════════ */
.client-page { background: var(--bg); }

/* Header */
.client-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 62px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.client-brand img { height: 30px; width: auto; max-width: none; }

/* Cover hero — full bleed, alta qualità */
.cover-hero {
  position: relative; width: 100%; overflow: hidden;
  height: min(80vh, 700px);
  background: #111;
}
.cover-hero__img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.cover-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.1) 50%, transparent 100%);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 36px 40px;
}
.cover-hero__text { }
.cover-hero__title {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 400; color: #fff; margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.cover-hero__meta {
  font-size: .88rem; color: rgba(255,255,255,.75); letter-spacing: .04em;
}

/* Intro (senza cover) */
.client-intro { max-width: 900px; margin: 52px auto 16px; padding: 0 28px; text-align: center; }
.client-title { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem);
                font-weight: 400; margin-bottom: 10px; }
.client-meta  { font-size: .88rem; color: var(--text-secondary); letter-spacing: .03em; }

/* Lettera di presentazione */
.delivery-letter {
  max-width: 760px; margin: 44px auto 0; padding: 36px 44px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.delivery-letter__greeting {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 400;
  margin-bottom: 16px; color: var(--text-primary);
}
.delivery-letter__body {
  font-size: .97rem; line-height: 1.75; color: var(--text-secondary);
  margin-bottom: 20px;
}
.delivery-letter__body strong { color: var(--text-primary); font-weight: 600; }
.delivery-letter__sign {
  font-size: .92rem; color: var(--text-muted);
}
.delivery-letter__sign em { font-style: normal; color: var(--brand-pink); font-weight: 500; }

/* Container griglia */
.render-container { max-width: 1200px; margin: 0 auto; padding: 0 24px 40px; }

/* Section */
.render-section         { margin-top: 52px; }
.render-section__header { margin-bottom: 20px; display: flex; align-items: center; gap: 14px; }
.render-section__title  {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 400;
  color: var(--text-primary);
}
.render-section__header::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.render-group-title {
  font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin: 24px 0 12px;
}

/* Image grid */
.render-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.render-card {
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition);
}
.render-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.render-card__img-wrap {
  position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg); cursor: zoom-in;
}
.render-card__img-wrap--cover  { aspect-ratio: 16/9; }
.render-card__img-wrap--social { aspect-ratio: 3/4; }
.render-card__img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease; display: block;
}
.render-card:hover .render-card__img-wrap img { transform: scale(1.04); }

/* Hint zoom */
.render-card__zoom-hint {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.5); color: #fff; border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition); backdrop-filter: blur(4px);
}
.render-card:hover .render-card__zoom-hint { opacity: 1; }

/* Badge risoluzione + aspect ratio sul thumbnail */
.render-card__meta {
  position: absolute; left: 8px; bottom: 8px;
  display: flex; align-items: center; gap: 6px;
  pointer-events: none;
}
.render-card__meta span {
  background: rgba(0,0,0,.62); color: #fff;
  font-size: .7rem; font-weight: 500;
  padding: 3px 7px; border-radius: 3px;
  letter-spacing: .02em; backdrop-filter: blur(4px);
  white-space: nowrap;
}
.render-card__aspect { font-variant-numeric: tabular-nums; }

.render-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; gap: 8px;
}
.render-card__name {
  font-size: .82rem; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}

/* Footer pagina */
.client-footer {
  text-align: center; padding: 52px 24px 36px;
  color: var(--text-muted); font-size: .8rem; display: flex; flex-direction: column;
  align-items: center; gap: 10px; border-top: 1px solid var(--border); margin-top: 52px;
}
.client-footer img { height: 30px; width: auto; max-width: none; margin: 0 auto; }

/* ── Link "qui" inline nella lettera di presentazione ───────────────────────── */
.delivery-letter__link {
  color: var(--brand-pink); text-decoration: underline;
  text-underline-offset: 2px; transition: color var(--transition);
}
.delivery-letter__link:hover { color: var(--brand-red); }

/* ════════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,10,10,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.lightbox.active { opacity: 1; pointer-events: all; }

.lightbox__close {
  position: absolute; top: 18px; right: 20px;
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,.22); }

.lightbox__stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  max-width: 92vw; max-height: 82vh;
}
.lightbox__img {
  max-width: 92vw; max-height: 82vh;
  object-fit: contain; border-radius: 3px;
  transition: opacity .2s ease; opacity: 0;
}

.lightbox__spinner {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
}
.lightbox__spinner::after {
  content: ''; width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition); z-index: 1;
}
.lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

.lightbox__bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
}
.lightbox__caption {
  color: rgba(255,255,255,.85); font-size: .88rem;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0;
}
.lightbox__caption-name { font-weight: 500; }
.lightbox__caption-meta {
  color: rgba(255,255,255,.55); font-size: .78rem; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lightbox__bar-right { display: flex; align-items: center; gap: 16px; }
.lightbox__counter  { color: rgba(255,255,255,.45); font-size: .8rem; }

/* ════════════════════════════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--text-primary); color: #fff; padding: 10px 22px;
  border-radius: 30px; font-size: .85rem; font-weight: 500;
  opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; z-index: 9999; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Link tabella dashboard ─────────────────────────────────────────────────── */
.pub-link-table {
  font-size: .8rem; color: var(--text-muted);
  max-width: 260px; display: inline-block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle;
}
.pub-link-table:hover { color: var(--brand-pink); }

/* Badge commenti non letti */
.badge-comment-count {
  display: inline-block; background: #FFF0F6; color: var(--brand-pink);
  border: 1px solid rgba(201,27,140,.25);
  border-radius: 20px; padding: 2px 8px;
  font-size: .72rem; font-weight: 600; white-space: nowrap; vertical-align: middle;
}
.ml-6 { margin-left: 6px; }

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN — ANALYTICS
   ════════════════════════════════════════════════════════════════════════════ */
.analytics-section { margin-top: 48px; }
.analytics-stats {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.analytics-stat {
  flex: 1 1 120px; min-width: 100px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 20px; text-align: center;
}
.analytics-stat__val {
  display: block; font-size: 2rem; font-weight: 700;
  color: var(--primary); font-family: var(--font-display); line-height: 1;
  margin-bottom: 6px;
}
.analytics-stat__lbl {
  font-size: .76rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em;
}
.analytics-subtitle {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); margin: 0 0 10px;
}
.analytics-top { margin-bottom: 20px; }
.analytics-top-list { display: flex; flex-direction: column; gap: 6px; }
.analytics-top-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px; font-size: .83rem;
}
.analytics-top-name {
  color: var(--text-primary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.analytics-top-views { color: var(--text-muted); flex-shrink: 0; margin-left: 12px; font-size: .78rem; }
.analytics-log {
  list-style: none; padding: 0; margin: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.analytics-log li {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px; font-size: .82rem; border-bottom: 1px solid var(--border);
}
.analytics-log li:last-child { border-bottom: none; }
.analytics-log__time  { color: var(--text-muted); font-size: .76rem; flex-shrink: 0; white-space: nowrap; }
.analytics-log__event { color: var(--text-secondary); }

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN — COMMENTI CLIENTI
   ════════════════════════════════════════════════════════════════════════════ */
.comments-section { margin-top: 40px; }
.comments-empty   { font-size: .88rem; color: var(--text-muted); padding: 20px 0; }

.comments-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.comment-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  transition: border-color var(--transition);
}
.comment-card--unread { border-left: 3px solid var(--brand-pink); background: #FFF8FD; }
.comment-card--read   { opacity: .75; }

.comment-card__thumb {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: var(--radius); flex-shrink: 0; background: var(--bg);
}
.comment-card__body      { flex: 1; min-width: 0; }
.comment-card__img-name  { font-size: .75rem; font-weight: 600; color: var(--text-muted);
                           letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.comment-card__text      { font-size: .9rem; color: var(--text-primary); line-height: 1.55; margin-bottom: 4px; }
.comment-card__meta      { font-size: .75rem; color: var(--text-muted); }

.btn-mark-read {
  flex-shrink: 0; white-space: nowrap;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  background: none; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 5px 10px; cursor: pointer; font-family: var(--font-body);
  color: var(--text-secondary); transition: all var(--transition);
}
.btn-mark-read:hover { border-color: var(--success); color: var(--success); }
.comment-read-badge {
  flex-shrink: 0; font-size: .75rem; color: var(--text-muted); white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN — GESTIONE UNITÀ
   ════════════════════════════════════════════════════════════════════════════ */
.units-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; margin-bottom: 24px;
}
.units-panel__header {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px;
}
.units-panel__header .section-label { margin-bottom: 0; }
.units-panel__hint { font-size: .78rem; color: var(--text-muted); }

.units-panel__body { display: flex; flex-direction: column; gap: 12px; }

.unit-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Chip informativa (lista unità esistenti) */
.unit-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  background: var(--bg); border: 1.5px solid var(--border);
  font-size: .82rem; font-weight: 500; color: var(--text-primary);
}
.unit-chip__del {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.05rem; line-height: 1;
  padding: 0 0 0 2px; display: flex; align-items: center;
  transition: color var(--transition);
}
.unit-chip__del:hover { color: var(--danger); }

/* Chip selettore upload */
.unit-chip--upload {
  cursor: pointer; background: var(--bg);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.unit-chip--upload:hover { border-color: var(--text-secondary); }
.unit-chip--upload.active {
  background: var(--text-primary); color: #fff; border-color: var(--text-primary);
}

/* Form aggiungi unità */
.unit-add-form {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.unit-add-form__input { flex: 1; min-width: 180px; max-width: 280px; }

/* Selettore unità sopra il drop zone */
.upload-unit-selector {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 12px 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.upload-unit-selector__label {
  font-size: .75rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-secondary); white-space: nowrap;
}

/* Blocchi immagini per unità */
.img-unit-block {
  margin-bottom: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.img-unit-block__header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.img-unit-badge {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  background: var(--text-primary); color: #fff;
  font-size: .75rem; font-weight: 600; letter-spacing: .05em;
}
.img-unit-badge--none {
  background: var(--bg); color: var(--text-muted); border: 1.5px solid var(--border);
}
.img-unit-count { font-size: .8rem; color: var(--text-muted); }

.img-unit-block .img-section-block { margin: 0; padding: 16px 16px 0; }
.img-unit-block .img-section-block:last-child { padding-bottom: 16px; }
.img-empty-unit { padding: 24px; font-size: .85rem; color: var(--text-muted); text-align: center; }

/* Riduci h3→h4 e h4→h5 quando siamo dentro img-unit-block */
.img-unit-block .img-section-title { font-size: .7rem; }

/* ════════════════════════════════════════════════════════════════════════════
   CLIENTE — OVERVIEW UNITÀ
   ════════════════════════════════════════════════════════════════════════════ */
.units-overview { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }

.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.unit-overview-card {
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition);
}
.unit-overview-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.unit-overview-card__img-wrap {
  position: relative; display: block; aspect-ratio: 4/3;
  overflow: hidden; background: var(--bg);
}
.unit-overview-card__img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.unit-overview-card:hover .unit-overview-card__img-wrap img { transform: scale(1.04); }

.unit-overview-card__no-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}

.unit-overview-card__badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--brand-gradient); color: #fff;
  padding: 5px 14px; border-radius: 20px;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.unit-overview-card__body {
  padding: 16px;
}
.unit-overview-card__info {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px; gap: 8px;
}
.unit-overview-card__name {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 400;
  color: var(--text-primary);
}
.unit-overview-card__count {
  font-size: .8rem; color: var(--text-muted); white-space: nowrap;
}
.unit-overview-card__actions {
  display: flex; gap: 8px; align-items: center;
}

/* Label unità nella vista dettaglio */
.cover-hero__unit-label {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-bottom: 8px;
  background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Fallback per browser senza support */
  text-shadow: none;
}
.client-unit-label {
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-pink); margin-bottom: 8px;
}

.client-header__right { display: flex; align-items: center; gap: 10px; }

/* ════════════════════════════════════════════════════════════════════════════
   CLIENTE — FEEDBACK nel LIGHTBOX (Beta)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Pannello feedback: drawer laterale ─────────────────────────────────────  */
.lightbox__comment-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; z-index: 10000;
  background: #111; border-left: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateX(100%);
  transition: opacity .28s ease, transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.lightbox__comment-panel.active {
  opacity: 1; pointer-events: all; transform: translateX(0);
}
/* Shifta l'immagine a sinistra per non coprirla */
.lightbox--panel-open .lightbox__stage {
  transform: translateX(-190px);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.lightbox--panel-open .lightbox__next {
  right: 396px; transition: right .3s cubic-bezier(.4,0,.2,1);
}

.lightbox__comment-box {
  padding: 28px 24px; flex: 1; display: flex; flex-direction: column;
}
.lightbox__comment-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.lightbox__comment-prompt {
  color: rgba(255,255,255,.9); font-size: 1rem; line-height: 1.4;
  font-family: var(--font-display); font-weight: 500; margin: 0;
}
.lightbox__comment-textarea {
  width: 100%; padding: 10px 12px;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--radius); color: #fff; font-family: var(--font-body);
  font-size: .88rem; resize: vertical; line-height: 1.5;
  transition: border-color var(--transition);
}
.lightbox__comment-textarea::placeholder { color: rgba(255,255,255,.35); }
.lightbox__comment-textarea:focus { outline: none; border-color: rgba(255,255,255,.5);
                                     box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.lightbox__comment-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px;
}
.lightbox__comment-submit {
  display: inline-flex; align-items: center;
  background: #fff; color: #111; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: .78rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 8px 16px; border-radius: var(--radius);
  transition: opacity var(--transition);
}
.lightbox__comment-submit:hover    { opacity: .88; }
.lightbox__comment-submit:disabled { opacity: .4; cursor: not-allowed; }
.lightbox__comment-success {
  color: #6fcf97; font-size: .9rem; font-weight: 600; margin: 14px 0 0;
}
.lightbox__comment-submitted {
  background: rgba(255,255,255,.06);
  border-left: 3px solid rgba(255,255,255,.28);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px; margin-top: 12px;
  font-size: .88rem; color: rgba(255,255,255,.75);
  line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  font-style: italic;
}

.lightbox__comment-desc {
  color: rgba(255,255,255,.42); font-size: .77rem; line-height: 1.5; margin: 5px 0 0;
}
.lightbox__comment-desc em { font-style: normal; color: rgba(255,255,255,.6); }

.lightbox__comment-another {
  display: none; align-items: center; gap: 6px;
  background: none; border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.65);
  font-family: var(--font-body); font-size: .78rem; padding: 7px 14px;
  border-radius: var(--radius); cursor: pointer; margin-top: 10px;
  transition: border-color .15s, color .15s;
}
.lightbox__comment-another:hover { border-color: rgba(255,255,255,.5); color: #fff; }

/* ── Pagina "consegna non più disponibile" ──────────────────────────────────── */
.gone-page {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 80px 24px 60px;
}
.gone-page__icon { margin-bottom: 24px; }
.gone-page__title {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
  color: var(--text-primary); margin: 0 0 14px;
}
.gone-page__sub {
  font-size: .95rem; color: var(--text-secondary); line-height: 1.65;
  margin: 0 0 28px; max-width: 420px;
}

/* ── Cestino in admin/index.php ──────────────────────────────────────────────── */
.trash-section {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.trash-section__toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; cursor: pointer; list-style: none;
  background: var(--bg);
  font-size: .88rem; font-weight: 600; color: var(--text-secondary);
  user-select: none;
}
.trash-section__toggle::-webkit-details-marker { display: none; }
.trash-section__toggle:hover { background: var(--surface); }
.trash-count {
  background: var(--text-muted); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 700; padding: 1px 8px; margin-left: 2px;
}
.trash-list { padding: 0 0 4px; }
.trash-row td { opacity: .75; }

/* ── BETA badge (usato in overlay download e altrove) ───────────────────────── */
.beta-badge {
  display: inline-block; font-size: .65em; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; vertical-align: middle;
  background: rgba(66,133,244,.15); color: #4285F4;
  border: 1px solid rgba(66,133,244,.35);
  padding: 1px 6px; border-radius: 4px; margin-left: 5px;
}

/* ── BETA badge DENTRO il pulsante feedback (tono ambrato) ─────────────────── */
.btn-beta-badge {
  font-size: .62em; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; vertical-align: middle;
  background: rgba(255,213,79,.2); color: #ffd54f;
  border: 1px solid rgba(255,213,79,.45);
  padding: 1px 5px; border-radius: 3px; margin-left: 5px;
}

/* ── Feedback button nel lightbox ───────────────────────────────────────────── */
.btn--feedback-lb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  background: rgba(255,200,50,.14); border: 1.5px solid rgba(255,200,50,.55);
  color: #ffd54f; border-radius: var(--radius);
  font-family: var(--font-body); font-size: .75rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn--feedback-lb:hover {
  background: rgba(255,200,50,.28); border-color: rgba(255,200,50,.85);
}

/* ── Numero render nei titoli sezione ───────────────────────────────────────── */
.render-section__count {
  font-size: .78em; font-weight: 400; color: var(--text-muted);
  opacity: .7; margin-left: 4px;
}
.render-group-title .render-section__count { font-size: .85em; }

/* ── Download overlay (popup scaricamento ZIP) ──────────────────────────────── */
.download-overlay {
  position: fixed; inset: 0; z-index: 12000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.download-overlay.active { opacity: 1; pointer-events: all; }
.download-overlay__box {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 40px 36px;
  max-width: 520px; width: 100%; text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.download-overlay__x {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--text-muted); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.download-overlay__x:hover { background: var(--bg); color: var(--text-primary); }
.download-overlay__anim {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; color: var(--primary);
  animation: dlBounce 1.2s ease-in-out infinite;
}
@keyframes dlBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.download-overlay__title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: var(--text-primary); margin: 0 0 10px;
}
.download-overlay__sub {
  color: var(--text-secondary); font-size: .95rem; line-height: 1.65;
  margin: 0 0 28px;
}
.download-overlay__review {
  background: linear-gradient(150deg, #f2f6ff 0%, #e8f0fe 100%);
  border: 1px solid #c6d4f8; border-radius: 16px;
  padding: 28px 24px 24px; margin: 0 0 22px;
  box-shadow: 0 6px 22px rgba(66,133,244,.12);
}
.download-overlay__review-stars {
  display: block; font-size: 1.6rem; letter-spacing: 5px; margin-bottom: 12px;
}
.download-overlay__review-title {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary); margin: 0 0 8px;
}
.download-overlay__review-sub {
  color: var(--text-secondary); font-size: .9rem; line-height: 1.55;
  margin: 0 auto 18px; max-width: 380px;
}
.download-overlay__review-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; background: #4285F4; color: #fff;
  border: none; border-radius: 10px;
  font-family: var(--font-body); font-size: .85rem; font-weight: 600;
  letter-spacing: .04em; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 18px rgba(66,133,244,.4);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.download-overlay__review-cta:hover {
  background: #3367d6; transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(66,133,244,.5);
}
.download-overlay__close-link {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: .85rem; color: var(--text-muted);
  padding: 6px 10px; transition: color .15s;
}
.download-overlay__close-link:hover { color: var(--text-primary); }

/* ── Google Review card ─────────────────────────────────────────────────────── */
.google-review-card {
  text-align: center;
  max-width: 580px; margin: 56px auto 0; padding: 40px 36px 36px;
  background: linear-gradient(150deg, #f2f6ff 0%, #e8f0fe 100%);
  border: 1px solid #c6d4f8; border-radius: 20px;
  box-shadow: 0 8px 36px rgba(66,133,244,.12);
}
.google-review-card__stars {
  display: block; font-size: 24px; letter-spacing: 5px; margin-bottom: 16px;
}
.google-review-card__logo {
  display: flex; justify-content: center; margin-bottom: 14px;
}
.google-review-card__title {
  font-size: 1.3rem; font-weight: 700; color: var(--text-primary);
  margin: 0 0 10px; font-family: var(--font-display);
}
.google-review-card__sub {
  font-size: .9rem; color: var(--text-secondary); line-height: 1.65;
  margin: 0 auto 26px; max-width: 380px;
}
.btn--google-review-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; background: #4285F4; color: #fff;
  border: none; border-radius: 10px;
  font-family: var(--font-body); font-size: .84rem; font-weight: 600;
  letter-spacing: .04em; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 18px rgba(66,133,244,.4);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn--google-review-cta:hover {
  background: #3367d6; transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(66,133,244,.5);
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .meta-editor__fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .admin-header, .client-header { padding: 0 16px; height: 54px; }
  .admin-container { padding: 0 16px; }
  .admin-main { padding: 24px 0 60px; }

  .delivery-header { flex-direction: column; }
  .delivery-header__actions { width: 100%; flex-wrap: wrap; }

  .meta-editor__fields { grid-template-columns: 1fr; }

  .img-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  .render-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .render-container { padding: 0 14px 32px; }
  .delivery-letter { margin: 28px 14px 0; padding: 24px 20px; }
  .client-header { height: 54px; }
  .cover-hero { height: min(55vw, 380px); }
  .cover-hero__overlay { padding: 20px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .cover-hero__title { font-size: 1.3rem; }

  .lightbox__nav { width: 38px; height: 38px; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }

  /* Feedback panel: bottom sheet su mobile */
  .lightbox__comment-panel {
    top: auto; right: 0; left: 0; bottom: 0;
    width: 100%; max-height: 62vh; border-left: none;
    border-top: 1px solid rgba(255,255,255,.1);
    transform: translateY(100%);
  }
  .lightbox__comment-panel.active { transform: translateY(0); }
  .lightbox--panel-open .lightbox__stage { transform: none; }
  .lightbox--panel-open .lightbox__next { right: 8px; }

  /* Download overlay — mobile */
  .download-overlay__box { padding: 28px 20px 24px; }
  .download-overlay__title { font-size: 1.2rem; }

  /* Units — mobile */
  .units-grid { grid-template-columns: 1fr; margin-top: 24px; }
  .units-overview { padding: 0 14px 40px; }
  .upload-unit-selector { flex-direction: column; align-items: flex-start; }
  .unit-add-form { flex-direction: column; align-items: flex-start; }
  .unit-add-form__input { max-width: 100%; width: 100%; }
  .client-header__right { gap: 6px; }

  /* Google review card + lightbox comment — mobile */
  .google-review-card { margin: 32px 14px 0; padding: 28px 20px 24px; }
  .lightbox__comment-box { padding: 18px; }
}

@media (max-width: 400px) {
  .render-grid { grid-template-columns: 1fr; }
}
