* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #111827;
  color: #f9fafb;
}

header {
  background: #020617;
  color: white;
  padding: 24px 16px;
  text-align: center;
  border-bottom: 1px solid #334155;
}

header h1 { margin: 0; font-size: 2rem; }
header p { margin: 8px 0 0; color: #cbd5e1; }

main { max-width: 900px; margin: 0 auto; padding: 16px; }

.card {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.hidden { display: none; }

label {
  display: block;
  color: #cbd5e1;
  font-weight: bold;
  margin: 14px 0 6px;
}

input {
  width: 100%;
  border: 2px solid #475569;
  border-radius: 12px;
  padding: 16px;
  font-size: 1.2rem;
  background: #0f172a;
  color: #f9fafb;
}

input:focus { outline: none; border-color: #93c5fd; }

.profile-grid, .kid-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.kid-row { grid-template-columns: 1fr 1fr; }

.profile-button, .kid-button {
  border: 3px solid transparent;
  border-radius: 18px;
  min-height: 90px;
  padding: 18px 10px;
  font-size: 1.25rem;
  font-weight: bold;
  background: #334155;
  color: #f9fafb;
  cursor: pointer;
}

.profile-button.active, .kid-button.active {
  border-color: #facc15;
  background: #1d4ed8;
  transform: scale(1.02);
}

.selected-profile-note, .profile-label {
  text-align: center;
  color: #cbd5e1;
  font-size: 1rem;
  margin: 14px 0 0;
  min-height: 24px;
}

.profile-label { margin: 0 0 12px; }

.standings-row, .item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #374151;
}

.standings-row:last-child, .item:last-child { border-bottom: none; }

.standings-name { font-size: 1.25rem; font-weight: bold; }
.standings-score { font-size: 1.7rem; font-weight: bold; color: #facc15; }

.score {
  text-align: center;
  font-size: 3.5rem;
  font-weight: bold;
  margin: 8px 0;
  color: #facc15;
}

.score-label { text-align: center; font-size: 1.1rem; color: #cbd5e1; }

.money-box {
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  margin-bottom: 14px;
}

.money-label { color: #cbd5e1; font-size: 1rem; }
.money-total { color: #86efac; font-size: 2.5rem; font-weight: bold; margin-top: 6px; }

h2 { margin-top: 0; color: #f9fafb; }
h3 { color: #f9fafb; margin: 20px 0 8px; }

.item-title { font-size: 1.1rem; font-weight: bold; }
.item-points { color: #cbd5e1; margin-top: 4px; }

.approval-actions, .manual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.manual-row { grid-template-columns: 1fr 1fr 1fr; align-items: end; }
.manual-row label { margin-top: 0; }

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

.login-button { background: #2563eb; color: white; width: 100%; margin-top: 16px; min-height: 58px; font-size: 1.2rem; }
.logout-button { background: #475569; color: white; width: 100%; }
.earn-button { background: #16a34a; color: white; }
.earn-button.done-today, .earn-button.pending { background: #475569; color: #cbd5e1; cursor: not-allowed; }
.redeem-button { background: #7c3aed; color: white; }
.approve-button { background: #16a34a; color: white; }
.reject-button, .subtract-button, .reset-button { background: #dc2626; color: white; }
.add-button, .paid-button { background: #0d9488; color: white; }
.export-button { background: #2563eb; color: white; }
.reset-button, .paid-button, .export-button { width: 100%; margin-top: 8px; }

.message {
  min-height: 28px;
  text-align: center;
  font-weight: bold;
  color: #93c5fd;
  margin: 10px 0;
}

.small-note { color: #cbd5e1; font-size: 0.95rem; line-height: 1.4; margin-bottom: 0; }

.log-entry {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.log-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: bold;
  color: #f9fafb;
}

.log-time { color: #cbd5e1; font-size: 0.85rem; white-space: nowrap; }
.log-details { color: #cbd5e1; margin-top: 6px; line-height: 1.35; }

@media (max-width: 700px) {
  main { padding: 12px; }
  .profile-grid, .kid-row, .item, .manual-row { grid-template-columns: 1fr; }
  .profile-button { min-height: 74px; font-size: 1.3rem; }
  .approval-actions { grid-template-columns: 1fr; }
  button { width: 100%; }
  .log-topline { display: block; }
}
