:root {
  --bg: #0b1020;
  --card: #131a33;
  --text: #e5e7eb;
  --muted: #a5b4fc;
  --accent: #22c55e;
  --accent-weak: #16a34a;
  --bar-bg: #1f2a4d;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% 0%, #11193a, #0b1020);
}

.app-header, .app-footer {
  text-align: center;
  padding: 16px 12px;
}
.app-header h1 { margin: 8px 0 6px; font-size: 28px; }
.app-header p { margin: 0; color: var(--muted); }
.app-footer { color: #9ca3af; font-size: 12px; }

.container { max-width: 840px; margin: 0 auto; padding: 16px; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  backdrop-filter: blur(6px);
}
.card h2 { margin: 0; font-size: 18px; color: #c7d2fe; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

form .field-row { display: flex; flex-direction: column; margin-bottom: 12px; }
label { font-size: 13px; color: #c7d2fe; margin-bottom: 6px; }
input[type="number"], input[type="time"], select {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
input::placeholder { color: #94a3b8; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.days { display: flex; gap: 8px; flex-wrap: wrap; }
.days label { background: var(--card); border: 1px solid rgba(255,255,255,0.06); border-radius: 999px; padding: 6px 10px; }
.days input { margin-right: 6px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
button { cursor: pointer; border: none; border-radius: 10px; padding: 10px 14px; }
button.primary { background: var(--accent); color: #052e12; font-weight: 700; }
button.primary:hover { background: var(--accent-weak); }
button.ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.15); }

.amount { text-align: center; margin: 8px 0 0; }
.amount .major { font-size: 44px; font-weight: 800; letter-spacing: 0.5px; }
.amount .minor { font-size: 14px; color: var(--muted); margin-top: 6px; }
.amount .status { font-size: 12px; color: #9ca3af; margin-top: 8px; }

.progress { background: var(--bar-bg); height: 10px; border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); margin-top: 16px; }
.progress .bar { height: 100%; width: 0%; background: linear-gradient(90deg, #22c55e, #a3e635); transition: width 0.2s ease; }

.ad-wrap { margin-top: 16px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,0.12); }

.consent { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px; z-index: 50; }
.consent.hidden { display: none; }
.consent-inner { max-width: 840px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #0e1530; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 12px; }
.consent-text { color: #cbd5e1; font-size: 13px; }
.consent-actions { display: flex; gap: 8px; }

.after-tax-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #cbd5e1;
}
.after-tax-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #dc2626;
}
.after-tax-checkbox input[type="checkbox"]:checked + span {
  color: #dc2626;
}

.poo-animation {
  position: fixed;
  font-size: 72px;
  z-index: 1000;
  pointer-events: none;
  animation: pooFloat 1.5s ease-out forwards;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.poo-animation.hidden {
  display: none;
}

@keyframes pooFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -80px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -120px) scale(0.8);
  }
}

.muted { color: #9ca3af; font-size: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.modal { position: fixed; inset: 0; z-index: 60; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.modal-card { position: relative; max-width: 720px; margin: 10vh auto; background: #0e1530; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 16px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.icon-btn { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

.ad-sidebar {
  display: none; /* Hidden until ads are approved */
}

@media (min-width: 1024px) {
  .ad-sidebar {
    display: block;
    min-height: 250px;
  }
}

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .amount .major { font-size: 36px; }
}


