/* =====================================================
   IbizaDreamJob — Design tokens + global styles
   ===================================================== */

:root {
  --bg-grad-from: #0a1628;
  --bg-grad-to: #1e3a5f;
  --surface: #0f1e37;
  --surface-2: #142745;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #f8fafc;
  --fg-dim: #cbd5e1;
  --muted: #94a3b8;
  --muted-2: #64748b;

  --accent: #00d4aa;
  --accent-dim: #00b894;
  --accent-soft: rgba(0, 212, 170, 0.12);
  --accent-soft-2: rgba(0, 212, 170, 0.18);
  --accent-glow: rgba(0, 212, 170, 0.35);

  --sunset: #f59e0b;
  --sunset-soft: rgba(245, 158, 11, 0.12);
  --sunset-glow: rgba(245, 158, 11, 0.35);

  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;

  --success: #22c55e;
  --warn: #f59e0b;
  --error: #f87171;
  --error-soft: rgba(248, 113, 113, 0.12);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 22px;

  --shadow-card: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-elev: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 20px 60px rgba(0, 212, 170, 0.25);
  --shadow-sunset: 0 20px 60px rgba(245, 158, 11, 0.18);

  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(160deg, var(--bg-grad-from) 0%, var(--bg-grad-to) 100%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden; /* niente scroll orizzontale (mobile) */
}
body { max-width: 100vw; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ----- Screen layout ----- */
.screen { min-height: calc(100vh - 60px); }

.container { max-width: 1280px; margin: 0 auto; padding: 32px 24px 80px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; letter-spacing: .1px;
  transition: all .2s var(--ease);
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--accent); color: #022;
  box-shadow: 0 8px 20px rgba(0, 212, 170, 0.35);
}
.btn-primary:hover:not(:disabled) { background: #1ce0b8; box-shadow: 0 12px 28px rgba(0, 212, 170, 0.45); }
.btn-ghost {
  background: rgba(255,255,255,.04); color: var(--fg);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: var(--border-strong); }
.btn-outline-danger {
  background: transparent; color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.btn-outline-danger:hover { background: var(--error-soft); }
.btn-whatsapp {
  background: var(--whatsapp); color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover { background: #2ee07a; }

/* Stile WhatsApp pulito (ghost-soft con bordo + icona SVG) */
.btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  background: rgba(37,211,102,.08);
  border: 1px solid rgba(37,211,102,.45);
  color: var(--fg); font-weight: 700; font-size: 13px;
  text-decoration: none; cursor: pointer; font-family: inherit;
  transition: all .2s var(--ease);
}
.btn-wa:hover { background: rgba(37,211,102,.18); border-color: var(--whatsapp); transform: translateY(-1px); }
.btn-wa svg { width: 16px; height: 16px; fill: var(--whatsapp); }
.btn-wa.btn-block { width: 100%; }
.btn-lg { padding: 16px 24px; font-size: 16px; border-radius: 14px; }
.btn-xl { padding: 20px 28px; font-size: 17px; border-radius: 16px; }
.btn-block { width: 100%; }

/* ----- Cards ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-hover { transition: all .25s var(--ease); }
.card-hover:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ----- Inputs ----- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
}
.input, .textarea, .select {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  font-size: 14px; color: var(--fg);
  transition: all .2s var(--ease);
  outline: none; width: 100%;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  background: rgba(0, 212, 170, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}
.textarea { resize: vertical; min-height: 90px; font-family: inherit; }
.select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%2394a3b8' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.select::-ms-expand { display: none; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }

/* ----- Pills / chips / badges ----- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
}
.pill-accent { background: var(--accent-soft); color: var(--accent); border-color: rgba(0, 212, 170, 0.3); }
.pill-sunset { background: var(--sunset-soft); color: var(--sunset); border-color: rgba(245, 158, 11, 0.3); }
.pill-success { background: rgba(34, 197, 94, 0.12); color: var(--success); border-color: rgba(34, 197, 94, 0.3); }
.pill-error { background: var(--error-soft); color: var(--error); border-color: rgba(248, 113, 113, 0.3); }
.pill-muted { background: rgba(148, 163, 184, 0.08); color: var(--muted); }

.label-uppercase {
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
}

/* ----- Score badges ----- */
.score-big {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px 16px; border-radius: 16px; min-width: 110px;
}
.score-big .num { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.score-big .lbl {
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; margin-top: 4px; opacity: .8;
}
.score-high {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(0, 212, 170, 0.3);
  animation: score-pulse 3.2s ease-in-out infinite;
}
.score-mid {
  background: var(--sunset-soft); color: var(--sunset);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.score-low {
  background: rgba(148,163,184,.1); color: var(--muted);
  border: 1px solid var(--border);
}
@keyframes score-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0); }
  50% { box-shadow: 0 0 0 8px rgba(0, 212, 170, 0.08); }
}

/* ----- Info grid (admin card heart) ----- */
.info-cell {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 8px 4px; text-align: center;
}
.info-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px;
  border: 1px solid transparent;
  transition: all .2s var(--ease);
}
.info-icon.on  { background: var(--accent-soft); border-color: rgba(0, 212, 170, 0.25); }
.info-icon.warn{ background: var(--sunset-soft); border-color: rgba(245, 158, 11, 0.25); }
.info-icon.off { background: rgba(148,163,184,.06); opacity: .35; filter: grayscale(.6); }
.info-cell .lbl {
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
}
.info-cell .val {
  font-size: 12.5px; font-weight: 700; color: var(--fg);
  white-space: nowrap;
}
.info-cell.dim .val { color: var(--muted-2); }

/* ----- Hero pieces ----- */
.hero-glow {
  position: absolute; border-radius: 999px;
  filter: blur(80px); pointer-events: none; opacity: .35;
}
.glow-blob {
  position: absolute; border-radius: 999px;
  filter: blur(100px); pointer-events: none; z-index: 0;
}

/* ----- Forms ----- */
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice-chip {
  padding: 9px 14px; border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--fg-dim);
  transition: all .15s var(--ease);
  cursor: pointer; font-family: inherit;
}
.choice-chip:hover { border-color: var(--border-strong); color: var(--fg); }
.choice-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent); color: var(--accent);
}

