:root {
  --gold: #ffd54a;
  --gold-deep: #f5b301;
  --blue: #37a6f0;
  --orange: #ff7a1a;
  --ink: #ffffff;
  --muted: #c9bce0;
  --ok: #23d18b;
  --err: #ff6b6b;
  --card-a: #2a0f4c;
  --card-b: #140a2e;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Transparent so the host page's dark neon background shows through the iframe. */
body.widget-body {
  background: transparent;
  font-family: var(--font);
  color: var(--ink);
  padding: 8px 6px;
}

.widget {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--card-a) 0%, var(--card-b) 100%);
  border: 1px solid rgba(255, 213, 74, 0.35);
  border-radius: 20px;
  padding: 24px 22px 20px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 24px 70px rgba(60, 10, 90, 0.55),
    0 0 60px rgba(255, 213, 74, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.w-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.w-title { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: 0.01em; }
.w-week { font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; }

.w-help { color: var(--muted); font-size: 12.5px; margin: 8px 0 16px; line-height: 1.5; }

.w-form { margin: 0; }
.w-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 2px 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.w-inputrow { display: flex; gap: 8px; }
.w-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.w-input::placeholder { color: #9a8cbd; }
.w-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 213, 74, 0.18); }
.w-btn {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 14px;
  font-family: var(--font);
  color: #2a1400;
  white-space: nowrap;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  box-shadow: 0 6px 18px rgba(245, 179, 1, 0.35);
  transition: transform 0.08s, filter 0.15s;
}
.w-btn:hover { filter: brightness(1.05); }
.w-btn:active { transform: translateY(1px); }
.w-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.w-inputerr { color: var(--err); font-size: 12px; margin: 8px 2px 0; min-height: 0; }

.w-result { margin-top: 18px; }
.hidden { display: none !important; }

.w-amounts {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.w-amount-big { font-size: 26px; font-weight: 800; line-height: 1; }
.w-amount-of { color: var(--muted); font-size: 13px; font-weight: 600; }

.w-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  position: relative;
}
.w-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
}
.w-bar-fill.ok { background: linear-gradient(90deg, #7cf0b8, var(--ok)); }

.w-status { margin-top: 12px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.w-status .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  flex: 0 0 9px;
}
.w-status.ok .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.w-remaining { color: var(--muted); }
.w-remaining b { color: var(--ink); }

.w-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(35, 209, 139, 0.18), rgba(35, 209, 139, 0.06));
  border: 1px solid rgba(35, 209, 139, 0.4);
}
.w-badge .tick {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok);
  color: #04331f;
  font-weight: 900;
  font-size: 18px;
}
.w-badge .txt b { display: block; font-size: 15px; }
.w-badge .txt span { color: var(--muted); font-size: 12.5px; }

.w-msg {
  text-align: center;
  padding: 18px 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
}
.w-msg.err {
  color: #ffb3b3;
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.06);
}
.w-msg b { color: var(--ink); }

.w-retry {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 16px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.w-retry:hover { border-color: var(--gold); background: rgba(255, 213, 74, 0.08); }

.w-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}
.w-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 213, 74, 0.25);
  border-top-color: var(--gold);
  animation: w-spin 0.8s linear infinite;
}
@keyframes w-spin { to { transform: rotate(360deg); } }

.w-notes {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.w-note {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  margin: 0 0 8px;
}
.w-note:last-child { margin-bottom: 0; }
.w-note .ico { flex: 0 0 auto; }
