:root {
  --bg-main: #050816;
  --bg-card: #0b1220;
  --bg-card-soft: #111827;
  --accent-green: #34d399;
  --accent-orange: #f59e0b;
  --accent-red: #f97373;
  --border-glow: rgba(52, 211, 153, 0.35);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.6);
  --transition-fast: 0.18s ease-out;
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #1f2937 0, #050816 45%, #000 100%);
  color: var(--text-main);
  font-family: var(--font-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: radial-gradient(circle at 30% 0, #bbf7d0 0, #22c55e 40%, #166534 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #022c22;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.75);
}

.logo-text .brand {
  font-weight: 600;
  font-size: 17px;
}

.logo-text .subtitle {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-btn {
  border: none;
  background: transparent;
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.nav-btn:hover {
  background: rgba(31, 41, 55, 0.9);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #022c22;
}

/* Layout base */

.page {
  flex: 1;
  padding: 28px 20px 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.page-title {
  font-size: 26px;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Cards ruolo */

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.role-card {
  position: relative;
  border-radius: 26px;
  padding: 24px 24px 26px;
  background: radial-gradient(circle at top left, rgba(52, 211, 153, 0.08), transparent 60%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.09), transparent 55%),
    linear-gradient(145deg, #020617, #020617 40%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

/* Titolo spostato in basso per non sovrapporsi al badge 1/2 */
.role-card h2 {
  margin-top: 72px;
  margin-bottom: 8px;
}

.role-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.role-badge {
  position: absolute;
  top: 16px;
  left: 18px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, #bbf7d0 0, #22c55e 40%, #166534 100%);
  color: #022c22;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.8);
}

.role-badge.badge-orange {
  background: radial-gradient(circle at 30% 0, #fed7aa 0, #f97316 40%, #c2410c 100%);
  color: #451a03;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.8);
}

/* Pulsanti */

.primary-btn,
.secondary-btn,
.nav-pill {
  border-radius: var(--radius-pill);
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast);
}


.nav-pill.contacted {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  cursor: default;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
}

.nav-pill.contacted:hover {
  transform: none;
}

.nav-pill:disabled {
  opacity: 0.8;
  cursor: default;
}


.primary-btn {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #022c22;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.5);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.7);
}

.secondary-btn {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #451a03;
  box-shadow: 0 10px 25px rgba(248, 181, 0, 0.5);
}

.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(248, 181, 0, 0.7);
}

.nav-pill {
  background: rgba(31, 41, 55, 0.9);
  color: var(--text-main);
}

.nav-pill.danger {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.nav-pill:hover {
  transform: translateY(-1px);
}

/* Sezione jobs */

.section-header h2 {
  margin-bottom: 2px;
}

.section-header p {
  margin-top: 0;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.search-bar input {
  flex: 1;
  min-width: 220px;
}

.text-link-btn {
  margin-top: 4px;
  margin-bottom: 4px;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--accent-green);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.text-link-btn:hover {
  text-decoration: underline;
}

/* Pannello filtri tipo di lavoro */
/* Pannello filtri tipo di lavoro */

.filter-panel-wrapper {
  margin-top: 8px;
  margin-bottom: 18px;
  position: relative;
}

.filter-panel {
  padding: 8px 40px; /* spazio per le frecce */
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.4);
  height: 46px;                    /* altezza fissa come in screenshot */
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
}

/* nascondo la scrollbar orizzontale */
.filter-panel::-webkit-scrollbar {
  display: none;
}
.filter-panel {
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none;    /* Firefox */
}

.filter-pill {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: rgba(15, 118, 110, 0.35);
  color: #a5f3fc;
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill:hover {
  background: rgba(52, 211, 153, 0.5);
  color: #022c22;
}

.filter-empty {
  font-size: 12px;
  color: var(--text-muted);
}

/* Frecce sinistra/destra */

.filter-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  color: #a5f3fc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0;
}

.filter-arrow-left {
  left: 8px;
}

.filter-arrow-right {
  right: 8px;
}

.filter-arrow:hover {
  background: rgba(15, 23, 42, 1);
}

/* Form di base */

.form {
  display: none;
  margin-top: 16px;
}

.form.active,
.form-static {
  display: block;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  margin-top: 4px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-main);
  outline: none;
  font-family: var(--font-main);
  font-size: 14px;
}

input:focus,
textarea:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2);
}

textarea {
  resize: vertical;
}

.full-width {
  width: 100%;
  margin-top: 8px;
}

/* Account */

.account-box {
  background: radial-gradient(circle at top left, rgba(52, 211, 153, 0.08), transparent 60%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.96));
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 22px 20px 24px;
  box-shadow: var(--shadow-soft);
  max-width: 740px;
  margin: 0 auto;
}

.tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  margin-top: 14px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(15, 118, 110, 0.25);
  color: var(--text-main);
}

/* Dashboard account */

.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.welcome-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.role-label {
  font-size: 13px;
  color: var(--accent-green);
}

.verify-label {
  font-size: 13px;
  margin-top: 2px;
}

.dashboard {
  margin-top: 8px;
}

.dashboard-box {
  background: radial-gradient(circle at top left, rgba(52, 211, 153, 0.08), transparent 60%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.96));
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 22px 20px 26px;
  box-shadow: var(--shadow-soft);
  max-width: 900px;
  margin-top: 18px;
}

.dashboard-title {
  margin-top: 0;
  margin-bottom: 8px;
}

/* Cards richieste / curriculum */

.cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.job-card {
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.55);
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-soft);
}

.job-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.job-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.job-meta span + span::before {
  content: " · ";
}

.job-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 8px;
}

.skill-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.35);
  color: #a5f3fc;
}

.job-footer {
  display: flex;
  justify-content: flex-end;
}

/* Messaggi stato */

.error-text {
  font-size: 12px;
  color: var(--accent-red);
  min-height: 16px;
  margin-top: 6px;
}

.success-text {
  font-size: 12px;
  color: var(--accent-green);
  min-height: 16px;
  margin-top: 6px;
}

/* Curriculum – esperienze */

.exp-wrapper {
  margin-bottom: 16px;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 4px;
}

.exp-add-btn {
  padding-inline: 14px;
  font-size: 12px;
}

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.exp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.exp-input {
  width: 100%;
}

.exp-remove {
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #fecaca;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

/* Ruolo registrazione */

.role-select {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.role-select label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
}

/* Footer */

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 18px 0 20px;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
}

/* Responsive */

/* Modale modifica richiesta */

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  z-index: 41;
  width: 100%;
  max-width: 520px;
  background: radial-gradient(circle at top left, rgba(52, 211, 153, 0.08), transparent 60%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: var(--shadow-soft);
  padding: 20px 20px 18px;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.modal-actions-right {
  display: flex;
  gap: 8px;
}


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

  .page {
    padding-inline: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    align-self: stretch;
    justify-content: flex-start;
  }

  .exp-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .exp-remove {
    justify-self: flex-end;
  }
}
