/* ============================================================
   Photo Metadata Tool
   Inter Variable (UI + display, opsz 14–32) · IBM Plex Mono (code)
   ============================================================ */

:root {
  /* Palette */
  --bg:            #ffffff;
  --bg-elev:       #ffffff;
  --bg-subtle:     #f4f4f4;
  --bg-hover:      #efefef;
  --ink:           #111111;
  --ink-soft:      #555555;
  --ink-muted:     #888888;
  --rule:          #e3e3e3;
  --rule-soft:     #ebebeb;
  --accent:        #bf5c14;
  --accent-light:  #fef2e7;
  --accent-deep:   #8a3d09;
  --accent-glow:   rgba(191,92,20,0.16);
  --blue:          #1d4ed8;
  --blue-light:    rgba(29,78,216,0.08);
  --blue-border:   rgba(29,78,216,0.22);
  --danger:        #b91c1c;
  --danger-light:  #fef2f2;
  --ok:            #15803d;
  --ok-light:      #f0fdf4;

  /* Shape */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  18px;

  /* Shadow */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 6px 20px -4px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:  0 20px 40px -8px rgba(0,0,0,0.13), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-focus: 0 0 0 3px var(--accent-glow);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 14;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-deep); }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 2.5rem;
  height: 56px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Inter", system-ui, sans-serif;
}
.brand-mark {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}
.brand-name { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.025em; }
.brand-sub  {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: none;
  letter-spacing: 0;
}

.topnav {
  display: flex;
  gap: 0.25rem;
  font-size: 0.8rem;
}
.topnav a {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}
.topnav a:hover { background: var(--bg-hover); color: var(--ink); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3rem 2.5rem 6rem;
}

.footer {
  border-top: 1px solid var(--rule);
  padding: 0.85rem 2.5rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero { margin-bottom: 2.5rem; max-width: 680px; }
.eyebrow {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 0.85rem;
}
.hero h1 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 0.85rem;
  font-variation-settings: "opsz" 32;
}
.hero h1 em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
}
.lede {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0;
  line-height: 1.6;
}

/* ── Field importance badge legend ─────────────────────────── */
.importance-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 2rem;
  padding: 0.8rem 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.importance-legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ── Field importance badges ────────────────────────────────── */
.field-badge {
  display: inline-flex;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15em 0.55em;
  border-radius: 4px;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.6;
}
.field-badge.essential {
  background: var(--accent-light);
  color: var(--accent-deep);
  border: 1px solid rgba(191,92,20,0.22);
}
.field-badge.recommended {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}
.field-badge.optional {
  background: var(--bg-hover);
  color: var(--ink-muted);
  border: 1px solid var(--rule);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-family: "Inter", system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s,
              box-shadow 0.14s, transform 0.1s;
  text-decoration: none;
  line-height: 1.4;
  user-select: none;
}
.btn:hover {
  background: var(--ink);
  color: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn.primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  box-shadow: var(--shadow-sm);
}
.btn.ghost {
  border-color: var(--rule);
  color: var(--ink-soft);
  background: var(--bg-elev);
}
.btn.ghost:hover {
  border-color: var(--ink-soft);
  background: var(--bg-hover);
  color: var(--ink);
}
.btn.danger {
  color: var(--danger);
  border-color: var(--rule);
  background: var(--bg-elev);
}
.btn.danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn.big { font-size: 0.9rem; padding: 0.75rem 1.75rem; border-radius: var(--radius); }
.btn.small { padding: 0.28rem 0.65rem; font-size: 0.72rem; }
.btn:disabled { opacity: 0.45; cursor: wait; transform: none; pointer-events: none; }

.link-btn {
  background: none; border: none;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: color 0.12s;
}
.link-btn:hover { color: var(--accent-deep); }

