/* ============================================================
   IFC KidZone – Public Pages Stylesheet v4.0
   Clean white / off-white theme — professional, welcoming
   No emoji characters
   ============================================================ */

:root {
  --accent:          #3d6ea8;
  --accent-hover:    #2f5a91;
  --accent-light:    #ebf1f8;
  --accent-green:    #2d7a4f;
  --accent-green-lt: #edf5f0;
  --accent-red:      #b32323;
  --accent-red-lt:   #fdf2f2;
  --accent-amber:    #8b6118;
  --accent-amber-lt: #fdf8ed;
  --text-primary:    #1a1a1a;
  --text-secondary:  #4a4a4a;
  --text-muted:      #7a7a7a;
  --bg-body:         #f5f7fa;
  --bg-card:         #ffffff;
  --border-light:    #e2e6ea;
  --header-bg:       #ffffff;
  --footer-bg:       #1a1a1a;
  --radius:          10px;
  --radius-sm:       7px;
  --shadow:          0 2px 16px rgba(0,0,0,.08);
  --shadow-sm:       0 1px 6px rgba(0,0,0,.05);
  --transition:      .15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-body);
  min-height: 100vh;
  line-height: 1.65;
  display: flex; flex-direction: column;
  background-size: cover; background-position: center;
  background-attachment: fixed; background-repeat: no-repeat;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Background image overlay ─────────────────────────────── */
body.has-bg::before {
  content: '';
  position: fixed; inset: 0;
  background: rgba(245,247,250,.88);
  z-index: 0; pointer-events: none;
}
body.has-bg .topbar,
body.has-bg .site-footer { position: relative; z-index: 10; }
body.has-bg .page-wrapper { position: relative; z-index: 1; }
body.has-bg .card { background: rgba(255,255,255,.97); backdrop-filter: blur(4px); }

/* ── Utilities ─────────────────────────────────────────────── */
.text-center   { text-align: center; }
.text-muted    { color: var(--text-muted); font-size: .9em; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.w-100  { width: 100%; }

/* ── Header ────────────────────────────────────────────────── */
.topbar {
  background: var(--header-bg);
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 var(--border-light);
}
.topbar-logo { display: flex; align-items: center; gap: .65rem; }
.topbar-logo img { height: 36px; width: auto; object-fit: contain; border-radius: 4px; }
.topbar-logo-placeholder {
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--accent-light); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  font-size: .9rem; font-weight: 700;
}
.topbar .brand { font-size: 1rem; font-weight: 600; color: var(--text-primary); letter-spacing: .01em; }
.topbar .brand span { opacity: .55; font-weight: 400; font-size: .85rem; }
.topbar-actions a {
  color: var(--text-secondary); font-size: .85rem; padding: .35rem .8rem;
  border: 1px solid var(--border-light); border-radius: 5px;
  transition: background var(--transition), color var(--transition);
}
.topbar-actions a:hover { background: var(--accent-light); color: var(--accent); text-decoration: none; }

/* ── Page wrapper ──────────────────────────────────────────── */
.page-wrapper {
  max-width: 540px; width: 100%; margin: 0 auto;
  padding: 2rem 1rem 3rem; flex: 1;
}
.page-wrapper.wide { max-width: 860px; }

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem 1.4rem;
  margin-bottom: 1.2rem; border: 1px solid var(--border-light);
}
.card-title    { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; color: var(--text-primary); }
.card-subtitle { font-size: .88rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero { text-align: center; padding: 1.8rem 0 .5rem; }
.hero h1 { font-size: clamp(1.4rem,5vw,2rem); font-weight: 800; color: var(--text-primary); }
.hero p  { color: var(--text-secondary); margin-top: .4rem; font-size: .95rem; }
.logo-wrap { margin-bottom: .9rem; display: flex; justify-content: center; }
.logo-wrap img { height: 56px; width: auto; object-fit: contain; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block; font-weight: 600; font-size: .875rem;
  margin-bottom: .3rem; color: var(--text-primary);
}
.form-control {
  display: block; width: 100%; padding: .72rem 1rem;
  border: 1.5px solid var(--border-light); border-radius: var(--radius-sm);
  font-size: .975rem; font-family: inherit;
  background: #fff; color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,110,168,.15);
}
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .22rem; }