/* ----- Top match / results ----- */
.top-match {
  position: relative;
  padding: 36px 36px 32px;
  border-radius: 24px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(0, 212, 170, 0.18) 0%, transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(245, 158, 11, 0.16) 0%, transparent 55%),
    linear-gradient(160deg, rgba(15, 30, 55, 0.95) 0%, rgba(20, 39, 69, 0.95) 100%);
  border: 1.5px solid var(--accent);
  box-shadow:
    0 0 0 4px rgba(0, 212, 170, 0.06),
    var(--shadow-accent),
    var(--shadow-card);
}
.top-match-badge {
  position: absolute; top: -16px; left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #4ad9b5);
  color: #022; font-weight: 800; font-size: 13px; letter-spacing: .3px;
  box-shadow: 0 10px 24px rgba(0, 212, 170, 0.45);
  white-space: nowrap;
}

/* ----- Drop zones (legacy) ----- */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 18px; padding: 36px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
  background: rgba(255,255,255,.02);
  transition: all .2s var(--ease); cursor: pointer;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent); background: var(--accent-soft);
}
.dropzone input[type="file"] { display: none; }

/* ----- CV uploader (nuova grafica) ----- */
.cv-uploader {
  position: relative;
  background: linear-gradient(135deg, rgba(0,212,170,.12), rgba(245,158,11,.08));
  border: 1.5px solid rgba(0,212,170,.35);
  border-radius: 20px;
  padding: 44px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; cursor: pointer;
  transition: all .25s var(--ease);
  overflow: hidden;
}
.cv-uploader::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(0,212,170,.18), transparent 55%);
  pointer-events: none;
}
.cv-uploader:hover, .cv-uploader.drag {
  border-color: var(--accent);
  box-shadow: 0 16px 48px rgba(0,212,170,.25);
  transform: translateY(-2px);
}
.cv-uploader input[type="file"] { display: none; }
.cv-uploader-icon {
  width: 80px; height: 80px;
  background: var(--accent); color: #022;
  border-radius: 22px;
  display: grid; place-items: center;
  font-size: 38px;
  box-shadow: 0 12px 32px rgba(0,212,170,.4);
  position: relative; z-index: 1;
}
.cv-uploader-action {
  font-size: 22px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--fg); position: relative; z-index: 1;
}
.cv-uploader-meta {
  color: var(--muted); font-size: 13px; position: relative; z-index: 1;
}
.cv-uploader-filename {
  color: var(--accent); font-weight: 700; font-size: 14px;
  margin-top: 4px; position: relative; z-index: 1;
}
.cv-uploader.has-file { background: rgba(0,212,170,.08); }
.cv-uploader.has-file .cv-uploader-icon { background: var(--success); }