/* ── Client grid ────────────────────────────────────────────── */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.client-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  overflow: hidden;
}
.client-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--rule-soft);
}
.logo-box {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--bg-subtle);
  padding: 1rem;
}
.logo-box img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.logo-placeholder {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.client-meta { padding: 1.1rem 1.25rem 0.6rem; }
.client-meta h3 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}
.creator { font-size: 0.88rem; margin: 0; color: var(--ink-soft); }
.copy {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin: 0.35rem 0 0;
  font-family: "IBM Plex Mono", monospace;
}
.client-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem 1.1rem;
  margin-top: auto;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty {
  border: 1.5px dashed var(--rule);
  padding: 4rem 2rem;
  text-align: center;
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.empty p { color: var(--ink-soft); margin: 0 0 1.5rem; font-size: 1rem; }

/* ── Login ──────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}
.login-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem;
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: 1.25rem;
}
.login-card h1 { margin: 0; font-size: 1.4rem; }
.login-card p.lede { margin: -0.75rem 0 0; max-width: none; }
.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0;
}

/* ── Form ───────────────────────────────────────────────────── */
.form {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-xs);
}
.form-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
.form-grid fieldset.full { grid-column: 1 / -1; }

fieldset {
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.25rem 1rem;
  margin: 0;
  background: var(--bg-subtle);
  display: grid;
  gap: 0.85rem;
}
legend {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0 0.5rem;
  letter-spacing: -0.01em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
legend small {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 400;
  letter-spacing: 0;
}

label { display: grid; gap: 0.3rem; font-size: 0.85rem; }
label > span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
label small {
  font-family: "Inter", system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-muted);
  font-weight: 400;
}
label.full { grid-column: 1 / -1; }

input[type="text"], input[type="email"], input[type="url"],
input[type="number"], input[type="password"], select, textarea {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
  background: var(--bg-elev);
}
textarea { resize: vertical; min-height: 64px; font-family: inherit; line-height: 1.5; }
input[readonly] { background: var(--bg); color: var(--ink-soft); cursor: not-allowed; border-style: dashed; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9388' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.form-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ── Watermark sub-grid ─────────────────────────────────────── */
.wm-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  align-items: start;
}
.wm-logo .label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}
.logo-preview {
  aspect-ratio: 16 / 9;
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.logo-preview img { max-width: 80%; max-height: 80%; object-fit: contain; }
.logo-preview span { color: var(--ink-muted); font-size: 0.78rem; font-family: "IBM Plex Mono", monospace; }
.wm-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* ── Watermark preview canvas ───────────────────────────────── */
.wm-preview-wrap { margin-top: 1.5rem; }
.wm-preview-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin: 0 0 0.4rem;
}
.wm-preview-canvas {
  display: block;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: #d8d8d8;
}
.wm-preview-hint {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.63rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0.35rem 0 0;
}

/* ── Dropzone ───────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 3.5rem 2rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xs);
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow-focus);
}
.dropzone.uploading { opacity: 0.55; pointer-events: none; }
.dz-icon {
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--accent);
}
.dz-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.3rem;
  margin: 0 0 0.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dz-sub { margin: 0 0 1rem; color: var(--ink-soft); font-size: 0.9rem; }
.dz-help {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin: 0;
}

/* ── Photo list ─────────────────────────────────────────────── */
.photo-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.photo-list-header h2 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.badge {
  display: inline-block;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  background: var(--accent);
  color: #fff;
  padding: 0.12rem 0.55rem;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 0.5rem;
}
.bulk-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.photo-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.15s;
}
.photo-row:hover { box-shadow: var(--shadow-sm); }
.photo-thumb {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.photo-thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
}
.photo-thumb .filename {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  color: var(--ink-muted);
  word-break: break-all;
  text-align: center;
}
.photo-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-content: start;
}
.field.field-multi  { grid-column: 1 / -1; }
.field.field-select { grid-column: 1 / -1; }
.field.required > span::after { content: ""; }
.field .hint {
  display: block;
  font-size: 0.68rem;
  color: var(--accent);
  margin-top: 2px;
  font-family: "Inter", system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}

