/* Kid Founder — components. Mobile-first; rounded, soft, celebratory. */

/* ---------- Header / footer ---------- */
.site-header { padding:14px 0; position:sticky; top:0; z-index:20;
  background:color-mix(in srgb, var(--cream) 82%, transparent); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--lavender-soft); }
.header-inner { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand { display:inline-flex; align-items:center; gap:10px; font-family:var(--font-head);
  font-weight:600; font-size:1.2rem; color:var(--plum); }
.brand:hover { text-decoration:none; }
.brand-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:12px;
  background:linear-gradient(135deg, var(--coral), var(--gold)); font-size:20px; box-shadow:var(--shadow-sm); }
.brand-mark-img { width:40px; height:40px; border-radius:11px; display:block; box-shadow:var(--shadow-sm); }
.site-footer { padding:26px 0; color:var(--text-muted); font-size:.9rem; text-align:center; }

/* ---------- Buttons ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  font-family:var(--font-head); font-weight:600; font-size:1rem; line-height:1;
  padding:.75em 1.4em; border-radius:var(--radius-pill); border:2px solid transparent;
  cursor:pointer; text-decoration:none; transition:transform .08s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { text-decoration:none; }
.btn:active { transform:translateY(1px) scale(.99); }
.btn-primary { background:var(--coral); color:#fff; box-shadow:var(--shadow-sm); }
.btn-primary:hover { box-shadow:var(--shadow); }
.btn-ghost { background:var(--white); border-color:var(--lavender-soft); color:var(--plum); }
.btn-ghost:hover { background:var(--lavender-bg); }
.btn-gold { background:var(--gold); color:var(--plum); box-shadow:var(--shadow-sm); }
.btn-sm { font-size:.9rem; padding:.55em 1.05em; }

/* ---------- Cards ---------- */
.card { background:var(--surface); border:1px solid var(--lavender-soft); border-radius:var(--radius);
  padding:26px; box-shadow:var(--shadow-sm); margin-bottom:22px; }

/* ---------- Hero ---------- */
.hero { background:linear-gradient(160deg, var(--white), var(--coral-bg)); border-color:var(--coral-soft); }
.hero-badge { display:inline-block; font-family:var(--font-head); font-weight:600; font-size:.8rem;
  letter-spacing:.04em; text-transform:uppercase; color:var(--coral);
  background:var(--white); border:1px solid var(--coral-soft); padding:.35em .8em; border-radius:var(--radius-pill); margin-bottom:14px; }
.hero .lead { font-size:1.12rem; color:var(--text-soft); max-width:52ch; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; }

/* ---------- Status grid ---------- */
.status-grid { display:grid; grid-template-columns:1fr; gap:14px; margin-bottom:22px; }
.status-card { display:flex; align-items:center; gap:12px; background:var(--surface);
  border:1px solid var(--lavender-soft); border-radius:var(--radius-sm); padding:16px 18px; box-shadow:var(--shadow-sm); }
.status-card strong { display:block; font-family:var(--font-head); color:var(--plum); }
.status-card small { color:var(--text-muted); }
.status-dot { width:12px; height:12px; border-radius:50%; flex:none; background:var(--text-muted); box-shadow:0 0 0 4px rgba(154,143,174,.16); }
.status-card.ok  .status-dot { background:var(--green); box-shadow:0 0 0 4px var(--green-bg); }
.status-card.bad .status-dot { background:var(--coral); box-shadow:0 0 0 4px var(--coral-bg); }