/* ----- Foto upload migliorata ----- */
.photo-uploader {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 24px;
  background: rgba(255,255,255,.02);
  border: 1.5px dashed var(--border-strong);
  border-radius: 18px;
  transition: all .2s var(--ease);
}
.photo-uploader.has-photo { border-style: solid; border-color: var(--accent); background: rgba(0,212,170,.05); }
.photo-uploader .photo-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,212,170,.2), rgba(245,158,11,.2));
  display: grid; place-items: center;
  font-size: 56px; overflow: hidden;
  cursor: pointer; transition: all .2s var(--ease);
  position: relative;
}
.photo-uploader .photo-circle:hover { transform: scale(1.04); box-shadow: 0 16px 36px rgba(0,212,170,.3); }
.photo-uploader .photo-circle img { width: 100%; height: 100%; object-fit: cover; }
.photo-uploader .photo-circle.has-photo::after {
  content: '✏️ Cambia';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6); color: white;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
  opacity: 0; transition: opacity .2s;
  border-radius: 50%;
}
.photo-uploader .photo-circle.has-photo:hover::after { opacity: 1; }
.photo-uploader .photo-status {
  font-size: 13px; font-weight: 600; min-height: 20px;
}
.photo-uploader .photo-buttons {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.photo-uploader .photo-btn {
  padding: 8px 16px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  color: var(--fg); cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.photo-uploader .photo-btn:hover { border-color: var(--accent); color: var(--accent); }
.photo-uploader input[type="file"] { display: none; }

/* ----- Loader dots ----- */
.dots { display: inline-flex; gap: 5px; }
.dots span {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--accent);
  animation: dot 1s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }
.dots span:nth-child(4) { animation-delay: .45s; }
@keyframes dot {
  0%, 100% { opacity: .3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* ----- Progress bar ----- */
.progress {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 999px; overflow: hidden;
}
.progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--sunset));
  border-radius: 999px;
  transition: width .4s var(--ease);
}

/* ----- FAB chat ----- */
.fab-chat {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--sunset));
  display: grid; place-items: center;
  font-size: 26px; cursor: pointer;
  box-shadow: 0 16px 36px rgba(0, 212, 170, 0.4);
  transition: all .25s var(--ease); z-index: 60;
  border: 0;
}
.fab-chat:hover { transform: translateY(-3px) scale(1.04); }