/* ── Per-photo status + riprocessa ──────────────────────────── */
.photo-status-wrap { min-height: 1.4rem; margin-top: 0.3rem; }
.photo-status {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.14rem 0.5rem;
  border-radius: 99px;
}
.photo-status.ok    { background: var(--ok-light); color: var(--ok); }
.photo-status.error { background: var(--danger-light); color: var(--danger); cursor: help; }
.reprocess-btn {
  margin-top: 0.45rem;
  font-size: 0.7rem;
  padding: 0.28rem 0.55rem;
  width: 100%;
}

/* ── Progress bar ───────────────────────────────────────────── */
.progress-wrap { margin: 0 0 1.5rem; }
.progress-bar-bg {
  height: 5px;
  background: var(--rule);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  border-radius: 99px;
  width: 0%;
  transition: width 0.28s ease;
}
.progress-text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink-soft);
  margin: 0.4rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Char counter ───────────────────────────────────────────── */
.char-counter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.67rem;
  text-align: right;
  margin-top: 3px;
  color: var(--ink-muted);
  transition: color 0.15s;
}
.char-counter.ok   { color: var(--ok); }
.char-counter.warn { color: var(--accent); }
.char-counter.over { color: var(--danger); font-weight: 600; }

/* ── Result panel ───────────────────────────────────────────── */
.result-panel {
  margin-top: 2.5rem;
  padding: 2.25rem;
  border: 1px solid var(--ok);
  background: var(--ok-light);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.result-panel h2 {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ok);
  margin: 0 0 0.4rem;
  font-variation-settings: "opsz" 24;
}
.result-panel p { color: var(--ink-soft); margin: 0 0 1.5rem; }
.result-panel .hint { margin-top: 1.25rem; font-size: 0.85rem; font-style: italic; color: var(--ink-muted); }

/* ── Export history (home) ──────────────────────────────────── */
.exports-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.exports-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
}
.exports-list {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.export-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.85rem;
  transition: background 0.12s;
}
.export-row:hover { background: var(--bg-subtle); }
.export-row:last-child { border-bottom: none; }
.export-slug { font-family: "Inter", system-ui, sans-serif; font-weight: 700; font-size: 0.9rem; }
.export-date,
.export-size {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink-muted);
  white-space: nowrap;
}
.exports-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.55rem 0 0;
}

/* ============================================================
   Guide page
   ============================================================ */
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-bottom: 3rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}
.guide-toc a { color: var(--accent); }
.guide-toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

.guide-section {
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}
.guide-section:last-child { border-bottom: none; }
.guide-section h2 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  font-variation-settings: "opsz" 24;
}
.guide-section h3 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}
.guide-section p { max-width: 72ch; margin: 0 0 1rem; color: var(--ink-soft); }
.guide-section a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.guide-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.guide-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-xs);
}
.guide-card-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.guide-card h3 { margin-bottom: 0.5rem; }
.guide-card p  { margin: 0; font-size: 0.9rem; }

