:root {
  --bg: radial-gradient(circle at top right, #5ec0ff, #2e5bff 45%, #13203a);
  --panel: rgba(255, 255, 255, 0.16);
  --panel-border: rgba(255, 255, 255, 0.24);
  --text: #f7fbff;
  --muted: #d5e7ff;
  --accent: #87f4ff;
  --danger: #ff8ca7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.app-shell {
  width: min(760px, 100%);
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(8, 16, 32, 0.35);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

h1,
h2,
p {
  margin: 0;
}

.today {
  color: var(--muted);
  font-weight: 500;
}

.summary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  align-items: center;
}

.progress-wrap {
  position: relative;
  width: 160px;
  height: 160px;
}

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

.ring-bg,
.ring-value {
  fill: none;
  stroke-width: 10;
}

.ring-bg {
  stroke: rgba(255, 255, 255, 0.2);
}

.ring-value {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 250ms ease;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

#consumedValue {
  font-size: 1.4rem;
  font-weight: 800;
}

#goalValue {
  color: var(--muted);
}

.summary-details {
  display: grid;
  gap: 0.85rem;
}

.remaining {
  font-weight: 600;
  color: #ecfdff;
}

.quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.quick-btn,
.entry-form button,
.profile-btn {
  background: linear-gradient(180deg, #8af5ff, #69daff);
  color: #072237;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
}

.entry-form {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 0.6fr 1fr auto;
  gap: 0.65rem;
}

.entry-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.entry-form input,
.entry-form select {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 0.55rem 0.7rem;
}

.entry-form input::placeholder {
  color: rgba(240, 248, 255, 0.6);
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#entryCount {
  color: var(--muted);
}

.entry-list {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.entry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.entry-amount {
  font-weight: 700;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.2rem;
}

.delete-btn {
  background: rgba(255, 140, 167, 0.18);
  color: #ffd8e2;
  border: 1px solid rgba(255, 140, 167, 0.55);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 0.5rem;
}

.user-card {
  display: grid;
  gap: 0.45rem;
}

.user-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

.user-card label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.user-card input {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 0.55rem 0.7rem;
}

.user-card small {
  color: var(--muted);
}

@media (max-width: 720px) {
  body {
    padding: 0.5rem;
    display: block;
  }

  .app-shell {
    gap: 0.75rem;
  }

  .card {
    border-radius: 16px;
    padding: 0.85rem;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .summary {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.85rem;
  }

  .summary-details {
    width: 100%;
    justify-items: center;
  }

  .quick-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-btn {
    min-height: 44px;
    width: 100%;
  }

  .user-grid,
  .entry-form {
    grid-template-columns: 1fr;
  }

  .entry-form button,
  .profile-btn {
    min-height: 46px;
    width: 100%;
  }

  .entry-item {
    align-items: flex-start;
    gap: 0.6rem;
    flex-direction: column;
  }

  .delete-btn {
    min-height: 40px;
    width: 100%;
  }
}