.chat-panel {
  position: fixed; bottom: 100px; right: 24px;
  width: 360px; height: 480px; max-height: calc(100vh - 130px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-elev);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 60;
  animation: chat-in .25s var(--ease);
}
@keyframes chat-in {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-header {
  background: linear-gradient(135deg, var(--accent), var(--sunset));
  color: #022; padding: 14px 16px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.chat-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { padding: 10px 14px; border-radius: 14px; font-size: 13.5px; max-width: 86%; word-wrap: break-word; }
.chat-bubble.bot { background: rgba(255,255,255,.04); border: 1px solid var(--border); align-self: flex-start; }
.chat-bubble.user { align-self: flex-end; background: var(--accent-soft); border: 1px solid rgba(0, 212, 170, 0.3); color: var(--accent); }
.chat-input { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input .input { padding: 10px 12px; }
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* ----- Modal ----- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 12, 24, 0.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: grid; place-items: center;
  z-index: 200; padding: 24px;
  animation: backdrop-in .2s ease-out;
  overflow-y: auto;
}
.modal-backdrop[hidden] { display: none !important; }
.chat-panel[hidden] { display: none !important; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 720px; max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-elev);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: modal-in .25s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  background: rgba(0,0,0,.15);
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  display: grid; place-items: center;
  transition: all .15s var(--ease);
  font-size: 16px;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }

/* ----- Two-col grid ----- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ----- Top bar admin ----- */
.admin-top {
  background: rgba(15, 30, 55, 0.7);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.admin-top-inner {
  max-width: 1480px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.admin-nav {
  display: flex; gap: 4px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 4px;
}
.admin-nav-item {
  padding: 8px 16px; border-radius: 9px;
  font-size: 13px; font-weight: 700;
  color: var(--muted);
  transition: all .15s var(--ease);
  font-family: inherit;
}
.admin-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.admin-nav-item:hover:not(.active) { color: var(--fg); }

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -0.3px;
  font-size: 15px; white-space: nowrap;
}
.nav-brand-logo {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--sunset) 100%);
  display: grid; place-items: center;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(0, 212, 170, 0.35);
}

.tools-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 6px;
  min-width: 220px; z-index: 30;
  box-shadow: var(--shadow-card);
}
.tools-menu[hidden] { display: none; }
.tools-menu a, .tools-menu button {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 12px; border-radius: 8px; width: 100%;
  font-size: 13px; font-weight: 600; text-align: left;
  color: var(--fg); text-decoration: none;
  font-family: inherit; cursor: pointer; background: transparent; border: 0;
}
.tools-menu a:hover, .tools-menu button:hover { background: rgba(255,255,255,.06); color: var(--accent); }

/* ----- Stats row ----- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: all .2s var(--ease); min-width: 0;
}
.stat-card:hover { border-color: var(--border-strong); }
.stat-card .stat-lbl {
  font-size: 10px; letter-spacing: .6px; font-weight: 700;
  text-transform: uppercase; color: var(--muted);
}
.stat-card .stat-val { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.stat-card.accent .stat-val { color: var(--accent); }
.stat-card.sunset .stat-val { color: var(--sunset); }

/* ----- Toolbar ----- */
.toolbar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 18px 0; align-items: center;
}
.toolbar > * { flex-shrink: 0; }
.toolbar .btn { white-space: nowrap; }
.toolbar .select { padding: 9px 30px 9px 12px; font-size: 13px; }
.search-box {
  flex: 1 1 200px; min-width: 180px;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.search-box input { font-size: 13px; }
.search-box input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 14px; color: var(--fg); padding: 0;
}

/* ----- Candidate card ----- */
.candidate {
  display: grid;
  grid-template-columns: auto 1fr 180px;
  gap: 22px; padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: all .2s var(--ease);
}
.candidate:hover { border-color: var(--border-strong); }
.candidate.selected { border-color: var(--accent); background: rgba(0, 212, 170, 0.04); }
@media (max-width: 880px) { .candidate { grid-template-columns: 1fr; } }

.avatar {
  width: 56px; height: 56px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 26px; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.1);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px; margin: 14px 0;
}