.guide-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  box-shadow: var(--shadow-xs);
}
.flow-num {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.flow-arrow { color: var(--ink-muted); font-size: 0.85rem; }

.guide-fieldset {
  margin: 1.75rem 0 0;
}
.guide-fieldset-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.field-list { margin: 0; padding: 0; }
.field-entry {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0.75rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.field-entry:last-child { border-bottom: none; }
.field-entry dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}
.field-entry dd {
  margin: 0;
  font-size: 0.87rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.field-entry dd code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.77rem;
  background: var(--bg-hover);
  padding: 0.05em 0.35em;
  border-radius: var(--radius-xs);
  color: var(--ink);
}
.field-entry dd strong { color: var(--ink); }

.tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-xs);
  vertical-align: middle;
  white-space: nowrap;
}
.tag-wp     { background: #e8f0f8; color: #1d4ed8; }
.tag-google { background: var(--danger-light); color: var(--danger); }
.tag-iptc   { background: var(--bg-hover); color: var(--ink-soft); }
.tag-wcag   { background: var(--ok-light); color: var(--ok); }

.guide-callout {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  font-size: 0.87rem;
  color: var(--ink-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 72ch;
}
.guide-callout strong { color: var(--ink); }
.guide-callout-tip {
  border-left-color: var(--ok);
  background: var(--ok-light);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.guide-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1.5px solid var(--rule);
  background: var(--bg-subtle);
}
.guide-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-soft);
  vertical-align: top;
}
.guide-table td:first-child { color: var(--ink); }
.guide-table td code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.77rem;
  background: var(--bg-hover);
  padding: 0.05em 0.35em;
  border-radius: var(--radius-xs);
}
.guide-table tr:last-child td { border-bottom: none; }
.guide-table tr:hover td { background: var(--bg-subtle); }

.prio-high { color: var(--danger); font-weight: 600; font-size: 0.78rem; }
.prio-med  { color: #b45309;        font-size: 0.78rem; }
.prio-low  { color: var(--ink-muted); font-size: 0.78rem; }

.faq-list { margin: 0; padding: 0; }
.faq-entry {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule-soft);
  max-width: 72ch;
}
.faq-entry:last-child { border-bottom: none; }
.faq-entry dt { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; color: var(--ink); }
.faq-entry dd { margin: 0; color: var(--ink-soft); font-size: 0.87rem; line-height: 1.6; }
.faq-entry dd a    { color: var(--accent); }
.faq-entry dd code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.77rem;
  background: var(--bg-hover);
  padding: 0.05em 0.35em;
  border-radius: var(--radius-xs);
}

/* ── Session options (logo variant) ─────────────────────────── */
.session-options {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
}
.session-opt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.session-opt-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.logo-variant-toggle {
  display: flex;
  gap: 0.3rem;
}
.lvt-btn {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.13s;
}
.lvt-btn:hover:not(:disabled)       { border-color: var(--ink-soft); color: var(--ink); }
.lvt-btn.active                     { background: var(--ink); color: var(--bg-elev); border-color: var(--ink); }
.lvt-btn:disabled, .lvt-btn.lvt-disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Watermark settings row (sotto i 2 loghi) ───────────────── */
.wm-settings-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ── Canvas preview header ──────────────────────────────────── */
.wm-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.canvas-logo-toggle {
  display: flex;
  gap: 0.3rem;
}
.clt-btn {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.2rem 0.6rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-xs);
  background: var(--bg-elev);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.12s;
}
.clt-btn:hover:not(:disabled) { border-color: var(--ink-soft); color: var(--ink); }
.clt-btn.active { background: var(--ink); color: var(--bg-elev); border-color: var(--ink); }
.clt-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Verify SEO panel ───────────────────────────────────────── */
.verify-btn {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  padding: 0.28rem 0.55rem;
  width: 100%;
  border-color: var(--blue-border);
  color: var(--blue);
}
.verify-btn:hover { background: var(--blue-light); color: var(--blue); border-color: var(--blue); }

.verify-panel {
  grid-column: 1 / -1;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  animation: vr-fadein 0.15s ease;
}
@keyframes vr-fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.vr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}
.vr-summary {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.7rem;
  border-radius: 99px;
}
.vr-summary.ok    { background: var(--ok-light);      color: var(--ok); }
.vr-summary.warn  { background: var(--accent-light);  color: var(--accent-deep); }
.vr-summary.error { background: var(--danger-light);  color: var(--danger); }

.vr-counts {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.67rem;
  color: var(--ink-muted);
}

