:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #1d4ed8;
  --border: #e5e7eb;
}

body {
  margin: 0;
  font-family: system-ui;
  background: var(--bg);
  color: var(--text);
}

/* TOPBAR */
.topbar {
  height: 56px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
}

/* LAYOUT */
.layout {
  display: flex;
}

/* SIDEBAR */
.sidebar {
  width: 240px;
  background: #eef2ff;
  border-right: 2px solid #e5e7eb;

  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.step {
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

.step.active {
  background: white;
  font-weight: 600;
  color: var(--primary);
}

/* MAIN */
.main {
  flex: 1;
  padding: 20px;
}

/* CARD */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

h2 {
  margin-top: 0;
}

/* INPUT */
input, textarea {
  width: 100%;
  padding: 10px;
  margin: 6px 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

h3 {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.smartbar {
  position: fixed;
  top: 56px;
  right: 0;
  background: white;
  padding: 8px 12px;
  font-size: 12px;
  border-left: 1px solid #e5e7eb;
  z-index: 999;
}

input[readonly] {
  background: #f3f4f6;
  color: #374151;
}

.footer-actions {
  position: fixed;
  bottom: 0;
  left: 240px;
  right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;

  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
}

button.primary {
  background: #1d4ed8;
  color: white;
  border: none;
}

.nav-footer {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 30px 20px;
  border-top: 2px solid #eee;

  display: flex;
  flex-direction: column;
  align-items: center;

  min-height: 200px;
  justify-content: center;
  gap: 20px;
}

/* BOTTONI NAV */
.nav-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* secondari (avanti/indietro) */
.btn.secondary {
  background: #222;
  color: white;
}

.btn.secondary:hover {
  background: #2ecc71;
  color: black;
}

/* submit */
.btn.primary {
  background: #1f7a1f;
  color: white;
  font-size: 20px;
  padding: 18px 40px;
  width: 320px;
}

.btn.primary:hover {
  background: #2ecc71;
  color: black;
}

/* nascondi */
.hidden {
  display: none;
}