.aside-col { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

.checkbox {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: rgba(255,255,255,.03);
  display: grid; place-items: center;
  cursor: pointer; font-size: 12px; font-weight: 800;
  color: transparent;
  transition: all .15s var(--ease);
  flex-shrink: 0;
  font-family: inherit;
}
.checkbox.checked { background: var(--accent); border-color: var(--accent); color: #022; }

/* ----- Best match block ----- */
.best-match {
  margin-top: 12px; padding: 12px 14px;
  background: rgba(0, 212, 170, 0.05);
  border: 1px solid rgba(0, 212, 170, 0.18);
  border-radius: 12px;
}
.best-match-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  flex-wrap: wrap;
}
.best-match-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ----- Offer card ----- */
.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all .2s var(--ease);
  height: 100%; /* riempi tutta la cella per uniformare altezze */
}
.offer-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
/* Spinge le actions sempre in fondo */
.offer-card > div:last-child { margin-top: auto; }

.kv-row {
  display: flex; flex-wrap: wrap;
  gap: 12px 18px; font-size: 13px; color: var(--fg-dim);
}
.kv-row > span { display: inline-flex; gap: 6px; align-items: center; }

/* Riga unica scrollabile orizzontalmente per le card offerte */
.kv-row.single {
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.kv-row.single > span { flex-shrink: 0; }
.kv-row.single::-webkit-scrollbar { height: 4px; }
.kv-row.single::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* ----- Step shifter (fade dolce, no translate per evitare scatti su screen lunghe) ----- */
.step-anim { animation: step-in .25s ease-out; }
@keyframes step-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ----- Section divider ----- */
.section-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 36px 0 18px;
  color: var(--muted);
  font-size: 11px; letter-spacing: .8px;
  text-transform: uppercase; font-weight: 700;
}
.section-divider::before,
.section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ----- WhatsApp QR ----- */
.qr-wrap {
  width: 320px; height: 320px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: grid; place-items: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}

/* ----- Photo upload preview ----- */
.photo-preview {
  width: 180px; height: 180px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(245, 158, 11, 0.2));
  border: 2px dashed var(--border-strong);
  display: grid; place-items: center;
  font-size: 56px;
  margin: 0 auto;
  transition: all .25s var(--ease);
  overflow: hidden;
  cursor: pointer;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview.ok {
  border-style: solid;
  border-color: var(--accent);
  animation: photo-pop .35s var(--ease);
}
@keyframes photo-pop {
  0% { transform: scale(.95); }
  100% { transform: scale(1); }
}
.photo-preview.error { border-color: var(--error); }

/* ----- Day shifts editor ----- */
.day-row {
  display: grid;
  grid-template-columns: 28px 80px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  transition: all .15s var(--ease);
}
.day-row.off { opacity: .35; }
.day-row.off .shift-row { pointer-events: none; }
.shifts-stack { display: flex; flex-direction: column; gap: 6px; }
.shift-row { display: flex; gap: 6px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.time-select {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px;
  font-size: 12.5px; font-weight: 600; color: var(--fg);
  font-family: inherit;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'><path fill='%2394a3b8' d='M4 5L0 0h8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
.day-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tiny-btn {
  font-size: 11px; padding: 5px 9px;
  border-radius: 7px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--muted); font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.tiny-btn:hover { color: var(--fg); border-color: var(--border-strong); }
.tiny-btn.danger { color: var(--error); }

/* ----- Lightbox foto candidato ----- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(5,12,24,.92); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 4000; padding: 32px;
  animation: backdrop-in .2s ease-out;
}
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: 90vw; max-height: 86vh; border-radius: 16px; box-shadow: 0 32px 80px rgba(0,0,0,.7); }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: white;
  font-size: 22px; cursor: pointer; border: 0;
  display: grid; place-items: center; font-family: inherit;
}
.lightbox-close:hover { background: var(--accent); color: #022; }

/* ----- Drawer CV laterale destro ----- */
.cv-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(640px, 100vw);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -16px 0 48px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  z-index: 3000;
  transform: translateX(100%);
  transition: transform .3s var(--ease);
}
.cv-drawer.open { transform: translateX(0); }
.cv-drawer-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.cv-drawer-header .name { flex: 1; font-weight: 800; font-size: 16px; }
.cv-drawer-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.cv-drawer-body iframe { flex: 1; width: 100%; border: 0; background: white; }
.cv-drawer-empty { padding: 40px; text-align: center; color: var(--muted); }
.cv-drawer-actions { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap; }
.cv-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 2999;
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.cv-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

/* Avatar cliccabile */
.avatar.clickable { cursor: pointer; }
.avatar.clickable:hover { transform: scale(1.05); border-color: var(--accent); }

/* Candidate card hover (cliccabile) */
.candidate.clickable-card { cursor: pointer; }

/* ----- Confirm modal (custom, sostituisce confirm/alert browser) ----- */
.confirm-backdrop {
  position: fixed; inset: 0;
  background: rgba(5,12,24,.75); backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 6000; padding: 24px;
  animation: backdrop-in .2s ease-out;
}
.confirm-backdrop[hidden] { display: none !important; }
.confirm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 440px;
  padding: 28px 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-elev);
  animation: modal-in .25s var(--ease);
}
.confirm-box .icon { font-size: 44px; margin-bottom: 12px; }
.confirm-box h3 { font-size: 19px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.3px; }
.confirm-box p { color: var(--fg-dim); font-size: 14.5px; line-height: 1.55; margin: 0 0 22px; }
.confirm-box .actions { display: flex; gap: 10px; }
.confirm-box .actions .btn { flex: 1; }