.vr-rows {
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.vr-row {
  display: grid;
  grid-template-columns: 18px 140px 1fr auto 18px;
  gap: 0.4rem 0.75rem;
  align-items: baseline;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.82rem;
}
.vr-row:last-child { border-bottom: none; }
.vr-row.ok      { background: var(--bg-elev); }
.vr-row.warn    { background: #fffbf2; }
.vr-row.error   { background: var(--danger-light); }
.vr-row.missing { background: var(--bg-subtle); opacity: 0.75; }

.vr-icon {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}
.vr-row.ok      .vr-icon { color: var(--ok); }
.vr-row.warn    .vr-icon { color: var(--accent); }
.vr-row.error   .vr-icon { color: var(--danger); }
.vr-row.missing .vr-icon { color: var(--ink-muted); }

.vr-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.vr-val-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.vr-value {
  color: var(--ink-soft);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vr-empty {
  color: var(--ink-muted);
  font-style: italic;
  font-size: 0.78rem;
}
.vr-warning {
  font-size: 0.7rem;
  color: var(--accent-deep);
}
.vr-dest {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.63rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-align: right;
}
.vr-tip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: var(--ink-muted);
  cursor: help;
  border: 1px solid var(--rule);
  border-radius: 99px;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vr-tip:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ── Quality slider + max width ─────────────────────────────── */
.quality-slider {
  width: 100px;
  accent-color: var(--accent);
  cursor: pointer;
}
.max-width-input {
  width: 110px;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.28rem 0.55rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--ink);
}
.max-width-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }

/* ── CSV import button ──────────────────────────────────────── */
/* usa .btn.ghost.small già definito */

/* ── Duplicate filename warning ─────────────────────────────── */
.dupe-warning {
  margin-top: 0.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--danger);
  background: var(--danger-light);
  border: 1px solid rgba(185,28,28,0.2);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.5rem;
  text-align: center;
}

/* ── Watermark photo preview ────────────────────────────────── */
.wm-prev-btn {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  padding: 0.28rem 0.55rem;
  width: 100%;
}
.wm-photo-canvas {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  display: block;
}

/* ── Crop photo preview ─────────────────────────────────────── */
.crop-prev-btn {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  padding: 0.28rem 0.55rem;
  width: 100%;
}
.crop-photo-canvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  display: block;
}

/* ── Sessioni in corso (home) ───────────────────────────────── */
.resumable-section {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem 1.25rem;
  background: var(--accent-light);
  border: 1px solid rgba(191,92,20,0.2);
  border-radius: var(--radius);
}
.resumable-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--accent-deep);
}

/* ── Result actions ─────────────────────────────────────────── */
.result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

/* ── Preset panel ───────────────────────────────────────────── */
.presets-panel {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.presets-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.presets-empty { font-size: 0.85rem; color: var(--ink-muted); margin: 0; }
.preset-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg-subtle);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-xs);
}
.preset-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
}
.preset-save-row {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--rule-soft);
  padding-top: 0.65rem;
}
.preset-name-input {
  flex: 1;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}
.preset-name-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }

/* ── WordPress upload panel ─────────────────────────────────── */
#wp-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.wp-progress-wrap { margin-bottom: 0.75rem; }
.wp-results { display: flex; flex-direction: column; gap: 0.3rem; max-height: 200px; overflow-y: auto; }
.wp-row {
  font-size: 0.82rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-xs);
}
.wp-row.ok    { background: var(--ok-light); color: var(--ok); }
.wp-row.error { background: var(--danger-light); color: var(--danger); }
.wp-row a     { color: var(--ok); text-decoration: underline; text-underline-offset: 2px; }

/* ── Bundle export / import ─────────────────────────────────── */
.bundle-section {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.bundle-header { margin-bottom: 1.25rem; }
.bundle-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.bundle-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}
.bundle-desc code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  background: var(--bg-hover);
  padding: 0.05em 0.35em;
  border-radius: var(--radius-xs);
}

