@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800;900&display=swap');

:root {
  --ink: #102f36;
  --muted: #658088;
  --line: #d8e8e4;
  --paper: #fbfdfb;
  --wash: #eef7f4;
  --mint: #82ddca;
  --teal: #19a99a;
  --blue: #4f8df7;
  --yellow: #ffe6a6;
  --danger: #ff6b5f;
  --shadow: 0 24px 70px rgba(16, 47, 54, .10);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0%, rgba(130, 221, 202, .38), transparent 30%),
    radial-gradient(circle at 10% 100%, rgba(79, 141, 247, .18), transparent 32%),
    linear-gradient(135deg, #fbfffd 0%, #edf7f5 100%);
}

button, textarea, input { font: inherit; }
button { border: 0; cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 292px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; padding: 28px; display: flex; flex-direction: column; gap: 28px;
  border-right: 1px solid rgba(16,47,54,.09); background: rgba(251,253,251,.74); backdrop-filter: blur(24px);
}
.brand-lockup { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: white; font-weight: 900; font-size: 24px; background: #12333a; box-shadow: 0 14px 30px rgba(18,51,58,.18); }
.brand-lockup strong { display:block; font-size: 18px; letter-spacing: -.03em; }
.brand-lockup span, .plan-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
nav { display: grid; gap: 8px; }
.nav-item { text-align:left; padding: 13px 14px; border-radius: 14px; color: #385a61; background: transparent; font-weight: 800; }
.nav-item.active, .nav-item:hover { background: #e2f3ee; color: var(--ink); }
.plan-card { margin-top: auto; padding: 18px; border-radius: 22px; background: #12333a; color:white; }
.plan-card strong { display:block; margin: 6px 0; }
.plan-card p { margin: 0; color: #cbe9e3; font-size: 13px; line-height: 1.45; }

main { padding: 32px; min-width: 0; }
.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap: 18px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 6px; color: #2e8d88; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(32px, 5vw, 56px); line-height: .95; letter-spacing: -.07em; }
h2 { font-size: 28px; line-height: 1; letter-spacing: -.055em; margin-bottom: 14px; }
h3 { font-size: 20px; letter-spacing: -.04em; margin-bottom: 12px; }
.muted { color: var(--muted); line-height: 1.55; }

.primary, .secondary, .ghost, .light-button {
  min-height: 44px; padding: 0 16px; border-radius: 14px; font-weight: 900; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary { background: #12333a; color:white; box-shadow: 0 16px 40px rgba(18,51,58,.18); }
.secondary { background: #dff5f0; color: #11675f; }
.ghost { background: #f1f7f5; color: #24474f; border: 1px solid var(--line); }
.light-button { background:white; color:#12333a; }
.primary:hover, .secondary:hover, .ghost:hover, .light-button:hover { transform: translateY(-1px); }
.wide { width: 100%; }

.screen { display:none; animation: rise .28s ease both; }
.screen.active { display:block; }
@keyframes rise { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }

.hero-grid { display:grid; grid-template-columns: 1.35fr .8fr; gap: 18px; margin-bottom: 18px; }
.content-grid, .handover-layout { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.today-card, .panel { background: rgba(255,255,255,.82); border: 1px solid rgba(216,232,228,.9); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.child-card { background: linear-gradient(135deg, #fff 0%, #e9faf6 100%); }
.child-head { display:flex; align-items:center; gap: 14px; }
.avatar { width: 62px; height:62px; border-radius: 22px; display:grid; place-items:center; background:#ffe6a6; color:#6c4a00; font-size: 28px; font-weight: 900; }
.child-head h2 { margin:0; font-size: 42px; }
.status-pill { margin-left:auto; display:inline-flex; align-items:center; height: 30px; padding:0 10px; border-radius: 999px; background:#eef7f4; color:#2f6b65; font-size: 12px; font-weight:900; }
.status-pill.green { background:#d9fbeb; color:#12714d; }
.route-line { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 28px 0; }
.route-line div { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.78); border:1px solid #d7eee8; }
.route-line span, .profile-list span { display:block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 5px; }
.route-line strong { font-size: 18px; letter-spacing: -.03em; }
.alert-strip { display:flex; gap: 10px; flex-wrap:wrap; }
.alert-strip strong, .alert-strip span { padding: 10px 12px; border-radius: 12px; background:#fff2c5; font-size: 13px; font-weight:900; }
.alert-strip span { background:#eaf2ff; color:#275fab; }

.check-list, .summary-list { list-style:none; padding:0; margin:0; display:grid; gap: 10px; }
.check-list li, .summary-list li { display:flex; gap: 10px; align-items:flex-start; padding: 12px; border-radius: 14px; background:#f4faf8; color:#24474f; font-weight: 750; line-height:1.35; }
.summary-list li { background:white; border: 1px solid var(--line); }

.panel-title { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom: 16px; }
.briefing-stack, .profile-list, .people-list, .history-feed { display:grid; gap: 12px; }
.briefing-item { display:flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background:white; }
.briefing-item p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height:1.45; }
.icon { width: 34px; height:34px; display:grid; place-items:center; border-radius: 12px; background:#edf8f5; }
.dark-panel { background:#12333a; color:white; overflow:hidden; position:relative; }
.dark-panel:after { content:""; position:absolute; width: 230px; height:230px; border-radius:50%; right:-85px; top:-110px; background: rgba(130,221,202,.33); }
.dark-panel .eyebrow, .dark-panel p { color:#bce6de; }
.dark-panel h3 { color:white; font-size: 30px; line-height:1.03; }

.handover-input textarea { width:100%; min-height: 230px; resize: vertical; margin: 16px 0; padding: 18px; border:1px solid var(--line); border-radius: 20px; background:#fbfffd; color:var(--ink); outline:0; line-height:1.55; }
.handover-input textarea:focus, .search:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(25,169,154,.12); }
.input-actions { display:flex; gap: 10px; flex-wrap: wrap; }
.send-box { margin-top: 18px; padding: 16px; border-radius: 18px; background:#12333a; color:white; }
.send-box p { color:#d7f0eb; margin:6px 0 0; line-height:1.5; }

.todo-board { display:grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.todo { display:flex; gap: 12px; align-items:flex-start; padding: 16px; border:1px solid var(--line); border-radius: 18px; background:white; }
.todo input { width: 22px; height:22px; accent-color: var(--teal); }
.todo strong { display:block; }
.todo small { color: var(--muted); }
.full-panel { min-height: 520px; }
.profile-list div { padding: 16px; border-radius: 18px; background:white; border:1px solid var(--line); }
.people-list > div { display:flex; align-items:center; gap: 12px; padding: 13px; border-radius: 18px; background:white; border:1px solid var(--line); }
.mini-avatar { width: 40px; height:40px; border-radius: 14px; background:#dff5f0; color:#11675f; display:grid; place-items:center; font-weight:900; }
.people-list small { display:block; color: var(--muted); margin-top: 2px; }
.search { min-height: 42px; padding: 0 14px; border-radius: 14px; border:1px solid var(--line); background:white; outline:0; min-width: 240px; }
.history-item { padding: 16px; border-radius: 18px; background:white; border:1px solid var(--line); }
.history-item time { color:#2e8d88; font-size:12px; font-weight:900; text-transform: uppercase; letter-spacing:.08em; }
.history-item p { margin: 8px 0 0; color:#385a61; line-height:1.5; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 18px); opacity: 0; pointer-events:none; background:#12333a; color:white; padding: 13px 16px; border-radius: 999px; font-weight: 900; box-shadow: var(--shadow); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid rgba(16,47,54,.09); }
  .rail nav { grid-template-columns: repeat(5, minmax(92px, 1fr)); overflow:auto; }
  .plan-card { display:none; }
  main { padding: 18px; }
  .topbar { align-items:stretch; flex-direction:column; }
  .hero-grid, .content-grid, .handover-layout { grid-template-columns: 1fr; }
  .route-line { grid-template-columns: 1fr; }
  .panel-title { flex-direction:column; }
  .search { width:100%; min-width:0; }
}

@media (max-width: 520px) {
  main { padding: 14px; }
  .today-card, .panel { border-radius: 22px; padding: 18px; }
  .child-head { flex-wrap:wrap; }
  .status-pill { margin-left:0; }
  h1 { font-size: 38px; }
  .child-head h2 { font-size: 34px; }
  .rail nav { grid-template-columns: repeat(5, 128px); }
}