/* ---------- Swatches ---------- */
.swatches { display:flex; flex-wrap:wrap; gap:10px; }
.sw { display:grid; place-items:center; width:88px; height:64px; border-radius:var(--radius-sm);
  color:#fff; font-weight:600; font-size:.85rem; box-shadow:var(--shadow-sm); border:1px solid rgba(0,0,0,.04); }
.sw.dark { color:var(--plum); }

/* ---------- Fields ---------- */
.demo-row { display:flex; flex-wrap:wrap; gap:14px; align-items:flex-end; }
.field { display:flex; flex-direction:column; gap:6px; }
.field > span { font-weight:600; font-size:.9rem; color:var(--text-soft); }
.field input { font-family:var(--font-body); font-size:1rem; font-weight:500; color:var(--plum);
  background:var(--white); border:2px solid var(--lavender-soft); border-radius:var(--radius-pill);
  padding:.7em 1.1em; min-width:210px; transition:border-color .15s ease; cursor:pointer; }
.field input:focus { outline:none; border-color:var(--coral); }

/* ---------- Modal (replaces native alert/confirm) ---------- */
body.kf-modal-open { overflow:hidden; }
.kf-modal-overlay { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:20px;
  background:rgba(95,84,118,.45); backdrop-filter:blur(3px); animation:kf-fade .15s ease; }
.kf-modal-overlay[hidden] { display:none; }
.kf-modal { width:100%; max-width:420px; background:var(--white); border-radius:var(--radius);
  padding:26px; box-shadow:var(--shadow); animation:kf-pop .18s cubic-bezier(.2,.9,.3,1.2); }
.kf-modal-title { margin:0 0 8px; }
.kf-modal-body { color:var(--text-soft); margin-bottom:20px; }
.kf-modal-actions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
@keyframes kf-fade { from{opacity:0} to{opacity:1} }
@keyframes kf-pop  { from{opacity:0; transform:translateY(8px) scale(.96)} to{opacity:1; transform:none} }

/* ---------- Datepicker (replaces native date input) ---------- */
.kf-datepicker { position:absolute; z-index:900; width:280px; background:var(--white);
  border:1px solid var(--lavender-soft); border-radius:var(--radius-sm); box-shadow:var(--shadow); padding:12px; }
.kf-datepicker[hidden] { display:none; }
.kf-dp-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.kf-dp-title { font-family:var(--font-head); font-weight:600; color:var(--plum); }
.kf-dp-nav { width:34px; height:34px; border:none; border-radius:10px; background:var(--lavender-bg);
  color:var(--plum); font-size:1.2rem; cursor:pointer; line-height:1; }
.kf-dp-nav:hover { background:var(--lavender-soft); }
.kf-dp-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.kf-dp-dow { text-align:center; font-size:.72rem; font-weight:600; color:var(--text-muted); padding:4px 0; }
.kf-dp-day { border:none; background:transparent; border-radius:10px; padding:8px 0; font:inherit;
  font-weight:500; color:var(--plum); cursor:pointer; }
.kf-dp-day:hover { background:var(--coral-bg); }
.kf-dp-day.is-today { box-shadow:inset 0 0 0 2px var(--lavender-soft); }
.kf-dp-day.is-selected { background:var(--coral); color:#fff; }

/* ---------- Confetti ---------- */
.kf-confetti { position:fixed; inset:0; width:100%; height:100%; pointer-events:none; z-index:1200; }

/* ---------- Responsive ---------- */
@media (min-width:640px) {
  .status-grid { grid-template-columns:repeat(2,1fr); }
  .card { padding:30px; }
}
@media (min-width:900px) {
  .status-grid { grid-template-columns:repeat(4,1fr); }
}

/* ---------- Header nav ---------- */
.header-nav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.inline-form { margin:0; display:inline; }

/* ---------- Flash messages ---------- */
.flash { border-radius:var(--radius-sm); padding:12px 16px; margin-bottom:16px; font-weight:600; border:1px solid transparent; }
.flash-success { background:var(--green-bg); color:var(--green); border-color:#BFE0CB; }
.flash-error   { background:var(--coral-bg); color:var(--coral); border-color:var(--coral-soft); }
.flash-warn    { background:var(--gold-bg); color:#A9761E; border-color:#F3D9A3; }

/* ---------- Forms ---------- */
.stack { display:flex; flex-direction:column; gap:16px; }
.stack .field { gap:6px; }
.field input:not([type=checkbox]):not([type=radio]) { width:100%; min-width:0; }
.field-error { color:var(--coral); font-size:.85rem; font-weight:600; font-style:normal; }
.btn-block { width:100%; justify-content:center; padding-block:.85em; font-size:1.05rem; }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width:440px; margin:16px auto; }
.auth-card { text-align:center; }
.auth-card h1 { margin:6px 0 4px; }
.auth-card .stack { text-align:left; margin-top:20px; }
.auth-logo { width:150px; height:auto; margin:0 auto 2px; }
.auth-alt { margin-top:18px; font-size:.95rem; color:var(--text-soft); }
.auth-or { display:flex; align-items:center; gap:12px; margin:18px 0; color:var(--text-muted); font-size:.85rem; }
.auth-or::before, .auth-or::after { content:""; flex:1; height:1px; background:var(--lavender-soft); }
.btn-google { background:var(--white); border:2px solid var(--lavender-soft); color:var(--plum); gap:.6em; }
.btn-google:hover { background:var(--lavender-bg); }

/* ---------- Profiles ---------- */
.profile-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:16px; margin-top:20px; }
.profile-grid form { margin:0; }
.profile-card { width:100%; display:flex; flex-direction:column; align-items:center; gap:8px; padding:20px 12px;
  background:var(--white); border:2px solid var(--lavender-soft); border-radius:var(--radius); cursor:pointer;
  font:inherit; color:var(--plum); text-decoration:none; transition:transform .08s ease, border-color .15s, box-shadow .15s; }
.profile-card:hover { border-color:var(--coral); box-shadow:var(--shadow-sm); transform:translateY(-2px); text-decoration:none; }
.profile-avatar { width:64px; height:64px; display:grid; place-items:center; font-size:34px; background:var(--lavender-bg); border-radius:50%; }
.profile-avatar.sm { width:36px; height:36px; font-size:20px; }
.profile-name { font-family:var(--font-head); font-weight:600; }
.profile-name small { color:var(--text-muted); font-weight:500; }
.profile-tag { font-size:.8rem; color:var(--text-muted); }
.profile-add { border-style:dashed; color:var(--lavender); }
.profile-add .profile-avatar { background:var(--coral-bg); color:var(--coral); font-size:30px; }
.profile-row { display:flex; flex-wrap:wrap; gap:14px; margin:12px 0 18px; }
.mini-profile { display:inline-flex; align-items:center; gap:8px; font-weight:600; }

/* Avatar picker */
.avatar-picker { display:flex; flex-wrap:wrap; gap:8px; }
.avatar-opt { cursor:pointer; }
.avatar-opt input { position:absolute; opacity:0; width:0; height:0; }
.avatar-opt span { display:grid; place-items:center; width:48px; height:48px; font-size:26px;
  background:var(--lavender-bg); border:2px solid transparent; border-radius:50%; transition:border-color .12s, transform .08s; }
.avatar-opt input:checked + span { border-color:var(--coral); transform:scale(1.06); }
.avatar-opt input:focus-visible + span { outline:3px solid var(--lavender); outline-offset:2px; }

/* Fieldset group */
.field-group { border:1px solid var(--lavender-soft); border-radius:var(--radius-sm); padding:16px; margin:0; display:flex; flex-direction:column; gap:12px; }
.field-group legend { font-family:var(--font-head); font-weight:600; color:var(--plum); padding:0 6px; }

/* Timezone picker */
.kf-tz { position:relative; }
.kf-tz-toggle { width:100%; text-align:left; font:inherit; font-weight:500; color:var(--plum); cursor:pointer;
  background:var(--white); border:2px solid var(--lavender-soft); border-radius:var(--radius-pill); padding:.7em 1.1em; }
.kf-tz-toggle:hover { border-color:var(--coral-soft); }
.kf-tz-panel { position:absolute; z-index:850; left:0; right:0; margin-top:6px; background:var(--white);
  border:1px solid var(--lavender-soft); border-radius:var(--radius-sm); box-shadow:var(--shadow); padding:8px; }
.kf-tz-panel[hidden] { display:none; }
.kf-tz-search { width:100%; font:inherit; border:2px solid var(--lavender-soft); border-radius:var(--radius-sm); padding:.5em .8em; margin-bottom:6px; }
.kf-tz-search:focus { outline:none; border-color:var(--coral); }
.kf-tz-list { list-style:none; margin:0; padding:0; max-height:220px; overflow-y:auto; }
.kf-tz-item { padding:8px 10px; border-radius:8px; cursor:pointer; font-size:.92rem; }
.kf-tz-item:hover { background:var(--coral-bg); }