.bundle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.bundle-col { display: flex; flex-direction: column; gap: 0.75rem; }
.bundle-col-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule-soft);
}
.bundle-hint {
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin: 0;
}
.bundle-hint code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  background: var(--bg-hover);
  padding: 0.05em 0.35em;
  border-radius: var(--radius-xs);
}
.bundle-muted { color: var(--ink-muted); }

.bundle-checks {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 160px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.bundle-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.25rem;
  border-radius: var(--radius-xs);
  transition: background 0.1s;
}
.bundle-check:hover { background: var(--bg-hover); }
.bundle-check input[type="checkbox"] { accent-color: var(--accent); flex-shrink: 0; }
.bundle-check-sub {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-family: "IBM Plex Mono", monospace;
}
.bundle-check-presets {
  padding-top: 0.35rem;
  border-top: 1px solid var(--rule-soft);
}

.bundle-result {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  line-height: 1.5;
}
.bundle-ok {
  background: var(--ok-light);
  color: var(--ok);
  border: 1px solid rgba(21,128,61,0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}
.bundle-err {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(185,28,28,0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

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

/* ── Verify page ────────────────────────────────────────────── */
.vup-zone {
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-xs);
  margin-bottom: 2rem;
}
.vup-zone:hover, .vup-zone.over {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow-focus);
}
.vup-zone.uploading { opacity: 0.5; pointer-events: none; }
.vup-inner { pointer-events: none; }

.vup-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.vup-result-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.vup-filename {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.vup-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  align-items: start;
}
.vup-col { /* nothing special, sections */ }
.vup-col-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Metadata groups (details/summary) */
.vmeta-group {
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--bg-elev);
}
.vmeta-important { border-color: rgba(191,92,20,0.25); }

.vmeta-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--bg-subtle);
  user-select: none;
  list-style: none;
}
.vmeta-header::-webkit-details-marker { display: none; }
.vmeta-header::before { content: '▶'; font-size: 0.6rem; color: var(--ink-muted); transition: transform 0.15s; }
details[open] .vmeta-header::before { transform: rotate(90deg); }
.vmeta-name { flex: 1; color: var(--ink); }
.vmeta-dot  { color: var(--accent); font-size: 0.55rem; }

.vmeta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.vmeta-table td {
  padding: 0.35rem 0.85rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.vmeta-table tr:last-child td { border-bottom: none; }
.vmeta-field {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--ink-soft);
  width: 40%;
  white-space: nowrap;
}
.vmeta-val {
  color: var(--ink);
  word-break: break-word;
}
.vmeta-row-important .vmeta-field { color: var(--accent-deep); font-weight: 600; }
.vmeta-row-important .vmeta-val   { font-weight: 500; }

/* ── Session delete button ──────────────────────────────────── */
/* usa .btn.danger.ghost.small già definito */

/* ── Programmazioni ──────────────────────────────────────────── */
.sched-status {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}
.sched-status.scheduled { background: var(--accent-light); color: var(--accent-deep); }
.sched-status.published { background: var(--ok-light);     color: var(--ok); }
.sched-status.late      { background: var(--danger-light); color: var(--danger); }

.sched-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.sched-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.sched-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink-soft);
}
.sched-table-wrap {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow-xs);
}
.sched-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: var(--bg-elev);
}
.sched-table th, .sched-table td {
  padding: 0.55rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--rule-soft);
  white-space: nowrap;
}
.sched-table td:nth-child(3) { white-space: normal; min-width: 14rem; }
.sched-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  background: var(--bg-subtle);
}
.sched-table tr:last-child td { border-bottom: none; }
.sched-table tr.highlight td { background: var(--accent-light); }
.sched-notes { color: var(--ink-muted); }
.sched-checked { font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; color: var(--ink-muted); }
.sched-actions { display: flex; gap: 0.4rem; }

