﻿:root {
  --bg: radial-gradient(circle at 20% 20%, rgba(255, 241, 214, 0.45), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(216, 232, 255, 0.45), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(223, 240, 255, 0.42), transparent 28%),
    linear-gradient(
      120deg,
      rgba(223, 233, 255, 0.82),
      rgba(241, 245, 255, 0.76) 45%,
      rgba(215, 231, 255, 0.82)
    );
  --card: rgba(255, 255, 255, 0.7);
  --border: rgba(0, 0, 0, 0.06);
  --shadow: 0 16px 44px rgba(15, 23, 42, 0.16);
  --primary: #10b981;
  --accent: #f97316;
  --text: #0f172a;
  --muted: #475569;
  --glass: blur(12px);
  --max-width: 1120px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: #f3f6ff;
  background-image: url("stork.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
  padding: 0 18px 48px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg);
  mix-blend-mode: screen;
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
}

header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 42px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px 10px 10px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: url("icon.jpg") center/cover no-repeat,
    linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(249, 115, 22, 0.25));
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: transparent;
  font-size: 18px;
}

.brand__text h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.012em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.brand__text p {
  margin: 4px 0 0;
  color: #5b6475;
  letter-spacing: 0.02em;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  font-size: 14px;
  color: #5b6475;
  text-decoration: none;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: stretch;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.headline {
  font-size: 48px;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.subline {
  margin: 0 0 18px;
  color: #5b6475;
  font-size: 18px;
}

.rules {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.rule {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 6px;
}

.rule strong {
  color: var(--primary);
  font-weight: 600;
  display: block;
}

.rule__text {
  display: block;
  line-height: 1.45;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(255, 255, 255, 0.86));
  display: grid;
  gap: 8px;
}

.stat--compact {
  min-width: 190px;
}

.stat__label {
  color: #5b6475;
  font-size: 14px;
}

.stat__value {
  font-size: 28px;
  font-weight: 700;
}

.gender-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gender-icon {
  font-size: 22px;
}

.gender-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f472b6, #38bdf8);
  overflow: hidden;
  flex: 1;
}

.gender-bar__fill {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #0f172a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
  transform: translateX(-50%);
}

.small {
  color: #5b6475;
  font-size: 13px;
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: #5b6475;
  font-size: 14px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.row {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.row--stack-mobile {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.radios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.radio {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(16, 185, 129, 0.08));
  cursor: pointer;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.radio input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.radio:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.radio__label {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio[data-checked="true"] {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(255, 255, 255, 0.95));
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.18);
}

button {
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0f172a;
  box-shadow: var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
}

.heat-day {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  gap: 4px;
  min-height: 70px;
}

.heat-day__label {
  font-size: 13px;
  color: #5b6475;
}

.heat-day__score {
  font-size: 18px;
  font-weight: 700;
}

.heat-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.heat-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #84cc16, #f97316);
}

.timeline-card {
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(255, 255, 255, 0.86));
}

.timeline {
  position: relative;
  padding: 24px 0;
}

.timeline-line {
  display: none;
}

.timeline-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.4), rgba(249, 115, 22, 0.4));
  opacity: 0.6;
}

.timeline-bubbles {
  position: relative;
  margin-top: -12px;
}

.bubble {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(249, 115, 22, 0.9));
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  border: 2px solid #fff;
}

.bubble:hover .bubble-label {
  opacity: 1;
  transform: translate(-50%, -4px);
}

.bubble-label {
  position: absolute;
  top: -44px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: all 120ms ease;
}

.timeline-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: #5b6475;
  font-size: 13px;
}

.timeline--single {
  padding: 6px 0 12px;
}

.timeline-center {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 0;
}

.bubble--single {
  position: relative;
  transform: translateX(0);
}

.timeline--single .bubble-label {
  opacity: 1;
  top: auto;
  bottom: -32px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 22px;
  transform: translate(-50%, 0);
}

.admin-guard {
  max-width: 420px;
  margin: 48px auto;
  text-align: center;
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table td.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  min-width: 220px;
  white-space: nowrap;
  text-align: right;
}

.table-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  min-width: 220px;
  white-space: nowrap;
}
.ghost {
  background: rgba(16, 185, 129, 0.14);
  color: var(--text);
}

.muted-btn {
  background: rgba(15, 23, 42, 0.06);
  color: #5b6475;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #0f172a;
  font-size: 12px;
}

.note {
  margin-top: 12px;
  color: #5b6475;
  font-size: 13px;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

input[type="range"] {
  accent-color: var(--primary);
}

@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .row--stack-mobile {
    grid-template-columns: 1fr;
  }
}























/* Mobile: limit date input width */
input[type="date"] {
  max-width: 240px;
}