/* ----- Toast ----- */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent); color: #022;
  padding: 11px 20px; border-radius: 12px;
  font-weight: 800; font-size: 14px;
  z-index: 9999;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  animation: toast-in .25s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ----- Welcome screen language picker ----- */
.welcome-lang {
  position: fixed; inset: 0; z-index: 4000;
  background: linear-gradient(160deg, var(--bg-grad-from), var(--bg-grad-to));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px; text-align: center;
}
.welcome-lang h1 { font-size: clamp(32px,7vw,56px); margin: 0 0 8px; font-weight: 800; letter-spacing: -1.5px; }
.welcome-lang p { color: var(--fg-dim); font-size: 18px; margin: 0 0 40px; }
.welcome-lang .lang-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 16px; max-width: 520px; width: 100%;
}
.welcome-lang .lang-btn {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,.1);
  color: var(--fg);
  padding: 24px 12px; border-radius: 16px;
  cursor: pointer; font-size: 16px; font-weight: 700; font-family: inherit;
  transition: all .2s var(--ease);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.welcome-lang .lang-btn:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.welcome-lang .lang-btn .flag { font-size: 36px; }
@media (max-width: 480px) { .welcome-lang .lang-grid { grid-template-columns: 1fr; } }

/* ----- Lang switcher (top-right floating) ----- */
#lang-switcher { position: fixed; top: 16px; right: 16px; z-index: 200; }
#lang-switcher #lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--fg);
  cursor: pointer; font-family: inherit;
}
#lang-switcher #lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; min-width: 160px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 2px;
}
#lang-switcher #lang-menu[hidden] { display: none; }
#lang-switcher #lang-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; width: 100%;
  font-size: 13px; font-weight: 600; text-align: left;
  color: var(--fg); font-family: inherit;
  background: transparent; border: 0; cursor: pointer;
}
#lang-switcher #lang-menu button:hover { background: rgba(255,255,255,.05); }

/* ----- Phone prefix ----- */
.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: 0 0 100px; min-width: 0; padding-right: 28px; }
.phone-row input { flex: 1; min-width: 0; }

/* ----- Responsive ----- */
@media (max-width: 720px) {
  .container { padding: 24px 16px 60px; }
  .container-narrow { padding: 32px 16px 60px; }
  .top-match { padding: 28px 20px 24px; }
  .toolbar { gap: 8px; }
  .toolbar .select, .toolbar .btn { font-size: 13px; }
  .modal { max-height: 100vh; border-radius: 0; }
  .modal-backdrop { padding: 0; }
}