/* ── Calendario ──────────────────────────────────────────────── */
.cal-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.cal-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  min-width: 11rem;
  text-align: center;
  color: var(--ink);
  text-transform: capitalize;
}
.cal-nav {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day {
  background: var(--bg-elev);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  min-height: 5.5rem;
  padding: 0.4rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background 0.12s, box-shadow 0.12s;
}
.cal-day-head {
  min-height: auto;
  background: transparent;
  border: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  text-align: center;
  padding: 0.4rem 0.25rem;
}
.cal-day.other-month { background: var(--bg-subtle); border-color: transparent; }
.cal-day.other-month .cal-day-num { color: var(--ink-muted); }
.cal-day-num {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.cal-day.today {
  background: var(--accent-light);
  border-color: var(--accent);
}
.cal-day.today .cal-day-num {
  color: var(--accent-deep);
  font-weight: 700;
}

/* ── Voci programmazione nel calendario ─────────────────────── */
.cal-entries {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.cal-entry {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  padding: 0.18rem 0.4rem;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: filter 0.1s, transform 0.1s;
}
.cal-entry:hover { filter: brightness(0.97); transform: translateY(-1px); }
.cal-entry-client {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-entry-name {
  display: none;
  font-weight: 500;
  font-size: 0.64rem;
  margin-top: 0.15rem;
  white-space: normal;
  word-break: break-word;
}
.cal-entry.expanded .cal-entry-name { display: block; }

.cal-entry.scheduled {
  background: var(--accent-light);
  color: var(--accent-deep);
  border-left-color: var(--accent);
}
.cal-entry.published {
  background: var(--ok-light);
  color: var(--ok);
  border-left-color: var(--ok);
}
.cal-entry.late {
  background: var(--danger);
  color: #fff;
  border-left-color: var(--danger-light);
  box-shadow: 0 0 0 1px var(--danger);
}
.cal-entry.late .cal-entry-name { color: rgba(255,255,255,0.9); }

/* ── Legenda ─────────────────────────────────────────────────── */
.cal-legend {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}
.cal-legend-item { display: flex; align-items: center; gap: 0.4rem; }
.cal-legend-swatch {
  display: inline-block;
  width: 1.6rem;
  height: 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}
.cal-legend-swatch.scheduled { background: var(--accent-light); border-left-color: var(--accent); }
.cal-legend-swatch.published { background: var(--ok-light); border-left-color: var(--ok); }
.cal-legend-swatch.late      { background: var(--danger); border-left-color: var(--danger-light); }
.cal-hint {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ── Toolbar programmazioni ───────────────────────────────────── */
.sched-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.sched-filter { min-width: 14rem; }

/* ── Modale nuova programmazione ──────────────────────────────── */
.modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-lg);
  width: calc(100% - 2rem);
  max-width: 640px;
  background: transparent;
}
.modal::backdrop {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}
.modal-form {
  position: relative;
  margin: 0;
  box-shadow: none;
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: var(--bg-subtle);
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--ink); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 800px) {
  .form-grid        { grid-template-columns: 1fr; }
  .photo-row        { grid-template-columns: 1fr; }
  .photo-fields     { grid-template-columns: 1fr; }
  .wm-grid          { grid-template-columns: 1fr; }
  .guide-two-col    { grid-template-columns: 1fr; }
  .field-entry      { grid-template-columns: 1fr; gap: 0.25rem; }
  .guide-flow       { flex-direction: column; align-items: flex-start; }
  .flow-arrow       { display: none; }
  .container        { padding: 2rem 1.25rem 4rem; }
  .topbar           { padding: 0 1.25rem; }
  .export-row       { grid-template-columns: 1fr auto; }
  .export-date, .export-size { display: none; }
  .vup-grid         { grid-template-columns: 1fr; }
  .vr-row           { grid-template-columns: 18px 1fr; }
  .vr-dest, .vr-tip { display: none; }
  .cal-day          { min-height: 3.5rem; }
  .sched-toolbar    { flex-direction: column; align-items: stretch; }
  .sched-filter     { min-width: 0; }
}
