:root {
  --bg: #062a3a;
  --panel: #0b3b52;
  --panel-soft: #0e4a66;
  --accent: #38bdf8;
  --accent-soft: #7dd3fc;
  --text: #eaf6fb;
  --text-muted: #9fc6d6;
  --danger: #f97362;
  --ring-track: #133f56;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 420px;
  padding: 28px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

h1 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.01em;
}

.ring-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 4px auto 0;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--ring-track);
  stroke-width: 14;
}

.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.ring-total {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ring-goal {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quick-add-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-add {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-soft);
  border-radius: 999px;
  padding: 12px 4px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}

.quick-add:active {
  background: var(--panel-soft);
}

.custom-row {
  display: flex;
  gap: 10px;
}

.custom-row input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--panel-soft);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.custom-row input::placeholder {
  color: var(--text-muted);
}

.custom-row button,
button.primary {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: inherit;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent-soft);
  border: 1px solid var(--panel-soft);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

#status {
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

#status.error {
  color: var(--danger);
}

h2 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 -8px;
}

#entries-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

#entries-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel);
  padding-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

#entries-list li span:last-child {
  color: var(--text);
}

#entries-list:empty::after {
  content: 'Nessuna assunzione registrata per ora.';
  color: var(--text-muted);
  font-size: 0.85rem;
}