.phone-input-wrap { position: relative; }
.phone-input-wrap .form-control { font-size: 1.35rem; letter-spacing: .04em; font-weight: 500; padding-left: 1rem; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .68rem 1.3rem; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; color: #fff; }
.btn-success { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }
.btn-success:hover { background: #236040; color: #fff; text-decoration: none; }
.btn-danger  { background: var(--accent-red); color: #fff; border-color: var(--accent-red); }
.btn-danger:hover { background: #8e1c1c; color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent; color: var(--accent); border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent-light); text-decoration: none; }
.btn-block { width: 100%; }
.btn-lg    { padding: .82rem 1.6rem; font-size: 1.05rem; }
.btn-sm    { padding: .38rem .8rem; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
  font-size: .88rem; border-left: 3px solid transparent;
}
.alert-info    { background: var(--accent-light);    border-color: var(--accent);       color: #2c4e7a; }
.alert-success { background: var(--accent-green-lt); border-color: var(--accent-green); color: #1e5235; }
.alert-warning { background: var(--accent-amber-lt); border-color: var(--accent-amber); color: #6b4b12; }
.alert-danger  { background: var(--accent-red-lt);   border-color: var(--accent-red);   color: #7a1a1a; }

/* ── Action grid (landing) ─────────────────────────────────── */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.action-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.8rem 1rem; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm); text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  gap: .6rem; text-align: center;
}
.action-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; border-color: var(--accent); }
.action-tile .tile-icon {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.action-tile .tile-label { font-size: .95rem; font-weight: 700; color: var(--text-primary); }
.action-tile.sign-in  .tile-icon { background: #e8f5ee; color: var(--accent-green); }
.action-tile.sign-out .tile-icon { background: #fdf2f2; color: var(--accent-red); }
.action-tile.register .tile-icon { background: var(--accent-light); color: var(--accent); }
.action-tile:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 50%; margin: 0 auto; }

/* ── Child cards ───────────────────────────────────────────── */
.child-list { display: flex; flex-direction: column; gap: .55rem; }
.child-card {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem 1rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-light); background: #fff;
  cursor: pointer; transition: border-color var(--transition), background var(--transition);
}
.child-card.selected { border-color: var(--accent-green); background: var(--accent-green-lt); }
.child-card input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent-green); cursor: pointer; }
.child-avatar {
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .85rem; flex-shrink: 0;
}
.child-info .name  { font-weight: 700; font-size: .95rem; color: var(--text-primary); }
.child-info .meta  { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }
.group-badge {
  display: inline-block; padding: .1rem .45rem; border-radius: 99px;
  font-size: .7rem; font-weight: 700; color: #fff; margin-left: .2rem;
}

/* ── Flash overlay ─────────────────────────────────────────── */
.checkin {
  position: fixed; inset: 0; background: rgba(30,70,30,.92);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9000; text-align: center; padding: 2rem; color: #fff;
}
.checkin.visible { display: flex; animation: flashIn .25s ease; }
@keyframes flashIn { from{opacity:0;transform:scale(.95)} to{opacity:1;transform:none} }
.flash-icon  { font-size: 3.5rem; margin-bottom: .6rem; }
.flash-title { font-size: 2rem; font-weight: 900; letter-spacing: .04em; margin-bottom: .4rem; }
.flash-names { font-size: 1.2rem; font-weight: 700; margin-bottom: .3rem; }
.flash-sub   { font-size: .9rem; opacity: .8; margin-bottom: 1rem; }
.flash-timer { font-size: .85rem; opacity: .65; margin-bottom: 1rem; }
.flash-dismiss { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4); color: #fff; padding: .5rem 1.5rem; border-radius: 99px; cursor: pointer; font-size: .9rem; }
.flash-dismiss:hover { background: rgba(255,255,255,.3); }

/* ── Site footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--footer-bg); color: rgba(255,255,255,.4);
  text-align: center; padding: 1rem; font-size: .8rem; flex-shrink: 0;
}
