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

:root {
  --bg: #fff9f2;
  --surface: #ffffff;
  --surface-warm: #fff4e8;
  --surface-neutral: #f8f5ef;
  --primary: #274c77;
  --primary-2: #4f7cac;
  --primary-soft: #e9f2f8;
  --green: #78a978;
  --green-soft: #e6f3e5;
  --coral: #d96c63;
  --coral-soft: #fbe5e2;
  --amber: #e5a83b;
  --amber-soft: #fff1d2;
  --teal: #4f9a94;
  --teal-soft: #dff1ef;
  --family: #78a9d1;
  --family-soft: #e7f2fb;
  --text: #263238;
  --muted: #66737f;
  --line: #e7e1d8;
  --shadow: 0 12px 32px rgba(48, 67, 82, .08);
  --shadow-sm: 0 5px 16px rgba(48, 67, 82, .07);
  --radius: 20px;
  --radius-sm: 14px;
  --demo-h: 62px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); overflow-x: hidden; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); overflow-x: hidden; }
#app, .app-stage, .app-shell { width: 100%; max-width: 100%; min-width: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.demo-toolbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--demo-h);
  padding: 10px 16px;
  background: #17324f;
  color: white;
  box-shadow: 0 8px 24px rgba(20, 44, 69, .18);
}
.demo-toolbar-inner {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.demo-brand { display: flex; align-items: center; gap: 10px; min-width: max-content; }
.demo-brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: #fff; color: var(--primary); font-weight: 950; font-size: 20px;
}
.demo-brand-copy strong { display: block; letter-spacing: .08em; font-size: 13px; }
.demo-brand-copy span { display: block; opacity: .72; font-size: 10px; margin-top: 2px; }
.demo-role-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.demo-role-btn, .demo-action-btn {
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 850;
}
.demo-role-btn:hover, .demo-action-btn:hover { background: rgba(255,255,255,.12); }
.demo-role-btn.active { background: white; color: var(--primary); border-color: white; }
.demo-spacer { flex: 1; }
.demo-action-btn.primary { background: var(--amber); color: #4f3500; border-color: transparent; }
.demo-action-btn.danger { background: transparent; color: #ffd5d0; }
.demo-mobile-controls { display: none; align-items:center; gap: 8px; width: 100%; }
.demo-role-select-wrap { flex:1; min-width:0; display:flex; align-items:center; gap:8px; color:rgba(255,255,255,.72); font-size:10px; font-weight:850; }
.demo-role-select-wrap span { flex:0 0 auto; }
.demo-select {
  flex: 1; min-width: 0; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.1); color: white; border: 1px solid rgba(255,255,255,.2); padding: 0 10px;
}
.demo-select option { color: var(--text); }

.app-stage { min-height: calc(100vh - var(--demo-h)); }
.app-shell { min-height: calc(100vh - var(--demo-h)); background: var(--bg); }

/* Desktop */
.desktop-layout { display: grid; grid-template-columns: 258px minmax(0,1fr); min-height: calc(100vh - var(--demo-h)); }
.sidebar {
  position: sticky; top: var(--demo-h); height: calc(100vh - var(--demo-h)); overflow: auto;
  padding: 20px 16px 16px;
  background: #fffdf9;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.preschool-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 18px; border-bottom: 1px solid var(--line); }
.preschool-logo {
  width: 48px; height: 48px; flex: 0 0 auto; border-radius: 15px; background: var(--primary); color: white;
  display: grid; place-items: center; font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 24px; font-weight: 900;
  box-shadow: 0 8px 18px rgba(39,76,119,.18);
}
.preschool-brand-name { color: var(--primary); font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 800; line-height: 1.15; font-size: 14px; }
.preschool-brand-sub { margin-top: 4px; font-size: 10px; color: var(--muted); line-height: 1.25; }
.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; }
.side-nav-btn {
  width: 100%; border: 0; background: transparent; color: var(--muted);
  min-height: 43px; padding: 10px 12px; border-radius: 12px;
  display: flex; align-items: center; gap: 11px; text-align: left; font-size: 13px; font-weight: 780;
}
.side-nav-btn:hover { background: var(--surface-neutral); color: var(--primary); }
.side-nav-btn.active { background: var(--primary-soft); color: var(--primary); }
.side-nav-icon { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; }
.side-nav-icon svg { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 9px 8px; }
.avatar {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 900; border: 1px solid rgba(39,76,119,.1);
}
.avatar.parent-avatar{background:transparent;border:0;overflow:visible}
.avatar.parent-avatar .parent-user-icon{width:44px;height:44px;display:block;object-fit:contain}
.user-name { font-weight: 850; font-size: 13px; color: var(--primary); }
.user-role { font-size: 10px; color: var(--muted); margin-top: 3px; }

.workspace { min-width: 0; }
.topbar {
  position: sticky; top: var(--demo-h); z-index: 60;
  height: 66px; padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,249,242,.93); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(39,76,119,.07);
}
.topbar-title { min-width: 0; }
.topbar-kicker { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.topbar-page { color: var(--primary); font-weight: 900; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--primary);
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-neutral); }
.icon-btn svg { width: 19px; height: 19px; }
.notification-dot { position: relative; }
.notification-dot::after { content:""; position:absolute; width:8px; height:8px; border-radius:50%; background:var(--coral); top:7px; right:7px; border:2px solid white; }

.page { padding: 28px; max-width: 1540px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title { margin: 0; font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--primary); font-size: clamp(28px, 3vw, 38px); line-height: 1.05; }
.page-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Shared components */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.layout-main-aside { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid rgba(39,76,119,.09); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.card-title { margin: 0; color: var(--primary); font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 19px; }
.card-subtitle { color: var(--muted); font-size: 11px; margin-top: 5px; }
.section { margin-top: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.section-title { margin: 0; color: var(--primary); font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 20px; }
.section-note { color: var(--muted); font-size: 11px; }
.metric-card { padding: 18px; min-height: 116px; position: relative; overflow: hidden; }
.metric-card::after { content:""; position:absolute; width:90px; height:90px; border-radius:50%; right:-24px; top:-25px; opacity:.28; background:currentColor; }
.metric-card.green { color: var(--green); background: linear-gradient(145deg, white, var(--green-soft)); }
.metric-card.coral { color: var(--coral); background: linear-gradient(145deg, white, var(--coral-soft)); }
.metric-card.amber { color: var(--amber); background: linear-gradient(145deg, white, var(--amber-soft)); }
.metric-card.teal { color: var(--teal); background: linear-gradient(145deg, white, var(--teal-soft)); }
.metric-card.blue { color: var(--primary-2); background: linear-gradient(145deg, white, var(--primary-soft)); }
.metric-value { color: var(--primary); font-size: 32px; line-height: 1; font-weight: 950; position:relative; z-index:1; }
.metric-label { color: var(--text); margin-top: 10px; font-size: 12px; font-weight: 850; position:relative; z-index:1; }
.metric-meta { color: var(--muted); margin-top: 6px; font-size: 10px; position:relative; z-index:1; }

.btn {
  border: 0; border-radius: 13px; min-height: 42px; padding: 10px 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; font-weight: 850; transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.btn:hover { box-shadow: 0 6px 16px rgba(39,76,119,.12); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--primary); color: white; }
.btn.green { background: var(--green); color: white; }
.btn.coral { background: var(--coral); color: white; }
.btn.amber { background: var(--amber); color: #4d3300; }
.btn.teal { background: var(--teal); color: white; }
.btn.ghost { background: var(--surface-neutral); color: var(--primary); border: 1px solid var(--line); }
.btn.white { background: white; color: var(--primary); border: 1px solid var(--line); }
.btn.small { min-height: 34px; padding: 7px 10px; font-size: 10px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.badge { display: inline-flex; align-items:center; gap:5px; border-radius:999px; padding:5px 8px; font-size:10px; font-weight:900; white-space:nowrap; }
.badge.green { color:#356b3a; background:var(--green-soft); }
.badge.coral { color:#9c4038; background:var(--coral-soft); }
.badge.amber { color:#72500f; background:var(--amber-soft); }
.badge.teal { color:#286d68; background:var(--teal-soft); }
.badge.blue { color:var(--primary); background:var(--primary-soft); }
.badge.neutral { color:var(--muted); background:var(--surface-neutral); }

.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 14px; }
.search-box { position: relative; min-width: 240px; flex: 1; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.search-box input, .input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: white; color: var(--text); border-radius: 12px; min-height: 42px; padding: 10px 12px;
}
.search-box input { padding-left: 38px; }
.textarea { min-height: 110px; resize: vertical; }
.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { border:1px solid var(--line); background:white; color:var(--muted); border-radius:999px; min-height:34px; padding:7px 10px; font-size:10px; font-weight:850; }
.chip.active { background:var(--primary); color:white; border-color:var(--primary); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; text-align: left; background: var(--surface-neutral); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 13px 14px; border-top: 1px solid #eee9e1; font-size: 12px; vertical-align: middle; }
tr.clickable:hover td { background: #fffdf9; cursor: pointer; }
.cell-main { font-weight: 850; color: var(--primary); }
.cell-sub { color: var(--muted); font-size: 10px; margin-top: 3px; }

.list { display:flex; flex-direction:column; gap:9px; }
.list-row { display:flex; align-items:center; gap:11px; padding:13px 14px; border:1px solid rgba(39,76,119,.08); background:white; border-radius:14px; }
.list-row.clickable:hover { background:#fffdf9; cursor:pointer; }
.list-icon { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; flex:0 0 auto; }
.list-icon svg { width:18px; height:18px; }
.list-icon.green { background:var(--green-soft); color:#467e49; }
.list-icon.coral { background:var(--coral-soft); color:#a4443c; }
.list-icon.amber { background:var(--amber-soft); color:#7b5511; }
.list-icon.teal { background:var(--teal-soft); color:#2c756f; }
.list-icon.blue { background:var(--primary-soft); color:var(--primary); }
.list-main { min-width:0; flex:1; }
.list-title { display:block; font-weight:850; color:var(--primary); font-size:12px; }
.list-sub { display:block; color:var(--muted); font-size:10px; margin-top:4px; line-height:1.35; }
.chevron { color:var(--muted); font-size:20px; }

.group-card { padding: 16px; }
.group-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.group-name { color:var(--primary); font-weight:950; font-size:15px; }
.progress { height:8px; background:#ede9e2; border-radius:999px; overflow:hidden; margin-top:11px; }
.progress > span { display:block; height:100%; background:var(--green); border-radius:inherit; }
.group-meta { display:flex; gap:9px; flex-wrap:wrap; color:var(--muted); font-size:10px; margin-top:9px; }

.child-card { padding: 20px; display:flex; align-items:center; gap:16px; }
.child-avatar { width:66px; height:66px; border-radius:50%; background:linear-gradient(135deg,var(--amber-soft),var(--teal-soft)); display:grid; place-items:center; font-size:28px; border:4px solid white; box-shadow:var(--shadow-sm); }
.child-name { color:var(--primary); font-family:Manrope,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:24px; font-weight:900; }
.child-meta { display:flex; gap:7px; flex-wrap:wrap; margin-top:8px; }

.notice { padding:13px 14px; border-radius:13px; font-size:11px; line-height:1.45; }
.notice.green { background:var(--green-soft); color:#356b3a; }
.notice.coral { background:var(--coral-soft); color:#963c35; }
.notice.amber { background:var(--amber-soft); color:#6d4b0e; }
.notice.blue { background:var(--primary-soft); color:var(--primary); }

.quick-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.quick-action { border:1px solid var(--line); background:white; border-radius:16px; min-height:96px; padding:13px; color:var(--primary); text-align:left; display:flex; flex-direction:column; justify-content:space-between; font-weight:850; }
.quick-action:hover { background:var(--surface-neutral); }
.quick-action .qa-icon { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:var(--primary-soft); }
.quick-action .qa-icon svg { width:18px; height:18px; }

.message-layout { display:grid; grid-template-columns:320px minmax(0,1fr); min-height:570px; overflow:hidden; }
.conversation-list { border-right:1px solid var(--line); padding:12px; background:#fffdf9; }
.conversation-item { padding:12px; border-radius:12px; display:flex; gap:10px; align-items:flex-start; cursor:pointer; }
.conversation-item:hover, .conversation-item.active { background:var(--primary-soft); }
.conversation-main { min-width:0; flex:1; }
.conversation-name { color:var(--primary); font-weight:850; font-size:12px; }
.conversation-preview { color:var(--muted); font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:4px; }
.chat-panel { display:flex; flex-direction:column; min-width:0; background:white; }
.chat-header { padding:15px 18px; border-bottom:1px solid var(--line); }
.chat-scroll { padding:18px; flex:1; display:flex; flex-direction:column; gap:10px; overflow:auto; background:#fffdf9; }
.bubble { max-width:72%; padding:11px 13px; border-radius:14px; font-size:11px; line-height:1.45; }
.bubble.mine { margin-left:auto; background:var(--surface-warm); border-bottom-right-radius:4px; }
.bubble.theirs { background:var(--primary-soft); color:var(--primary); border-bottom-left-radius:4px; }
.bubble-time { margin-top:5px; font-size:9px; color:var(--muted); }
.chat-composer { display:flex; gap:8px; padding:13px; border-top:1px solid var(--line); background:white; }
.chat-composer input { flex:1; min-width:0; border:1px solid var(--line); border-radius:12px; padding:10px 12px; }

.calendar-layout { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr); gap:18px; }
.event-list { display:flex; flex-direction:column; gap:10px; }
.event-card { display:grid; grid-template-columns:58px 1fr auto; gap:12px; align-items:center; padding:14px; }
.event-date { width:52px; min-height:52px; border-radius:13px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:var(--teal-soft); color:#286d68; font-weight:900; }
.event-date strong { font-size:20px; line-height:1; }
.event-date span { font-size:9px; margin-top:3px; }
.event-title { color:var(--primary); font-weight:900; font-size:13px; }
.event-meta { color:var(--muted); font-size:10px; margin-top:5px; }
.month-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
.month-cell { min-height:56px; border:1px solid var(--line); border-radius:10px; padding:6px; font-size:10px; background:white; }
.month-cell.has-event { border-color:rgba(79,154,148,.45); background:var(--teal-soft); }

.menu-grid { display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:8px; overflow:auto; padding-bottom:4px; }
.menu-day { min-width:150px; }
.menu-day-head { padding:11px; border-radius:12px 12px 0 0; background:var(--primary); color:white; font-weight:900; text-align:center; font-size:11px; }
.menu-cell { min-height:92px; padding:10px; border:1px solid var(--line); border-top:0; background:white; font-size:10px; line-height:1.45; }
.menu-label { color:var(--muted); text-transform:uppercase; letter-spacing:.04em; font-size:8px; font-weight:900; display:block; margin-bottom:5px; }

.attendance-list { display:flex; flex-direction:column; gap:9px; }
.attendance-row { display:grid; grid-template-columns:minmax(170px,1fr) minmax(230px,320px); gap:12px; align-items:center; padding:13px 14px; }
.attendance-person { display:flex; align-items:center; gap:10px; }
.initials { width:38px; height:38px; border-radius:50%; background:var(--teal-soft); color:#286d68; display:grid; place-items:center; font-weight:900; flex:0 0 auto; }
.status-controls { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.status-btn { min-height:38px; border:1px solid var(--line); border-radius:11px; background:var(--surface-neutral); color:var(--muted); font-size:10px; font-weight:900; }
.status-btn.present.active { background:var(--green-soft); color:#356b3a; border-color:rgba(120,169,120,.5); }
.status-btn.absent.active { background:var(--coral-soft); color:#963c35; border-color:rgba(217,108,99,.5); }

.offer-card { padding:20px; min-height:210px; display:flex; flex-direction:column; }
.offer-card .offer-icon { width:48px; height:48px; border-radius:15px; display:grid; place-items:center; margin-bottom:14px; }
.offer-card .offer-icon svg { width:23px; height:23px; }
.offer-card h3 { margin:0; color:var(--primary); font-family:Manrope,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:20px; }
.offer-card p { color:var(--muted); font-size:11px; line-height:1.55; }
.offer-card .btn { margin-top:auto; }

.role-matrix { min-width:900px; }
.role-matrix th:not(:first-child), .role-matrix td:not(:first-child) { text-align:center; }
.toggle { width:42px; height:24px; border-radius:999px; background:#dfe3e5; border:0; padding:3px; display:inline-flex; align-items:center; }
.toggle span { width:18px; height:18px; border-radius:50%; background:white; box-shadow:0 2px 6px rgba(0,0,0,.16); transition:transform .15s ease; }
.toggle.on { background:var(--green); }
.toggle.on span { transform:translateX(18px); }

/* Mobile */
.mobile-layout { display:none; width:100%; max-width:100%; min-width:0; min-height:calc(100dvh - var(--demo-h)); background:var(--bg); padding-bottom:86px; overflow-x:hidden; }
.mobile-header { position:sticky; top:var(--demo-h); z-index:60; min-height:62px; padding:10px 16px; display:flex; align-items:center; gap:10px; background:rgba(255,249,242,.94); backdrop-filter:blur(14px); border-bottom:1px solid rgba(39,76,119,.07); }
.mobile-brand { min-width:0; flex:1; display:flex; align-items:center; gap:9px; }
.mobile-brand .preschool-logo { width:38px; height:38px; border-radius:12px; font-size:18px; }
.mobile-brand-name { color:var(--primary); font-family:Manrope,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-weight:900; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mobile-brand-sub { color:var(--muted); font-size:9px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mobile-content { width:100%; max-width:100%; min-width:0; padding:18px 16px 34px; overflow-x:hidden; }
.mobile-content > .page { width:100%; max-width:100%; min-width:0; padding:0; }
.mobile-content .page > *,
.mobile-content .layout-main-aside > *,
.mobile-content .grid > *,
.mobile-content aside,
.mobile-content section { min-width:0; max-width:100%; }
.mobile-content .page-title { font-size:28px; }
.mobile-content .page-header { display:block; margin-bottom:16px; }
.mobile-content .page-actions { justify-content:flex-start; margin-top:12px; }
.mobile-content .grid-2, .mobile-content .grid-3, .mobile-content .grid-4 { grid-template-columns:minmax(0,1fr); }
.mobile-content .grid { width:100%; max-width:100%; min-width:0; }
.mobile-content .metric-grid-mobile { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.mobile-content .metric-card { min-height:96px; padding:14px; }
.mobile-content .metric-value { font-size:26px; }
.mobile-content .quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
.mobile-content .quick-action { min-height:88px; }
.mobile-content .layout-main-aside, .mobile-content .calendar-layout { width:100%; max-width:100%; min-width:0; grid-template-columns:minmax(0,1fr); }
.mobile-content .layout-main-aside > div,
.mobile-content .layout-main-aside > aside { width:100%; max-width:100%; min-width:0; }
.mobile-content .child-card { display:block; }
.mobile-content .child-avatar { margin-bottom:12px; }
.mobile-content .attendance-row { grid-template-columns:1fr; }
.mobile-content .message-layout { grid-template-columns:1fr; min-height:580px; }
.mobile-content .conversation-list { border-right:0; border-bottom:1px solid var(--line); max-height:220px; overflow:auto; }
.mobile-content .chat-panel { min-height:360px; }
.mobile-content .bubble { max-width:88%; }
.mobile-content .event-card { grid-template-columns:52px 1fr; }
.mobile-content .event-card > .btn { grid-column:2; justify-self:start; }
.mobile-content .table-wrap { width:100%; max-width:100%; min-width:0; overflow-x:auto; border-radius:13px; -webkit-overflow-scrolling:touch; }
.mobile-content table { width:max-content; min-width:680px; max-width:none; }
.mobile-content .table-wrap::after { content:"Przesuń tabelę w bok"; display:block; padding:6px 10px; color:var(--muted); font-size:9px; text-align:right; }
.mobile-content .menu-grid { grid-template-columns:1fr; overflow:visible; }
.mobile-content .menu-day { min-width:0; }
.mobile-content .menu-day:not(:first-child) { display:none; }

.bottom-nav { position:fixed; left:0; right:0; width:100vw; max-width:100vw; bottom:0; z-index:80; display:grid; grid-template-columns:repeat(5,1fr); padding:7px 6px calc(7px + env(safe-area-inset-bottom)); background:rgba(255,255,255,.97); border-top:1px solid rgba(39,76,119,.1); box-shadow:0 -8px 24px rgba(39,76,119,.08); }
.bottom-nav-btn { border:0; background:transparent; color:var(--muted); min-width:0; padding:3px 1px; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:9px; font-weight:850; }
.bottom-nav-btn svg { width:18px; height:18px; }
.bottom-nav-btn.active { color:var(--primary); }
.bottom-nav-icon { width:32px; height:26px; border-radius:999px; display:grid; place-items:center; }
.bottom-nav-btn.active .bottom-nav-icon { background:var(--primary-soft); }
.mobile-more-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.mobile-more-btn { min-height:95px; border:1px solid var(--line); background:white; border-radius:16px; padding:13px; text-align:left; color:var(--primary); font-size:11px; font-weight:850; }
.mobile-more-btn svg { width:20px; height:20px; margin-bottom:10px; }

.mobile-content .section-head { min-width:0; flex-wrap:wrap; }
.mobile-content .section-head > * { min-width:0; }
.mobile-content .card,
.mobile-content .group-card,
.mobile-content .list,
.mobile-content .list-row { max-width:100%; min-width:0; }
.mobile-content .list-main { min-width:0; }
.mobile-content .list-title,
.mobile-content .list-sub { overflow-wrap:anywhere; }
.mobile-content .btn { max-width:100%; }

/* Modal / drawer */
.modal-backdrop { position:fixed; inset:0; z-index:2000; background:rgba(23,40,55,.55); display:flex; align-items:center; justify-content:center; padding:20px; }
.modal { width:min(620px,100%); max-height:calc(100vh - 40px); overflow:auto; background:white; border-radius:24px; box-shadow:0 30px 90px rgba(0,0,0,.28); }
.modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 22px 14px; border-bottom:1px solid var(--line); }
.modal-title { margin:0; color:var(--primary); font-family:Manrope,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:24px; }
.modal-subtitle { margin:5px 0 0; color:var(--muted); font-size:11px; }
.modal-body { padding:20px 22px; }
.modal-footer { display:flex; gap:8px; justify-content:flex-end; padding:14px 22px 20px; border-top:1px solid var(--line); }
.close-btn { width:38px; height:38px; border-radius:12px; border:1px solid var(--line); background:white; color:var(--primary); display:grid; place-items:center; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.field label { display:block; color:var(--muted); font-size:10px; font-weight:850; margin-bottom:6px; }
.field.full { grid-column:1/-1; }

.drawer-backdrop { position:fixed; inset:0; z-index:1900; background:rgba(23,40,55,.35); }
.drawer { position:absolute; top:0; right:0; width:min(520px,100%); height:100%; overflow:auto; background:white; box-shadow:-24px 0 70px rgba(0,0,0,.2); padding:22px; }
.drawer-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:18px; }

.scenario-panel { position:fixed; right:18px; bottom:18px; z-index:1500; width:min(370px,calc(100vw - 36px)); background:white; border:1px solid var(--line); border-radius:20px; box-shadow:0 22px 60px rgba(23,50,79,.22); overflow:hidden; }
.scenario-head { padding:14px 16px; display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--primary); color:white; }
.scenario-title { font-weight:900; font-size:13px; }
.scenario-body { padding:14px; }
.scenario-step { display:flex; gap:10px; align-items:flex-start; padding:10px; border-radius:12px; cursor:pointer; }
.scenario-step:hover { background:var(--surface-neutral); }
.scenario-number { width:25px; height:25px; border-radius:50%; background:var(--primary-soft); color:var(--primary); display:grid; place-items:center; font-weight:900; font-size:10px; flex:0 0 auto; }
.scenario-step.done .scenario-number { background:var(--green-soft); color:#356b3a; }
.scenario-copy strong { display:block; color:var(--primary); font-size:11px; }
.scenario-copy span { display:block; color:var(--muted); font-size:9px; margin-top:3px; line-height:1.35; }

.toast { position:fixed; left:50%; bottom:22px; transform:translateX(-50%); z-index:3000; max-width:min(520px,calc(100vw - 32px)); padding:12px 16px; border-radius:13px; background:#17324f; color:white; box-shadow:0 18px 50px rgba(0,0,0,.24); font-size:11px; font-weight:800; }
.empty-state { padding:40px 20px; text-align:center; color:var(--muted); }
.empty-state svg { width:38px; height:38px; margin:0 auto 12px; color:var(--primary-2); }



@media (max-width: 1120px) {
  .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .layout-main-aside { grid-template-columns:1fr; }
}

@media (max-width: 820px) {
  :root { --demo-h: 58px; }
  .demo-toolbar { min-height:var(--demo-h); padding:8px 10px; }
  .demo-toolbar-inner { display:none; }
  .demo-mobile-controls { display:flex; }
  .demo-select { min-width:0; height:38px; }
  .desktop-layout { display:none; }
  .mobile-layout { display:block; }
  .app-stage, .app-shell { min-height:calc(100dvh - var(--demo-h)); }
  .modal-backdrop { align-items:flex-end; padding:0; }
  .modal { width:100%; max-height:92dvh; border-radius:24px 24px 0 0; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .scenario-panel { bottom:86px; }
}

@media (max-width: 520px) {
  .demo-toolbar { padding:8px; }
  .demo-mobile-controls { gap:6px; }
  .demo-role-select-wrap { gap:5px; }
  .demo-role-select-wrap span { display:none; }
  .demo-action-btn { min-height:38px; padding:7px 9px; font-size:10px; }
  .mobile-header { top:var(--demo-h); }
  .mobile-content { padding-left:14px; padding-right:14px; }
  .mobile-content .page-title { font-size:26px; }
  .mobile-content .metric-grid-mobile { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .scenario-panel { right:8px; width:calc(100vw - 16px); }
}


/* =========================================================
   KINDAY DEMO v3 — desktop app shell correction
   One module title only. The outer document never scrolls.
   ========================================================= */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#app {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.demo-toolbar {
  position: relative;
  top: auto;
}

.app-stage,
.app-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.desktop-layout {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  position: static;
  top: auto;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.workspace {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  position: static;
  top: auto;
  height: 58px;
  min-height: 58px;
  padding: 0 28px;
  z-index: 60;
}

/* The top utility bar no longer repeats the active module name. */
.topbar-title,
.topbar-kicker,
.topbar-page {
  display: none !important;
}

.topbar-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.topbar-context-name {
  color: var(--primary);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-context-separator {
  color: #b4ada4;
}

.topbar-context-role {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

.workspace-content {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.workspace-content > .page {
  min-height: 100%;
}

/* Mobile uses the same fixed-shell principle: header and navigation stay put,
   only the content area scrolls. */
.mobile-layout {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.mobile-header {
  position: static;
  top: auto;
}

.mobile-content {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-bottom: 34px;
  -webkit-overflow-scrolling: touch;
}

.bottom-nav {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 820px) {
  .mobile-layout {
    display: grid;
  }

  .app-stage,
  .app-shell {
    height: 100%;
    min-height: 0;
  }
}

/* =========================================================
   KINDAY DEMO v4 — role login, single app bar and menu import
   ========================================================= */
:root { --demo-h: 0px; }

html,
body,
#app {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#app {
  display: block;
}

.demo-toolbar {
  display: none !important;
}

.app-stage,
.app-shell,
.desktop-layout,
.mobile-layout {
  height: 100dvh;
  min-height: 0;
}

/* Role-selection login replaces the permanent demo control bar. */
.demo-login {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(560px, 1.22fr);
  overflow: hidden;
  background: var(--bg);
}

.demo-login-hero {
  min-height: 0;
  padding: clamp(34px, 5vw, 72px);
  color: white;
  background:
    radial-gradient(circle at 18% 20%, rgba(120,169,209,.33), transparent 34%),
    radial-gradient(circle at 85% 75%, rgba(229,168,59,.23), transparent 34%),
    linear-gradient(145deg, #17324f, #274c77 72%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.demo-login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.demo-login-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--primary);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

.demo-login-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: .12em;
}

.demo-login-brand span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.68);
  font-size: 11px;
}

.demo-login-copy {
  max-width: 520px;
  margin: auto 0;
  padding: 40px 0;
}

.demo-login-eyebrow {
  display: block;
  color: var(--amber);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.demo-login-copy h1 {
  margin: 14px 0 18px;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(40px, 5vw, 66px);
  line-height: .98;
}

.demo-login-copy p {
  max-width: 470px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 15px;
  line-height: 1.65;
}

.demo-login-notice {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 760;
}

.demo-login-panel {
  min-width: 0;
  min-height: 0;
  padding: clamp(28px, 4vw, 58px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
}

.demo-login-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.demo-login-panel-head h2 {
  margin: 8px 0 0;
  color: var(--primary);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(26px, 3vw, 36px);
}

.demo-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.demo-role-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 17px;
  border: 1px solid rgba(39,76,119,.1);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.demo-role-card .btn {
  grid-column: 1 / -1;
  justify-content: center;
}

.demo-role-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}

.demo-role-icon.blue { background: var(--primary-soft); color: var(--primary); }
.demo-role-icon.green { background: var(--green-soft); color: #3f7745; }
.demo-role-icon.teal { background: var(--teal-soft); color: #2d716c; }
.demo-role-icon.amber { background: var(--amber-soft); color: #805b11; }
.demo-role-icon.coral { background: var(--coral-soft); color: #9a463f; }

.demo-role-copy h3 {
  margin: 2px 0 5px;
  color: var(--primary);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
}

.demo-role-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.demo-scenario-start {
  width: 100%;
  margin-top: 14px;
  padding: 15px 17px;
  border: 1px solid rgba(229,168,59,.3);
  border-radius: 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--amber-soft);
  color: var(--primary);
}

.demo-scenario-start > span:first-child {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: white;
  color: #8a6110;
}

.demo-scenario-start strong,
.demo-scenario-start small {
  display: block;
}

.demo-scenario-start strong { font-size: 12px; }
.demo-scenario-start small { margin-top: 4px; color: var(--muted); font-size: 10px; }

/* Desktop session controls live with the user card, not in a second top bar. */
.sidebar-session-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.sidebar-session-btn {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: white;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.sidebar-session-btn:hover {
  background: var(--surface-neutral);
  color: var(--primary);
}

.topbar-actions .avatar {
  display: none;
}

.mobile-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

/* Mobile menu: one day at a time with an explicit route back to the week. */
.menu-mobile-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-neutral);
}

.menu-mobile-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.menu-mobile-tabs button.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.menu-mobile-back {
  margin-bottom: 10px;
}

.menu-mobile-back .btn svg {
  transform: rotate(180deg);
}

.menu-day-navigator {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.menu-day-navigator > div {
  min-width: 0;
  text-align: center;
}

.menu-day-navigator strong,
.menu-day-navigator span {
  display: block;
}

.menu-day-navigator strong {
  color: var(--primary);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
}

.menu-day-navigator span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.menu-day-navigator .icon-btn:disabled {
  opacity: .32;
  cursor: default;
}

.menu-chevron-left {
  display: grid;
  place-items: center;
  transform: rotate(180deg);
}

.menu-mobile-meals {
  display: grid;
  gap: 10px;
}

.menu-mobile-meal {
  padding: 14px;
  border-left: 4px solid var(--amber);
}

.menu-mobile-meal p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.menu-mobile-week {
  display: grid;
  gap: 9px;
}

.menu-week-row {
  width: 100%;
  min-width: 0;
  padding: 13px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.menu-week-date strong,
.menu-week-date small {
  display: block;
}

.menu-week-date strong {
  color: var(--primary);
  font-size: 11px;
}

.menu-week-date small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.menu-week-summary {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Word import guidance. */
.import-format-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--primary-soft);
}

.import-format-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--primary);
}

.import-format-card strong {
  color: var(--primary);
  font-size: 12px;
}

.import-format-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.import-requirements {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-warm);
}

.import-requirements h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
}

.import-requirements ul {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.upload-zone {
  min-height: 150px;
  padding: 18px;
  border: 1.5px dashed #b8c9d8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background: #fbfdff;
  cursor: pointer;
}

.upload-zone-icon {
  color: var(--primary);
}

.upload-zone strong {
  color: var(--primary);
  font-size: 12px;
}

.upload-zone > span:not(.upload-zone-icon) {
  color: var(--muted);
  font-size: 10px;
}

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

.upload-zone em {
  margin-top: 7px;
  max-width: 100%;
  color: var(--primary-2);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.modal-footer {
  flex-wrap: wrap;
}

@media (max-width: 1040px) {
  .demo-login {
    grid-template-columns: minmax(280px, .65fr) minmax(500px, 1.35fr);
  }

  .demo-login-hero {
    padding: 32px;
  }
}

@media (max-width: 820px) {
  .demo-login {
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .demo-login-hero {
    min-height: auto;
    padding: 24px 18px 26px;
  }

  .demo-login-copy {
    margin: 30px 0 24px;
    padding: 0;
  }

  .demo-login-copy h1 {
    font-size: 38px;
  }

  .demo-login-copy p {
    font-size: 13px;
  }

  .demo-login-notice {
    width: 100%;
  }

  .demo-login-panel {
    padding: 22px 16px 34px;
    overflow: visible;
  }

  .demo-login-panel-head {
    align-items: flex-start;
  }

  .demo-role-grid {
    grid-template-columns: 1fr;
  }

  .app-stage,
  .app-shell,
  .mobile-layout {
    height: 100dvh;
  }

  .modal-footer .btn {
    flex: 1 1 130px;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .demo-login-panel-head {
    display: block;
  }

  .demo-login-panel-head > .btn {
    margin-top: 12px;
  }

  .menu-week-row {
    grid-template-columns: 80px minmax(0, 1fr) auto;
  }
}

/* =========================================================
   KINDAY DEMO v5 — stable desktop canvas across resolutions
   Desktop UI is NOT scaled with viewport width. Larger displays
   add breathing room; they do not stretch typography/cards.
   ========================================================= */
@media (min-width: 821px) {
  :root {
    --desktop-shell-max: 1600px;
    --desktop-content-max: 1280px;
    --desktop-sidebar: 258px;
  }

  body {
    background: #f2ece4;
  }

  /* Stable login composition. No vw-based typography/padding. */
  .demo-login {
    width: min(1440px, 100%);
    max-width: 1440px;
    margin: 0 auto;
    grid-template-columns: 500px minmax(0, 1fr);
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(39,76,119,.04), 0 18px 70px rgba(30,48,63,.08);
  }

  .demo-login-hero {
    padding: 48px;
  }

  .demo-login-copy {
    max-width: 410px;
    padding: 34px 0;
  }

  .demo-login-copy h1 {
    font-size: 50px;
    line-height: 1.02;
    letter-spacing: -.035em;
    font-weight: 800;
  }

  .demo-login-copy p {
    font-size: 14px;
  }

  .demo-login-panel {
    padding: 44px 48px;
  }

  .demo-login-panel-head h2 {
    font-size: 34px;
  }

  .demo-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .demo-role-card {
    padding: 16px;
  }

  /* Stable desktop application shell. */
  .desktop-layout {
    width: min(var(--desktop-shell-max), 100%);
    max-width: var(--desktop-shell-max);
    margin: 0 auto;
    grid-template-columns: var(--desktop-sidebar) minmax(0, 1fr);
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(39,76,119,.035);
  }

  .workspace {
    min-width: 0;
    min-height: 0;
  }

  .topbar {
    padding-left: 28px;
    padding-right: 28px;
  }

  .page {
    width: 100%;
    max-width: var(--desktop-content-max);
    margin: 0 auto;
    padding: 28px 32px 36px;
  }

  .page-title {
    font-size: 36px;
  }

  /* Prevent large monitors from turning components into giant tiles. */
  .metric-card {
    min-height: 108px;
  }

  .layout-main-aside {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 360px);
  }

  .modal {
    width: min(620px, calc(100% - 48px));
  }
}

/* Compact desktop / MacBook class: same composition, tighter fixed values. */
@media (min-width: 821px) and (max-width: 1240px) {
  :root {
    --desktop-sidebar: 236px;
  }

  .demo-login {
    grid-template-columns: 390px minmax(0, 1fr);
  }

  .demo-login-hero {
    padding: 32px;
  }

  .demo-login-copy h1 {
    font-size: 44px;
    line-height: 1.03;
    letter-spacing: -.035em;
    font-weight: 800;
  }

  .demo-login-panel {
    padding: 30px 32px;
  }

  .demo-login-panel-head h2 {
    font-size: 30px;
  }

  .demo-role-card {
    padding: 14px;
  }

  .page {
    padding: 24px 26px 32px;
  }

  .page-title {
    font-size: 34px;
  }
}

/* Very wide desktop: preserve the same desktop design instead of scaling it. */
@media (min-width: 1921px) {
  .demo-login,
  .desktop-layout {
    border-left: 1px solid rgba(39,76,119,.05);
    border-right: 1px solid rgba(39,76,119,.05);
  }
}


/* KINDAY v6 typography: modern, warm sans-serif headings */
.page-title, .card-title, .section-title, .modal-title, .child-name, .preschool-brand-name, .mobile-brand-name, .demo-login-copy h1, .demo-login-panel-head h2, .demo-role-copy h3, .offer-card h3 {
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}
.demo-login-copy h1 { font-weight: 800; }
.demo-login-panel-head h2, .page-title { font-weight: 800; }
.card-title, .section-title, .modal-title, .demo-role-copy h3 { font-weight: 700; }

/* KINDAY v7 — karty NFC i kontrola dostępu */
.access-device-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.access-device-card { display:flex; align-items:center; gap:12px; padding:15px 16px; }
.access-device-icon { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; flex:0 0 auto; }
.access-device-icon.green { background:var(--green-soft); color:#356b3a; }
.access-device-icon.teal { background:var(--teal-soft); color:#286d68; }
.access-device-icon.blue { background:var(--primary-soft); color:var(--primary); }
.access-live-card { background:linear-gradient(145deg,#fff,var(--green-soft)); }
.access-timeline { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; margin-top:18px; }
.access-timeline > div:not(.access-line) { display:flex; flex-direction:column; gap:4px; }
.access-timeline span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.access-timeline strong { color:var(--primary); font-size:22px; }
.access-line { height:3px; background:linear-gradient(90deg,var(--green),var(--teal)); border-radius:999px; }
@media (max-width: 1100px) { .access-device-grid { grid-template-columns:1fr; } }
@media (max-width: 820px) {
  .access-device-grid { grid-template-columns:1fr; }
  .access-device-card { padding:13px; }
  .access-timeline strong { font-size:18px; }
  #cards-table .btn { min-width:70px; }
}

/* KINDAY v10 — public parent demo / PWA */
html,body,#app{height:100%;min-height:0;overflow:hidden;}
body{overscroll-behavior:none;}
.workspace-content,.mobile-content{overscroll-behavior:contain;}
@media (min-width:821px){
  .desktop-layout{max-width:1600px;margin:0 auto;}
  .sidebar{width:248px;}
  .workspace-content{padding-top:18px;padding-bottom:18px;}
  .workspace-content>.page{max-width:1280px;margin:0 auto;}
}
@media (max-width:820px){
  .mobile-layout{height:100dvh;}
  .mobile-header{min-height:58px;padding:8px 12px;gap:7px;}
  .mobile-header .icon-btn{width:36px;height:36px;flex:0 0 36px;}
  .mobile-header .avatar{width:34px;height:34px;flex:0 0 34px;font-size:10px;}
  .mobile-content{padding:12px 12px 18px;}
  .mobile-content .page-header{margin-bottom:12px;}
  .mobile-content .page-title{font-size:22px;}
  .mobile-content .page-subtitle{font-size:10px;line-height:1.35;}
  .mobile-content .child-card{padding:12px;}
  .mobile-content .child-avatar{width:48px;height:48px;font-size:24px;}
  .mobile-content .child-name{font-size:17px;}
  .mobile-content .grid.grid-3{gap:8px;}
  .mobile-content .card-pad{padding:12px;}
  .bottom-nav{min-height:66px;padding-bottom:max(5px,env(safe-area-inset-bottom));}
  .bottom-nav-btn{min-height:56px;}
}


/* =========================================================
   KINDAY v11 — mobile web-app: fixed shell, no document scroll
   ========================================================= */
html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}
body {
  position: fixed;
  inset: 0;
  touch-action: manipulation;
}
#app, .app-stage, .app-shell { height: 100dvh !important; min-height: 0 !important; overflow: hidden !important; }
@supports (-webkit-touch-callout: none) {
  #app, .app-stage, .app-shell, .mobile-layout { height: -webkit-fill-available !important; }
}
@media (max-width: 820px) {
  .mobile-layout {
    height: 100dvh !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 58px minmax(0,1fr) 66px !important;
    overflow: hidden !important;
    padding: 0 !important;
  }
  .mobile-header { height:58px; min-height:58px; overflow:hidden; }
  .mobile-content {
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 10px 12px 14px !important;
  }
  .bottom-nav { height:66px; min-height:66px; overflow:hidden; padding:5px 6px max(5px,env(safe-area-inset-bottom)) !important; }

  /* Start screen behaves like a native app dashboard: no vertical scroll. */
  .mobile-layout.route-dashboard .mobile-content { overflow: hidden !important; }
  .mobile-layout.route-dashboard .mobile-content > .page { height:100%; min-height:0; overflow:hidden; }
  .parent-mobile-home { display:grid; grid-template-rows:auto auto minmax(0,1fr); gap:9px; }
  .parent-mobile-hero { border:1px solid rgba(39,76,119,.10); border-radius:18px; background:white; box-shadow:var(--shadow-sm); padding:11px; display:grid; gap:9px; }
  .parent-mobile-child { display:flex; align-items:center; gap:10px; min-width:0; }
  .parent-mobile-child .child-avatar { width:43px;height:43px;margin:0;font-size:21px; }
  .parent-mobile-child .child-name { font-size:16px; }
  .parent-mobile-child .child-meta { gap:5px; margin-top:4px; }
  .parent-mobile-child .badge { font-size:8px; padding:4px 7px; }
  .parent-mobile-time { border:0; border-radius:13px; background:var(--green-soft); color:var(--primary); display:grid; grid-template-columns:34px 1fr auto; gap:8px; align-items:center; text-align:left; padding:8px 10px; }
  .parent-mobile-time > span:first-child { width:32px;height:32px;border-radius:10px;background:white;display:grid;place-items:center;color:#356b3a; }
  .parent-mobile-time small { display:block;color:var(--muted);font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.05em; }
  .parent-mobile-time strong { display:block;font-size:12px;margin-top:2px; }
  .parent-mobile-alert { min-height:34px; border-radius:11px; background:var(--green-soft); color:#356b3a; font-size:9px; line-height:1.25; padding:7px 9px; display:flex; gap:7px; align-items:center; }
  .parent-mobile-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:8px; min-height:0; }
  .parent-app-tile { min-width:0; min-height:0; border:1px solid rgba(39,76,119,.08); border-radius:16px; padding:11px; text-align:left; display:flex; flex-direction:column; justify-content:center; gap:5px; box-shadow:var(--shadow-sm); }
  .parent-app-tile > span { width:32px;height:32px;border-radius:10px;background:rgba(255,255,255,.72);display:grid;place-items:center; }
  .parent-app-tile strong { color:var(--primary); font-size:12px; line-height:1.1; }
  .parent-app-tile small { color:var(--muted); font-size:8.5px; line-height:1.25; }
  .parent-app-tile.coral { background:var(--coral-soft); }
  .parent-app-tile.teal { background:var(--teal-soft); }
  .parent-app-tile.amber { background:var(--amber-soft); }
  .parent-app-tile.blue { background:var(--primary-soft); }
  .parent-mobile-feed { display:none; }

  /* RCP phone flow */
  .parent-rcp-card { margin-bottom:10px; padding:12px; border-radius:18px; background:linear-gradient(145deg,#fff,var(--primary-soft)); }
  .parent-rcp-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
  .parent-rcp-kicker { font-size:8px; font-weight:900; letter-spacing:.08em; color:var(--amber); }
  .parent-rcp-head h2 { margin:3px 0 3px; color:var(--primary); font-size:18px; }
  .parent-rcp-head p { margin:0; color:var(--muted); font-size:9px; line-height:1.35; }
  .parent-rcp-person { display:grid; gap:5px; margin-top:10px; }
  .parent-rcp-person > span { font-size:9px; font-weight:800; color:var(--muted); }
  .parent-rcp-person .select { height:40px; }
  .parent-rcp-actions { display:grid; grid-template-columns:1fr; gap:7px; margin-top:9px; }
  .parent-rcp-actions .btn { min-height:43px; justify-content:center; }
  .parent-phone-btn { font-size:12px; }
  .parent-rcp-note { margin-top:9px; padding:8px 9px; border-radius:11px; background:white; color:var(--muted); font-size:8.5px; line-height:1.35; display:flex; gap:6px; align-items:flex-start; }

  /* Time view remains scrollable only inside the app content pane, never the page/body. */
  .mobile-layout.route-time .mobile-content { overflow-y:auto !important; }
  .mobile-layout.route-time .page-header { margin-bottom:8px; }
  .mobile-layout.route-time .page-title { font-size:20px; }
  .mobile-layout.route-time .child-card { margin-bottom:9px !important; }
  .mobile-layout.route-time .layout-main-aside { gap:9px; }
  .mobile-layout.route-time .section { margin-top:9px; }
}

@media (max-width: 380px), (max-height: 720px) and (max-width: 820px) {
  .mobile-layout { grid-template-rows:54px minmax(0,1fr) 62px !important; }
  .mobile-header { height:54px; min-height:54px; }
  .bottom-nav { height:62px; min-height:62px; }
  .parent-mobile-home { gap:6px; }
  .parent-mobile-hero { padding:8px; gap:6px; }
  .parent-mobile-child .child-avatar { width:38px;height:38px;font-size:18px; }
  .parent-mobile-time { padding:6px 8px; }
  .parent-app-tile { padding:8px; gap:4px; border-radius:13px; }
  .parent-app-tile > span { width:28px;height:28px; }
  .parent-app-tile small { font-size:7.5px; }
}

/* KINDAY v11.3 — parent welcome + simplified parent-facing experience */
.parent-welcome-shell{
  width:100%;height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column;
  background:linear-gradient(145deg,#f8fbff 0%,#fffaf3 52%,#eef8f6 100%);color:var(--primary);
}
.parent-welcome-main{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;display:grid;place-items:center;padding:24px 18px 12px;}
.parent-welcome-card{width:min(930px,100%);background:rgba(255,255,255,.94);border:1px solid rgba(39,76,119,.10);border-radius:28px;padding:28px;box-shadow:0 24px 70px rgba(39,76,119,.10);}
.parent-welcome-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px;}
.parent-welcome-logo{width:48px;height:48px;border-radius:15px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:950;font-size:22px;box-shadow:0 10px 24px rgba(39,76,119,.18);}
.parent-welcome-brand strong{display:block;font-size:18px;letter-spacing:.04em;}
.parent-welcome-brand span{display:block;color:var(--muted);font-size:11px;margin-top:2px;}
.parent-welcome-copy{max-width:720px;}
.parent-welcome-eyebrow{display:inline-block;color:var(--teal);font-weight:900;font-size:11px;text-transform:uppercase;letter-spacing:.1em;margin-bottom:8px;}
.parent-welcome-copy h1{font-size:clamp(30px,4.5vw,48px);line-height:1.02;margin:0 0 10px;letter-spacing:-.035em;}
.parent-welcome-copy p{margin:0;color:var(--muted);font-size:15px;line-height:1.55;max-width:680px;}
.parent-welcome-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:22px;}
.parent-welcome-feature{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:16px;padding:13px;background:#fff;min-width:0;}
.parent-welcome-feature .list-icon{flex:0 0 34px;width:34px;height:34px;}
.parent-welcome-feature strong{display:block;font-size:12px;line-height:1.2;}
.parent-welcome-feature span:not(.list-icon){display:block;color:var(--muted);font-size:10px;line-height:1.35;margin-top:4px;}
.parent-welcome-note{display:flex;align-items:center;gap:8px;margin-top:18px;padding:10px 12px;border-radius:12px;background:var(--primary-soft);font-size:10px;color:var(--primary);font-weight:750;}
.parent-welcome-footer{flex:0 0 auto;padding:12px 18px max(14px,env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid rgba(39,76,119,.08);backdrop-filter:blur(12px);display:flex;justify-content:center;}
.parent-welcome-enter{width:min(930px,100%);min-height:50px;font-size:13px;letter-spacing:.04em;}
@media(max-width:820px){
  .parent-welcome-main{padding:12px 12px 8px;display:block;}
  .parent-welcome-card{padding:16px;border-radius:20px;box-shadow:none;min-height:100%;}
  .parent-welcome-brand{margin-bottom:12px;}
  .parent-welcome-logo{width:40px;height:40px;border-radius:12px;font-size:18px;}
  .parent-welcome-brand strong{font-size:15px;}.parent-welcome-brand span{font-size:9px;}
  .parent-welcome-eyebrow{font-size:9px;margin-bottom:5px;}
  .parent-welcome-copy h1{font-size:27px;margin-bottom:6px;}
  .parent-welcome-copy p{font-size:11px;line-height:1.4;}
  .parent-welcome-features{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:12px;}
  .parent-welcome-feature{padding:9px;border-radius:13px;gap:7px;}
  .parent-welcome-feature .list-icon{width:29px;height:29px;flex-basis:29px;}
  .parent-welcome-feature strong{font-size:10px;}.parent-welcome-feature span:not(.list-icon){font-size:8.5px;margin-top:2px;}
  .parent-welcome-note{margin-top:10px;padding:8px 9px;font-size:8.5px;}
  .parent-welcome-footer{padding:8px 12px max(9px,env(safe-area-inset-bottom));}
  .parent-welcome-enter{min-height:47px;}
}
@media(max-width:380px) and (max-height:700px){
  .parent-welcome-copy p{font-size:10px;}
  .parent-welcome-features{gap:5px;margin-top:9px;}
  .parent-welcome-feature{padding:7px;}
  .parent-welcome-feature span:not(.list-icon){display:none;}
  .parent-welcome-note{margin-top:8px;}
}


/* =========================================================
   KINDAY v12.2 — parent dashboard / messaging / RCP cleanup
   ========================================================= */
.parent-dashboard-top { align-items:stretch; }
.parent-summary-card { text-align:left; min-height:150px; }
.parent-summary-card.green { background:linear-gradient(145deg,#fff,var(--green-soft)); }
.parent-summary-card.amber { background:linear-gradient(145deg,#fff,var(--amber-soft)); }
.parent-summary-card.teal { background:linear-gradient(145deg,#fff,var(--teal-soft)); }
.parent-summary-value { color:var(--primary); font-size:17px; line-height:1.28; font-weight:850; margin:8px 0 6px; }
.parent-dashboard .layout-main-aside { align-items:start; }

@media (max-width:820px){
  .parent-mobile-home{
    display:grid;
    grid-template-rows:auto minmax(154px,.85fr) minmax(176px,1fr);
    gap:7px;
    height:100%;
    min-height:0;
  }
  .parent-mobile-hero{padding:9px 10px;gap:7px;}
  .parent-mobile-status{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;}
  .parent-mobile-status>div{min-width:0;display:grid;gap:2px;}
  .parent-mobile-status strong{font-size:14px;color:var(--primary);line-height:1.1;}
  .parent-mobile-status span:not(.badge){font-size:9px;color:var(--muted);}
  .parent-mobile-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(0,1fr));
    gap:7px;
  }
  .parent-app-tile{padding:9px;gap:4px;border-radius:14px;}
  .parent-app-tile>span{width:29px;height:29px;border-radius:9px;}
  .parent-app-tile strong{font-size:11px;}
  .parent-app-tile small{font-size:8px;line-height:1.18;}
  .parent-mobile-feed{
    display:grid;
    grid-template-rows:auto repeat(3,minmax(0,1fr));
    gap:5px;
    min-height:0;
    padding:8px;
    border:1px solid rgba(39,76,119,.10);
    border-radius:16px;
    background:white;
    box-shadow:var(--shadow-sm);
    overflow:hidden;
  }
  .parent-mobile-feed-title{display:flex;align-items:center;justify-content:space-between;padding:0 3px 2px;}
  .parent-mobile-feed-title strong{font-size:11px;color:var(--primary);}
  .parent-mobile-feed-title button{border:0;background:transparent;color:var(--primary);font-size:8px;font-weight:800;padding:2px 0;}
  .parent-mobile-feed-row{
    width:100%;
    min-height:0;
    border:0;
    border-top:1px solid rgba(39,76,119,.07);
    background:transparent;
    display:grid;
    grid-template-columns:30px minmax(0,1fr) auto;
    gap:7px;
    align-items:center;
    text-align:left;
    padding:5px 3px;
  }
  .parent-mobile-feed-row .list-icon{width:28px;height:28px;border-radius:9px;}
  .parent-mobile-feed-row .list-title{font-size:9.5px;line-height:1.1;}
  .parent-mobile-feed-row .list-sub{font-size:7.8px;line-height:1.15;margin-top:2px;}
  .parent-mobile-feed-row .chevron{font-size:16px;}
  .parent-mobile-alert{min-height:30px;padding:6px 8px;font-size:8px;}
  .route-dashboard .parent-mobile-feed{display:grid;}
  .mobile-header .mobile-brand{margin-right:auto;}
  .message-layout .chat-composer{grid-template-columns:minmax(0,1fr) auto;}
  .message-layout .chat-composer .icon-btn{display:none;}
}

@media (max-width:390px) and (max-height:760px){
  .parent-mobile-home{
    grid-template-rows:auto minmax(142px,.8fr) minmax(158px,1fr);
  }
  .parent-mobile-alert{display:none;}
  .parent-mobile-feed-row:nth-of-type(4){display:none;}
  .parent-mobile-feed{grid-template-rows:auto repeat(2,minmax(0,1fr));}
}

/* KINDAY v12.4 — spójny branding */
.kinday-sidebar-logo{display:block;width:150px;max-width:100%;height:auto;object-fit:contain}
.preschool-brand{flex-direction:column;align-items:flex-start;gap:5px;padding:0 8px 18px}
.preschool-brand-sub{margin-top:0}
.kinday-mobile-logo{display:block;width:112px;max-width:48vw;height:auto;object-fit:contain}
.mobile-brand{gap:8px}
.mobile-brand-sub{margin-top:0;font-size:9px}
.demo-login-brand{flex-direction:column;align-items:flex-start;gap:8px}
.demo-login-logo-wrap{display:inline-flex;align-items:center;background:#fff;border-radius:14px;padding:9px 12px;box-shadow:0 12px 30px rgba(0,0,0,.16)}
.demo-login-logo-img{display:block;width:190px;max-width:55vw;height:auto}
.demo-login-brand-sub{display:block;color:rgba(255,255,255,.72);font-size:11px;font-weight:750}
.parent-welcome-brand{flex-direction:column;align-items:flex-start;gap:5px;margin-bottom:20px}
.kinday-welcome-logo{display:block;width:190px;max-width:62vw;height:auto;object-fit:contain}
.parent-welcome-brand>span{display:block;color:var(--muted);font-size:11px;margin-top:1px}
@media(max-width:820px){
  .kinday-sidebar-logo{width:132px}.kinday-mobile-logo{width:102px}.kinday-welcome-logo{width:150px}
  .parent-welcome-brand{margin-bottom:12px}.parent-welcome-brand>span{font-size:9px}.demo-login-logo-img{width:154px}
}


/* =========================================================
   KINDAY v12.7 — locked UI rules: FHD/QHD consistency + clean RCP
   ========================================================= */
.parent-rcp-card{
  margin-bottom:18px;
  padding:18px;
  border-radius:20px;
  background:linear-gradient(145deg,#fff,var(--primary-soft));
}
.parent-rcp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.parent-rcp-head>div{min-width:0}
.parent-rcp-head h2{margin:0;color:var(--primary);font-size:22px;line-height:1.15}
.parent-rcp-head p{margin:7px 0 0;max-width:760px;color:var(--muted);font-size:12px;line-height:1.45}
.parent-rcp-controls{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:12px;align-items:end;margin-top:16px}
.parent-rcp-person{display:grid;gap:6px;margin:0}
.parent-rcp-person>span{font-size:11px;font-weight:800;color:var(--muted)}
.parent-rcp-person .select{height:42px}
.parent-rcp-actions{display:flex;gap:8px;margin:0;flex-wrap:wrap;justify-content:flex-end}
.parent-rcp-actions .btn{min-height:42px;justify-content:center}
.parent-rcp-note{margin-top:12px;padding:9px 11px;border-radius:12px;background:rgba(255,255,255,.88);color:var(--muted);font-size:10px;line-height:1.4;display:flex;gap:7px;align-items:flex-start}
.parent-stay-card{margin-bottom:16px}
.parent-stay-timeline{margin-top:14px}
.parent-stay-status{margin-top:14px}

/* FHD and laptop-height desktops use the same composition as QHD, only denser.
   The document never scrolls; only the app content pane can scroll. */
@media (min-width:821px) and (max-height:1100px){
  :root{--desktop-shell-max:1440px;--desktop-content-max:1160px;--desktop-sidebar:220px}
  .desktop-layout{width:min(var(--desktop-shell-max),100%);max-width:var(--desktop-shell-max)}
  .sidebar{padding:14px 12px 12px}
  .preschool-brand{padding:0 7px 13px}
  .kinday-sidebar-logo{width:128px}
  .side-nav{padding:12px 0;gap:2px}
  .side-nav-btn{min-height:38px;padding:8px 10px;font-size:12px}
  .sidebar-bottom{padding-top:10px}
  .user-card{padding:7px}
  .avatar{width:36px;height:36px}
  .workspace{grid-template-rows:54px minmax(0,1fr)}
  .topbar{height:54px;min-height:54px;padding:0 22px}
  .workspace-content>.page,.page{max-width:var(--desktop-content-max);padding:20px 22px 24px}
  .page-header{margin-bottom:16px}
  .page-title{font-size:30px}
  .page-subtitle{font-size:11px;margin-top:5px}
  .grid{gap:12px}
  .card-pad{padding:15px}
  .card-title{font-size:17px}
  .section{margin-top:15px}
  .layout-main-aside{gap:14px;grid-template-columns:minmax(0,1.65fr) minmax(280px,330px)}
  .parent-summary-card{min-height:128px}
  .metric-card{min-height:96px;padding:15px}
  .metric-value{font-size:28px}
  .parent-rcp-card{padding:15px;margin-bottom:14px}
  .parent-rcp-head h2{font-size:20px}
  .parent-rcp-head p{font-size:11px}
  .parent-rcp-controls{margin-top:12px}
  .parent-stay-card{margin-bottom:12px}
}

@media (max-width:820px){
  .parent-rcp-card{margin-bottom:9px;padding:11px;border-radius:17px}
  .parent-rcp-head{gap:8px}
  .parent-rcp-head h2{font-size:17px}
  .parent-rcp-head p{font-size:9px;line-height:1.35;margin-top:4px}
  .parent-rcp-controls{grid-template-columns:1fr;gap:7px;margin-top:9px}
  .parent-rcp-person>span{font-size:9px}
  .parent-rcp-person .select{height:39px}
  .parent-rcp-actions{display:grid;grid-template-columns:1fr;gap:7px}
  .parent-rcp-actions .btn{min-height:41px}
  .parent-rcp-note{margin-top:8px;padding:7px 8px;font-size:8px}
  .parent-stay-timeline{margin-top:10px;grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr)}
  .parent-stay-timeline strong{font-size:18px}
  .parent-stay-timeline small{font-size:8px;line-height:1.25}
  .parent-stay-status{margin-top:10px}
}


/* KINDAY v13 — spójność UX: pobyt, wiadomości mobile, konto placówki */
.parent-stay-timeline { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; }
.parent-stay-timeline > div { min-width:0; }
.parent-stay-duration { grid-column:1 / -1; padding:10px 12px; border-radius:12px; background:var(--primary-soft); display:flex!important; flex-direction:row!important; align-items:center; justify-content:space-between; }
.parent-stay-duration strong { font-size:16px; }
.announcement-details { margin-top:12px; display:grid; gap:8px; padding:12px; border-radius:12px; background:rgba(39,76,119,.045); }
.announcement-details > div { display:flex; justify-content:space-between; gap:14px; font-size:12px; }
.announcement-details strong { color:var(--primary); }
.announcement-details span { color:var(--muted); text-align:right; }
.mobile-message-recipient { margin-bottom:10px; }
.mobile-message-recipient label { display:block; margin:0 0 6px; font-size:11px; font-weight:800; color:var(--primary); }
.mobile-chat-card { min-height:0; height:calc(100dvh - 190px); display:flex; flex-direction:column; overflow:hidden; }
.mobile-chat-card .chat-scroll { flex:1; min-height:0; overflow:auto; }
.mobile-chat-card .chat-composer { flex:0 0 auto; }
.toggle.disabled { opacity:.45; cursor:not-allowed; }
@media (max-width:820px) {
  .parent-stay-timeline { grid-template-columns:1fr 1fr; gap:10px; }
  .parent-stay-duration { grid-column:1 / -1; }
}


/* =========================================================
   KINDAY v13.2 — parent desktop menu alignment
   Only the parent desktop shell is affected.
   ========================================================= */
@media (min-width:821px){
  .desktop-layout.role-parent{
    --desktop-sidebar:252px;
    grid-template-columns:252px minmax(0,1fr);
  }
  .role-parent .sidebar{
    padding:18px 14px 14px;
    overflow:hidden;
  }
  .role-parent .preschool-brand{
    width:100%;
    min-width:0;
    padding:0 8px 16px;
    gap:4px;
    align-items:flex-start;
    overflow:hidden;
  }
  .role-parent .kinday-sidebar-logo{
    width:158px;
    max-width:100%;
    height:auto;
    object-fit:contain;
    object-position:left center;
    flex:0 0 auto;
  }
  .role-parent .preschool-brand-sub{
    width:100%;
    margin:0;
    color:var(--muted);
    font-size:10px;
    line-height:1.25;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .role-parent .side-nav{
    padding:14px 0 12px;
    gap:3px;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:none;
  }
  .role-parent .side-nav::-webkit-scrollbar{display:none}
  .role-parent .side-nav-btn{
    min-height:40px;
    padding:9px 10px;
    border-radius:11px;
    gap:10px;
  }
  .role-parent .side-nav-btn>span:last-child{
    min-width:0;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .role-parent .sidebar-bottom{
    margin-top:auto;
    background:#fffdf9;
    position:relative;
    z-index:2;
  }
  .role-parent .topbar-context-name{
    text-transform:none;
    letter-spacing:0;
  }
}
@media (min-width:821px) and (max-height:1100px){
  .desktop-layout.role-parent{
    --desktop-sidebar:238px;
    grid-template-columns:238px minmax(0,1fr);
  }
  .role-parent .sidebar{padding:14px 12px 12px}
  .role-parent .kinday-sidebar-logo{width:146px}
  .role-parent .side-nav{padding:10px 0 8px;gap:2px}
  .role-parent .side-nav-btn{min-height:37px;padding:7px 9px;font-size:11.5px}
}

/* =========================================================
   KINDAY v13.4 — MOBILE SHELL LOCK
   ZASADA: na mobile nie przewija się dokument ani szkielet aplikacji.
   Header i bottom-nav są stałymi wierszami 100dvh. Przewija się wyłącznie
   wewnętrzny obszar danych modułu. W Wiadomościach przewija się tylko rozmowa.
   ========================================================= */
@media (max-width:820px){
  html,body,#app,.app-stage,.app-shell{
    width:100%!important;
    height:100dvh!important;
    min-height:0!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }
  body{
    position:fixed!important;
    inset:0!important;
  }
  .mobile-layout{
    position:relative!important;
    width:100%!important;
    height:100dvh!important;
    max-height:100dvh!important;
    min-height:0!important;
    display:grid!important;
    grid-template-rows:58px minmax(0,1fr) 66px!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .mobile-header{
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    grid-row:1!important;
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
    overflow:hidden!important;
    flex:0 0 58px!important;
  }
  .mobile-content{
    grid-row:2!important;
    min-height:0!important;
    height:100%!important;
    max-height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .bottom-nav{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    grid-row:3!important;
    width:100%!important;
    max-width:100%!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
    flex:0 0 66px!important;
    overflow:hidden!important;
  }

  /* Start: zero scroll — całość mieści się w środkowym wierszu aplikacji. */
  .mobile-layout.route-dashboard .mobile-content{
    overflow:hidden!important;
  }
  .mobile-layout.route-dashboard .mobile-content>.page{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  /* Wiadomości: nieruchomy moduł. Przewija się wyłącznie historia rozmowy. */
  .mobile-layout.route-messages .mobile-content{
    overflow:hidden!important;
    padding:10px 12px 8px!important;
  }
  .mobile-layout.route-messages .mobile-content>.page{
    height:100%!important;
    min-height:0!important;
    display:grid!important;
    grid-template-rows:auto auto minmax(0,1fr)!important;
    align-content:stretch!important;
    overflow:hidden!important;
  }
  .mobile-layout.route-messages .page-header{
    margin:0 0 8px!important;
    flex:0 0 auto!important;
  }
  .mobile-layout.route-messages .page-title{
    margin:0!important;
    font-size:20px!important;
    line-height:1.1!important;
  }
  .mobile-layout.route-messages .page-subtitle{
    margin-top:4px!important;
    font-size:9px!important;
    line-height:1.25!important;
  }
  .mobile-layout.route-messages .mobile-message-recipient{
    margin:0 0 8px!important;
    flex:0 0 auto!important;
  }
  .mobile-layout.route-messages .mobile-message-recipient label{
    margin-bottom:4px!important;
    font-size:9px!important;
  }
  .mobile-layout.route-messages .mobile-message-recipient .select{
    min-height:38px!important;
    height:38px!important;
  }
  .mobile-layout.route-messages .mobile-chat-card{
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    margin:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  .mobile-layout.route-messages .mobile-chat-card .chat-header{
    flex:0 0 auto!important;
  }
  .mobile-layout.route-messages .mobile-chat-card .chat-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .mobile-layout.route-messages .mobile-chat-card .chat-composer{
    flex:0 0 auto!important;
    position:relative!important;
    bottom:auto!important;
  }
}

@media (max-width:380px), (max-width:820px) and (max-height:720px){
  .mobile-layout{
    grid-template-rows:54px minmax(0,1fr) 62px!important;
  }
  .mobile-header{
    height:54px!important;min-height:54px!important;max-height:54px!important;flex-basis:54px!important;
  }
  .bottom-nav{
    height:62px!important;min-height:62px!important;max-height:62px!important;flex-basis:62px!important;
  }
  .mobile-layout.route-messages .mobile-content{padding:7px 10px 6px!important;}
  .mobile-layout.route-messages .page-header{margin-bottom:6px!important;}
  .mobile-layout.route-messages .page-title{font-size:18px!important;}
  .mobile-layout.route-messages .page-subtitle{display:none!important;}
  .mobile-layout.route-messages .mobile-message-recipient{margin-bottom:6px!important;}
}



/* KINDAY VISUAL B — NOWOCZESNY EDUKACYJNY. CSS-only. */
:root{--bg:#f5faff;--surface:#fff;--surface-warm:#fff8eb;--surface-neutral:#f2f6f9;--primary:#1d568e;--primary-2:#5992c5;--primary-soft:#e6f2fc;--green:#69b88b;--green-soft:#e3f5e9;--coral:#e77c72;--coral-soft:#fde7e4;--amber:#efb74b;--amber-soft:#fff0cb;--teal:#5aaea8;--teal-soft:#def2f0;--family:#6ba9dd;--family-soft:#e4f2fc;--text:#293b49;--muted:#6b7c89;--line:#dde7ee;--shadow:0 12px 30px rgba(32,78,118,.075);--shadow-sm:0 5px 15px rgba(32,78,118,.065)}
.app-shell,.workspace{background:linear-gradient(145deg,#f8fcff,#f5faff)}
.sidebar{background:#fbfdff}.topbar,.mobile-header{background:rgba(248,252,255,.95)}
.card{border-color:#e0e9ef;box-shadow:0 7px 21px rgba(32,78,118,.06)}
.metric-card{border-top:3px solid currentColor}.bottom-nav{background:rgba(255,255,255,.98)}
.btn.primary{background:linear-gradient(135deg,#2b6ba4,#1d568e)}


/* =========================================================
   KINDAY v13.7 — NOWOCZESNY EDUKACYJNY / SHELL + COLOR LOCK
   WYŁĄCZNIE WARSTWA WIZUALNA I GEOMETRIA SCROLLA.
   Zero zmian funkcjonalnych.
   ========================================================= */

/* Jednolity focus na desktop i mobile — bez systemowego pomarańczowego obrysu. */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.input:focus,
.textarea:focus,
.select:focus,
.search-box input:focus,
.chat-composer input:focus {
  outline: none !important;
  border-color: var(--primary-2) !important;
  box-shadow: 0 0 0 3px rgba(89,146,197,.18) !important;
}
select, input, textarea, button { accent-color: var(--primary); }

/* DESKTOP: shell nieruchomy. Na ekranach, które mieszczą się w całości,
   nie pokazujemy scrolla workspace. Scroll zostaje tylko w danych. */
@media (min-width:821px){
  .workspace-content:has(.message-layout),
  .workspace-content:has(#feedback-form){
    overflow:hidden !important;
  }

  .workspace-content:has(.message-layout) > .page,
  .workspace-content:has(#feedback-form) > .page{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
    padding-top:18px !important;
    padding-bottom:18px !important;
  }

  /* Wiadomości: przewija się tylko historia rozmowy/lista rozmów. */
  .workspace-content:has(.message-layout) > .page{
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) !important;
  }
  .workspace-content:has(.message-layout) .page-header{
    margin-bottom:14px !important;
  }
  .workspace-content:has(.message-layout) .message-layout{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
  }
  .workspace-content:has(.message-layout) .conversation-list{
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }
  .workspace-content:has(.message-layout) .chat-panel{
    min-height:0 !important;
    overflow:hidden !important;
  }
  .workspace-content:has(.message-layout) .chat-scroll{
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }

  /* Opinia: ekran mieści się w FHD/QHD; ewentualny overflow zostaje w karcie,
     nie w całej aplikacji. */
  .workspace-content:has(#feedback-form) > .page{
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) !important;
  }
  .workspace-content:has(#feedback-form) .page-header{
    margin-bottom:14px !important;
  }
  .workspace-content:has(#feedback-form) .layout-main-aside{
    min-height:0 !important;
    height:100% !important;
    align-items:stretch !important;
  }
  .workspace-content:has(#feedback-form) .layout-main-aside > div,
  .workspace-content:has(#feedback-form) .layout-main-aside > aside{
    min-height:0 !important;
  }
  .workspace-content:has(#feedback-form) .card-pad{
    padding:14px 16px !important;
  }
  .workspace-content:has(#feedback-form) .form-grid{
    gap:9px !important;
  }
  .workspace-content:has(#feedback-form) .textarea{
    min-height:78px !important;
    max-height:92px !important;
    resize:none !important;
  }
  .workspace-content:has(#feedback-form) .notice{
    margin-top:9px !important;
  }
  .workspace-content:has(#feedback-form) .page-actions{
    margin-top:9px !important;
  }
  .workspace-content:has(#feedback-form) aside .list-row{
    padding:9px 0 !important;
  }
}

/* MOBILE: ten sam NOWOCZESNY EDUKACYJNY co desktop. */
@media (max-width:820px){
  body,
  .app-stage,
  .app-shell,
  .mobile-layout,
  .mobile-content{
    background:#f5faff !important;
  }

  .mobile-header{
    background:rgba(248,252,255,.98) !important;
    border-bottom-color:#dde7ee !important;
    box-shadow:0 4px 14px rgba(32,78,118,.045) !important;
  }

  .bottom-nav{
    background:rgba(255,255,255,.985) !important;
    border-top-color:#dde7ee !important;
    box-shadow:0 -5px 16px rgba(32,78,118,.055) !important;
  }

  .mobile-content .card,
  .mobile-chat-card,
  .mobile-message-recipient .select{
    background:#fff !important;
    border-color:#dde7ee !important;
    box-shadow:0 5px 15px rgba(32,78,118,.055) !important;
  }

  .mobile-message-recipient .select,
  .mobile-content .select,
  .mobile-content .input,
  .mobile-content .textarea,
  .mobile-content input{
    color:#293b49 !important;
    background:#fff !important;
    border-color:#dde7ee !important;
  }

  .mobile-content .chat-scroll{
    background:#fbfdff !important;
  }
  .mobile-content .chat-header,
  .mobile-content .chat-composer{
    background:#fff !important;
    border-color:#dde7ee !important;
  }

  .bottom-nav-btn.active{
    color:#1d568e !important;
  }
  .bottom-nav-btn.active .bottom-nav-icon{
    background:#e6f2fc !important;
  }

  .btn.primary{
    background:linear-gradient(135deg,#2b6ba4,#1d568e) !important;
  }
}


/* KINDAY v13.9 — splash wejściowy: tylko branding, bez zmiany logiki aplikacji */
.kinday-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(83, 168, 255, .16), transparent 30%),
    radial-gradient(circle at 78% 22%, rgba(255, 193, 68, .12), transparent 24%),
    radial-gradient(circle at 18% 78%, rgba(91, 194, 126, .12), transparent 26%),
    linear-gradient(135deg, #f7fbff 0%, #fffaf4 52%, #f7fff9 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity .24s ease, visibility .24s ease;
  overflow: hidden;
}
.kinday-splash::before {
  content: '';
  position: absolute;
  width: min(54vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(39, 76, 119, .07);
  box-shadow: 0 0 70px rgba(77, 154, 224, .08) inset;
}
.kinday-splash-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(230px, 30vw, 430px);
  max-width: 76vw;
  height: auto;
  animation: kinday-logo-pulse .92s ease-in-out infinite;
  filter: drop-shadow(0 14px 28px rgba(27, 72, 120, .10));
  transform-origin: center;
}
.kinday-splash.is-leaving {
  opacity: 0;
  visibility: hidden;
}
@keyframes kinday-logo-pulse {
  0%, 100% { transform: scale(.985); opacity: .94; }
  50% { transform: scale(1.035); opacity: 1; }
}
@media (max-width: 720px) {
  .kinday-splash::before { width: min(88vw, 420px); }
  .kinday-splash-logo { width: min(72vw, 300px); max-width: 300px; }
}

/* KINDAY v13.9 — naturalniejszy język wizualny; funkcje bez zmian */
.preschool-brand-sub,.demo-login-brand-sub,.demo-login-eyebrow,.parent-welcome-eyebrow{display:none!important}
.preschool-brand{padding-bottom:18px!important}

.parent-welcome-shell{
  position:relative;background:
    radial-gradient(circle at 14% 18%,rgba(85,170,239,.18),transparent 24%),
    radial-gradient(circle at 88% 18%,rgba(105,194,148,.15),transparent 24%),
    radial-gradient(circle at 82% 84%,rgba(255,192,70,.14),transparent 22%),
    linear-gradient(135deg,#f8fcff,#fffaf5 58%,#f7fff9);
  overflow:hidden;
}
.parent-welcome-shell::before,.parent-welcome-shell::after{content:"";position:absolute;border-radius:46% 54% 57% 43% / 49% 42% 58% 51%;pointer-events:none}
.parent-welcome-shell::before{width:220px;height:220px;left:-95px;bottom:8%;background:rgba(83,166,235,.09);transform:rotate(17deg)}
.parent-welcome-shell::after{width:190px;height:190px;right:-75px;top:10%;background:rgba(255,192,72,.08);transform:rotate(-15deg)}
.parent-welcome-main{overflow:hidden!important;padding:20px 18px 10px!important;position:relative;z-index:1}
.parent-welcome-card{background:rgba(255,255,255,.84)!important;backdrop-filter:blur(14px);border:1px solid rgba(28,86,142,.08)!important;box-shadow:0 24px 70px rgba(30,72,112,.08)!important;padding:28px 32px!important}
.parent-welcome-brand{justify-content:center!important;align-items:center!important;margin-bottom:16px!important}
.parent-welcome-brand>span{display:none!important}
.kinday-welcome-logo{width:min(300px,56vw)!important;height:auto!important;max-height:none!important;object-fit:contain!important}
.parent-welcome-copy{text-align:center!important;max-width:720px!important;margin-inline:auto}
.parent-welcome-copy h1{font-size:clamp(32px,4.1vw,46px)!important;margin-bottom:9px!important}
.parent-welcome-copy p{max-width:600px!important;margin-inline:auto!important;font-size:14px!important;line-height:1.45!important}
.parent-welcome-features{margin-top:20px!important;gap:10px!important}
.parent-welcome-feature{position:relative;display:grid!important;justify-items:center!important;text-align:center!important;gap:7px!important;border:0!important;padding:14px 12px!important;min-height:92px;background:#fff!important;box-shadow:0 10px 25px rgba(28,76,118,.055)!important}
.parent-welcome-feature:nth-child(1){background:#fff1ef!important}.parent-welcome-feature:nth-child(2){background:#eef7ff!important}.parent-welcome-feature:nth-child(3){background:#eefaf8!important}.parent-welcome-feature:nth-child(4){background:#fff7e6!important}.parent-welcome-feature:nth-child(5){background:#f1f9ef!important}.parent-welcome-feature:nth-child(6){background:#f0f5ff!important}
.parent-welcome-feature .list-icon{margin:0!important}
.parent-welcome-feature strong{font-size:12px!important}.parent-welcome-feature span:not(.list-icon){font-size:9.5px!important;margin-top:0!important;line-height:1.3!important}
.parent-welcome-note{justify-content:center!important;width:max-content;max-width:100%;margin:15px auto 0!important;background:rgba(230,241,250,.82)!important}
.parent-welcome-footer{position:relative;z-index:2}

.demo-login-hero{position:relative;overflow:hidden}
.demo-login-brand{align-items:center!important;text-align:center!important}
.demo-login-copy{max-width:390px!important;text-align:center!important;margin-inline:auto!important}
.demo-login-copy h1{letter-spacing:-.04em!important}
.demo-login-copy p{max-width:360px!important;margin-inline:auto!important}
.demo-login-notice{justify-content:center!important}
.demo-login-panel-head h2{font-size:clamp(22px,2.1vw,30px)!important;letter-spacing:-.03em!important}

@media(max-width:720px){
  .parent-welcome-main{padding:10px 10px 6px!important}
  .parent-welcome-card{padding:14px 12px!important;border-radius:20px!important}
  .kinday-welcome-logo{width:min(210px,58vw)!important}
  .parent-welcome-brand{margin-bottom:9px!important}
  .parent-welcome-copy h1{font-size:25px!important;margin-bottom:5px!important}
  .parent-welcome-copy p{font-size:10.5px!important;line-height:1.35!important;max-width:330px!important}
  .parent-welcome-features{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin-top:10px!important}
  .parent-welcome-feature{min-height:67px;padding:8px 6px!important;gap:4px!important;border-radius:13px!important}
  .parent-welcome-feature .list-icon{width:28px!important;height:28px!important;flex-basis:28px!important}
  .parent-welcome-feature strong{font-size:10px!important}.parent-welcome-feature span:not(.list-icon){font-size:8px!important}
  .parent-welcome-note{font-size:8px!important;margin-top:8px!important;padding:7px 8px!important}
  .demo-login-copy{text-align:center!important}
}


/* KINDAY v13.9 — bez podpowiedzi i mikro-copy, funkcje bez zmian */
.role-parent .page-subtitle,.role-parent .card-subtitle{display:none!important}
.parent-welcome-feature>div>span,.demo-role-copy>p{display:none!important}
.demo-login-copy>p,.demo-scenario-start small{display:none!important}
.demo-role-card{grid-template-rows:auto auto!important;align-content:center!important}
.demo-role-copy{align-self:center!important}
.demo-role-copy h3{margin-bottom:0!important}
.parent-welcome-copy p{display:none!important}
.parent-welcome-feature{align-items:center!important}


/* KINDAY v14.0 — Parent mobile dashboard: quick/full persistent mode */
@media (max-width:820px){
  .parent-dashboard-mode{display:flex;align-items:center;gap:20px;height:34px;border-bottom:1px solid var(--line);margin:0 0 10px;padding:0 2px;flex:0 0 auto;}
  .parent-dashboard-mode button{appearance:none;border:0;background:transparent;padding:0 0 8px;color:var(--muted);font:800 11px/1 Inter,ui-sans-serif,system-ui;position:relative;}
  .parent-dashboard-mode button.active{color:var(--primary);}
  .parent-dashboard-mode button.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--primary);}
  .parent-mobile-quick{height:100%;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:10px;overflow:hidden;}
  .parent-quick-child{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 0;}
  .parent-quick-child>div{display:flex;align-items:baseline;gap:7px;min-width:0;}
  .parent-quick-child strong{font-size:17px;color:var(--primary);white-space:nowrap;}
  .parent-quick-child span:not(.badge){font-size:10px;color:var(--muted);}
  .parent-quick-grid{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px;}
  .parent-quick-card{position:relative;min-width:0;border:1px solid var(--line);border-radius:18px;background:#fff;padding:14px;text-align:left;color:var(--primary);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:7px;overflow:hidden;}
  button.parent-quick-card{width:100%;font:inherit;cursor:pointer;}
  .parent-quick-card::after{content:"";position:absolute;width:72px;height:72px;border-radius:50%;right:-25px;bottom:-26px;opacity:.16;background:currentColor;pointer-events:none;}
  .parent-quick-card.coral{color:#c95f59;background:linear-gradient(145deg,#fff 5%,#fff5f3 100%);}
  .parent-quick-card.teal{color:#2c8e8a;background:linear-gradient(145deg,#fff 5%,#eefaf9 100%);}
  .parent-quick-card.amber{color:#b47b19;background:linear-gradient(145deg,#fff 5%,#fff8e9 100%);}
  .parent-quick-card.green{color:#4c8a5d;background:linear-gradient(145deg,#fff 5%,#f0f9f2 100%);}
  .parent-quick-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.8);box-shadow:inset 0 0 0 1px rgba(39,76,119,.06);}
  .parent-quick-card strong{font-size:15px;line-height:1.15;color:var(--primary);}
  .parent-quick-card>span:last-of-type{font-size:10px;line-height:1.35;color:var(--muted);max-width:95%;}
  .parent-quick-time-card{padding-bottom:11px;}
  .parent-quick-time-action{margin-top:auto;width:100%;min-height:36px;border:0;border-radius:11px;background:var(--primary);color:white;font-weight:850;font-size:10px;padding:8px 10px;position:relative;z-index:2;}
  .parent-quick-details{border:0;background:transparent;color:var(--primary);font-size:9px;font-weight:800;padding:0;position:relative;z-index:2;}
  .mobile-layout.route-dashboard.dashboard-mode-quick .mobile-content{overflow:hidden!important;}
  .mobile-layout.route-dashboard.dashboard-mode-full .mobile-content{overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch;}
  .mobile-layout.route-dashboard.dashboard-mode-full .mobile-content>.page{height:auto!important;min-height:100%;overflow:visible!important;}
}
@media (max-width:380px),(max-height:700px) and (max-width:820px){
  .parent-quick-grid{gap:8px;}
  .parent-quick-card{padding:11px;border-radius:15px;gap:5px;}
  .parent-quick-icon{width:34px;height:34px;border-radius:10px;}
  .parent-quick-card strong{font-size:13px;}
  .parent-quick-card>span:last-of-type{font-size:9px;}
  .parent-quick-time-action{min-height:32px;padding:6px 8px;}
}


/* =========================================================
   KINDAY v14.8 — spójność stopki + czystszy pulpit rodzica
   ========================================================= */
@media (min-width:821px){
  .parent-dashboard-toolbar{
    display:flex;align-items:center;justify-content:flex-end;
    min-height:44px;margin:0 0 12px;
  }
  .parent-dashboard-toolbar .btn{min-height:42px}
  .parent-dashboard-top{margin-top:0}

  .sidebar-legal{
    margin-top:10px;padding:10px 7px 0;border-top:1px solid rgba(39,76,119,.08);
    display:grid;gap:5px;color:#7b8993;font-size:8px;line-height:1.3;
  }
  .sidebar-legal>div{display:flex;flex-wrap:wrap;gap:5px 8px;align-items:center}
  .sidebar-legal a{color:#60798d;text-decoration:none;font-weight:720}
  .sidebar-legal a:hover{color:var(--primary);text-decoration:underline}
}

.parent-welcome-footer{padding:10px 18px max(10px,env(safe-area-inset-bottom))!important}
.parent-welcome-footer-inner{width:min(930px,100%);display:grid;gap:7px}
.parent-welcome-enter{width:100%!important}
.parent-welcome-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#778894;font-size:8px;line-height:1.25;padding:0 2px}
.parent-welcome-meta>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.parent-welcome-meta a{color:#60798d;text-decoration:none;font-weight:720}
.parent-welcome-meta a:hover{color:var(--primary);text-decoration:underline}

@media(max-width:820px){
  .parent-welcome-footer{padding:7px 10px max(7px,env(safe-area-inset-bottom))!important}
  .parent-welcome-footer-inner{gap:5px}
  .parent-welcome-enter{min-height:42px!important}
  .parent-welcome-meta{font-size:6.8px;gap:7px}
  .parent-welcome-meta>div{gap:4px 6px}
  .parent-welcome-meta>div:first-child span:nth-child(2){display:none}
}

/* =========================================================
   KINDAY v14.12 — DESIGN SYSTEM v1
   Profesjonalny SaaS + edukacyjna miękkość. CSS-only.
   ========================================================= */
:root{
  --bg:#f6fafd;
  --surface:#ffffff;
  --surface-warm:#fffaf1;
  --surface-neutral:#f5f8fa;
  --primary:#174f89;
  --primary-2:#2f6fa9;
  --primary-soft:#edf5fb;
  --green:#63a978;
  --green-soft:#edf8f0;
  --coral:#dc776d;
  --coral-soft:#fff1ef;
  --amber:#dea73e;
  --amber-soft:#fff7e6;
  --teal:#4f9a94;
  --teal-soft:#edf8f7;
  --family:#6fa6d2;
  --family-soft:#eef6fc;
  --text:#253846;
  --muted:#6c7d8b;
  --line:#dce6ed;
  --shadow:0 2px 6px rgba(23,79,137,.05);
  --shadow-sm:0 1px 4px rgba(23,79,137,.045);
  --radius:12px;
  --radius-sm:9px;
  --kinday-card-radius:12px;
  --kinday-control-radius:9px;
  --kinday-icon-radius:8px;
  --kinday-badge-radius:5px;
}

/* surfaces */
.card,
.parent-welcome-card,
.parent-rcp-card,
.parent-stay-card,
.parent-summary-card,
.parent-quick-card,
.parent-app-tile,
.parent-mobile-hero,
.parent-mobile-feed,
.mobile-profile-card,
.mobile-chat-card,
.account-manager-card,
.demo-role-card,
.import-format-card,
.offer-card,
.access-device-card,
.group-card,
.child-card,
.event-card{
  border-radius:var(--kinday-card-radius)!important;
  box-shadow:var(--shadow-sm)!important;
  border-color:var(--line)!important;
}
.card{background:#fff!important;border:1px solid var(--line)!important}

/* cards use small functional accents instead of decorative blobs */
.metric-card::after,
.parent-quick-card::after{display:none!important}
.metric-card,
.parent-quick-card,
.parent-summary-card,
.parent-stay-card,
.parent-rcp-card,
.parent-app-tile,
.quick-action,
.list-row,
.demo-role-card,
.offer-card,
.import-format-card,
.access-device-card,
.account-manager-card{
  border-left:3px solid var(--primary-2)!important;
}
.metric-card.green,.parent-quick-card.green,.parent-summary-card.green{border-left-color:var(--green)!important}
.metric-card.coral,.parent-quick-card.coral{border-left-color:var(--coral)!important}
.metric-card.amber,.parent-quick-card.amber,.parent-summary-card.amber{border-left-color:var(--amber)!important}
.metric-card.teal,.parent-quick-card.teal,.parent-summary-card.teal{border-left-color:var(--teal)!important}
.metric-card.blue,.parent-quick-card.blue{border-left-color:var(--primary-2)!important}
.demo-role-card.blue{border-left-color:var(--primary-2)!important}
.demo-role-card.green{border-left-color:var(--green)!important}
.demo-role-card.teal{border-left-color:var(--teal)!important}
.demo-role-card.amber{border-left-color:var(--amber)!important}
.demo-role-card.coral{border-left-color:var(--coral)!important}

/* pastel is now an accent, not the whole card */
.metric-card.green,.metric-card.coral,.metric-card.amber,.metric-card.teal,.metric-card.blue,
.parent-summary-card.green,.parent-summary-card.amber,.parent-summary-card.teal,
.parent-quick-card.blue,.parent-quick-card.teal,.parent-quick-card.amber,.parent-quick-card.green,
.account-manager-card,.parent-rcp-card{
  background:#fff!important;
}

/* statuses and filters: compact rectangles, no AI-style capsules */
.badge,
.feedback-meta span,
.feedback-meta time{
  border-radius:var(--kinday-badge-radius)!important;
  padding:4px 7px!important;
  font-size:9px!important;
  letter-spacing:.01em;
}
.chip{
  border-radius:8px!important;
  min-height:32px!important;
  padding:6px 10px!important;
}
.notice{border-radius:9px!important;border-left:3px solid currentColor!important}

/* controls */
.btn{
  border-radius:var(--kinday-control-radius)!important;
  min-height:40px;
  box-shadow:none!important;
}
.btn:hover{box-shadow:none!important;filter:brightness(.985)}
.btn.small{border-radius:8px!important;min-height:32px!important}
.icon-btn,.close-btn{border-radius:9px!important;box-shadow:none!important}
.search-box input,.input,.select,.textarea,.chat-composer input{border-radius:8px!important}
.status-btn{border-radius:8px!important}
.toggle{border-radius:8px!important;height:24px}
.toggle span{border-radius:6px!important;box-shadow:none!important}
.sidebar-session-btn{border-radius:8px!important}

/* fixed geometry for icons */
.list-icon,
.quick-action .qa-icon,
.parent-quick-icon,
.parent-app-tile>span,
.demo-role-icon,
.import-format-icon,
.offer-card .offer-icon,
.access-device-icon{
  border-radius:var(--kinday-icon-radius)!important;
  box-shadow:none!important;
}
.list-icon,.quick-action .qa-icon,.parent-quick-icon{width:36px!important;height:36px!important}
.demo-role-icon{width:40px!important;height:40px!important}

/* flat lists and actions */
.list-row{
  border-radius:10px!important;
  box-shadow:none!important;
  background:#fff!important;
}
.list-row.clickable:hover{background:#f8fbfd!important}
.quick-action{
  border-radius:10px!important;
  box-shadow:none!important;
  background:#fff!important;
}
.quick-action:hover{background:#f8fbfd!important}
.table-wrap{border-radius:10px!important;box-shadow:none!important}
.conversation-item{border-radius:8px!important}
.bubble{border-radius:10px!important}
.event-date{border-radius:8px!important}
.month-cell{border-radius:8px!important}
.menu-day-head{border-radius:9px 9px 0 0!important}

/* navigation: precise, quiet geometry */
.side-nav-btn{border-radius:8px!important}
.side-nav-btn.active{box-shadow:inset 3px 0 0 var(--primary)!important;background:#edf5fb!important}
.sidebar{background:#fff!important}
.topbar{background:rgba(246,250,253,.96)!important}

/* role picker: more product, less template */
.demo-login-hero{
  background:linear-gradient(160deg,#153f6b 0%,#174f89 72%,#245f94 100%)!important;
}
.demo-login-logo-wrap{border-radius:12px!important;box-shadow:0 4px 14px rgba(0,0,0,.12)!important}
.demo-login-notice{border-radius:8px!important;background:rgba(255,255,255,.07)!important}
.demo-role-card{padding:16px!important;box-shadow:none!important;min-height:0!important}
.demo-role-copy h3{font-size:17px!important}
.demo-role-copy p{display:block!important;margin:5px 0 0!important;color:var(--muted)!important;font-size:10.5px!important;line-height:1.42!important}
.demo-scenario-start{border-radius:10px!important;box-shadow:none!important}

/* parent / mobile app */
.parent-mobile-hero,.parent-mobile-feed{box-shadow:none!important}
.parent-app-tile{box-shadow:none!important;background:#fff!important}
.parent-app-tile.coral{border-left-color:var(--coral)!important}
.parent-app-tile.teal{border-left-color:var(--teal)!important}
.parent-app-tile.amber{border-left-color:var(--amber)!important}
.parent-app-tile.blue{border-left-color:var(--primary-2)!important}
.parent-mobile-time{border-radius:9px!important;background:#fff!important;border:1px solid var(--line)!important;border-left:3px solid var(--green)!important}
.parent-mobile-alert{border-radius:8px!important}
.parent-mobile-feed-row .list-icon{border-radius:7px!important}
.mobile-more-btn{border-radius:10px!important;box-shadow:none!important}
.mobile-profile-card{box-shadow:none!important}
.bottom-nav-btn{border-radius:8px!important}

/* overlays are the only elements allowed to feel elevated */
.modal{border-radius:14px!important;box-shadow:0 22px 60px rgba(18,52,82,.18)!important;border:1px solid var(--line)}
.drawer{box-shadow:-18px 0 48px rgba(18,52,82,.16)!important}

/* welcome */
.parent-welcome-card{border-radius:14px!important;box-shadow:var(--shadow)!important}
.parent-welcome-feature{border-radius:10px!important;box-shadow:none!important}
.parent-welcome-note{border-radius:8px!important}

/* desktop density */
@media(min-width:821px){
  .page{padding-top:22px!important;padding-bottom:28px!important}
  .page-header{margin-bottom:16px!important}
  .section{margin-top:16px!important}
  .grid{gap:12px!important}
  .layout-main-aside{gap:14px!important}
  .card-pad{padding:16px!important}
  .metric-card{padding:16px!important;min-height:108px!important}
}

@media(max-width:820px){
  .card,.parent-rcp-card,.parent-stay-card,.parent-summary-card,.parent-quick-card,.parent-app-tile,.parent-mobile-hero,.parent-mobile-feed,.mobile-profile-card,.mobile-chat-card{border-radius:10px!important}
  .btn{border-radius:8px!important}
  .badge{border-radius:5px!important}
  .parent-app-tile{padding:9px!important}
  .parent-app-tile>span{width:32px!important;height:32px!important;border-radius:7px!important}
  .parent-mobile-feed{border-radius:10px!important}
  .demo-role-card{border-radius:10px!important}
}

/* =========================================================
   KINDAY v14.13 — MOBILE QUICK COLOR RESTORE
   Na szybkim mobile wracają pastelowe tła funkcjonalne.
   Geometria Design System v1 zostaje bez zmian.
   ========================================================= */
@media(max-width:820px){
  .metric-card.green{background:linear-gradient(145deg,#fff 4%,var(--green-soft) 100%)!important;}
  .metric-card.coral{background:linear-gradient(145deg,#fff 4%,var(--coral-soft) 100%)!important;}
  .metric-card.amber{background:linear-gradient(145deg,#fff 4%,var(--amber-soft) 100%)!important;}
  .metric-card.teal{background:linear-gradient(145deg,#fff 4%,var(--teal-soft) 100%)!important;}
  .metric-card.blue{background:linear-gradient(145deg,#fff 4%,var(--primary-soft) 100%)!important;}

  .parent-summary-card.green{background:linear-gradient(145deg,#fff 5%,var(--green-soft) 100%)!important;}
  .parent-summary-card.amber{background:linear-gradient(145deg,#fff 5%,var(--amber-soft) 100%)!important;}
  .parent-summary-card.teal{background:linear-gradient(145deg,#fff 5%,var(--teal-soft) 100%)!important;}

  .parent-quick-card.coral{background:linear-gradient(145deg,#fff 5%,#fff3f1 100%)!important;}
  .parent-quick-card.teal{background:linear-gradient(145deg,#fff 5%,#eefaf9 100%)!important;}
  .parent-quick-card.amber{background:linear-gradient(145deg,#fff 5%,#fff8e9 100%)!important;}
  .parent-quick-card.green{background:linear-gradient(145deg,#fff 5%,#f0f9f2 100%)!important;}

  .parent-app-tile.coral{background:var(--coral-soft)!important;}
  .parent-app-tile.teal{background:var(--teal-soft)!important;}
  .parent-app-tile.amber{background:var(--amber-soft)!important;}
  .parent-app-tile.blue{background:var(--primary-soft)!important;}

  .parent-mobile-time{background:linear-gradient(145deg,#fff 6%,var(--green-soft) 100%)!important;}
}


/* KINDAY v14.22 — functional parent calendar */
.parent-calendar-card{max-width:760px;margin:0 auto}
.parent-calendar-head{display:grid;grid-template-columns:38px 1fr 38px;gap:10px;align-items:center;margin-bottom:12px}
.parent-calendar-head .card-title{text-align:center;margin:0}
.calendar-prev-icon{display:inline-flex;transform:rotate(180deg)}
.calendar-weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:850;text-align:center}
.parent-month-grid{margin-top:0!important}
.parent-month-grid .month-cell{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;appearance:none;width:100%;color:var(--text);cursor:pointer;text-align:left}
.parent-month-grid .month-cell:hover{border-color:rgba(39,111,170,.35);background:var(--primary-soft)}
.parent-month-grid .month-cell.is-empty{visibility:hidden;pointer-events:none}
.parent-month-grid .month-cell.has-event{border-color:rgba(79,154,148,.45);background:var(--teal-soft)}
.parent-month-grid .month-cell.has-absence{border-color:rgba(217,108,99,.52);background:var(--coral-soft)}
.calendar-day-dots{display:flex;gap:3px;min-height:6px;align-items:center}
.calendar-dot{display:inline-block;width:6px;height:6px;border-radius:50%;flex:0 0 auto}
.calendar-dot.event{background:var(--teal)}
.calendar-dot.absence{background:var(--coral)}
.calendar-legend{display:flex;gap:14px;align-items:center;margin-top:12px;color:var(--muted);font-size:9px;font-weight:750}
.calendar-legend span{display:inline-flex;align-items:center;gap:6px}
.calendar-day-list{display:flex;flex-direction:column;gap:9px}
.calendar-day-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:10px;background:#fff}
.calendar-day-item .btn{white-space:nowrap}
.calendar-drawer-handle{display:none}

@media(max-width:820px){
  .parent-calendar-page .page-header{margin-bottom:10px}
  .parent-calendar-page .page-subtitle{font-size:10px}
  .parent-calendar-card{padding:12px 10px}
  .parent-calendar-head{grid-template-columns:34px 1fr 34px;margin-bottom:10px}
  .parent-calendar-head .card-title{font-size:16px}
  .calendar-weekdays{gap:4px;font-size:8px}
  .parent-month-grid{gap:4px}
  .parent-month-grid .month-cell{min-height:46px;padding:5px;border-radius:8px!important;font-size:9px}
  .calendar-dot{width:5px;height:5px}
  .calendar-legend{margin-top:9px;font-size:8px;gap:12px}
  .drawer.calendar-day-drawer{top:auto;right:0;bottom:0;width:100%;height:auto;max-height:72dvh;padding:10px 12px calc(14px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0;box-shadow:0 -18px 44px rgba(18,52,82,.18)!important}
  .calendar-day-drawer .drawer-head{margin-bottom:12px;padding-top:4px}
  .calendar-day-drawer .modal-title{font-size:17px}
  .calendar-day-drawer .modal-subtitle{font-size:9px}
  .calendar-drawer-handle{display:block;width:42px;height:4px;border-radius:999px;background:#d9e1e7;margin:0 auto 10px}
  .calendar-day-item{grid-template-columns:auto minmax(0,1fr);padding:10px 9px;gap:9px}
  .calendar-day-item .btn{grid-column:2;justify-self:start;min-height:30px}
}


/* KINDAY v14.23 — parent calendar desktop composition */
@media(min-width:821px){
  .parent-calendar-page{max-width:1280px!important;}
  .parent-calendar-page .page-header{margin-bottom:18px;}
  .parent-calendar-desktop-layout{
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(340px,.72fr);
    gap:18px;
    align-items:start;
    width:100%;
    margin:0 auto;
  }
  .parent-calendar-card{max-width:none;margin:0;padding:20px;}
  .parent-calendar-head{grid-template-columns:40px 1fr 40px;margin-bottom:16px;}
  .parent-calendar-head .card-title{font-size:20px;}
  .calendar-weekdays{font-size:10px;gap:7px;margin-bottom:7px;}
  .parent-month-grid{gap:7px;}
  .parent-month-grid .month-cell{
    min-height:82px;
    padding:9px 10px;
    border-radius:10px!important;
    font-size:11px;
  }
  .calendar-day-dots{min-height:8px;}
  .calendar-dot{width:6px;height:6px;}
  .calendar-legend{margin-top:14px;font-size:10px;gap:16px;}
  .parent-calendar-upcoming{margin:0;padding:18px;position:sticky;top:84px;}
  .parent-calendar-upcoming .section-head{margin-bottom:12px;}
  .parent-calendar-upcoming .card-title{font-size:18px;}
  .parent-calendar-upcoming .event-list{gap:9px;}
  .parent-calendar-upcoming .event-card{
    grid-template-columns:48px minmax(0,1fr);
    gap:10px;
    padding:10px;
    align-items:center;
  }
  .parent-calendar-upcoming .event-date{width:48px;height:48px;}
  .parent-calendar-upcoming .event-title{font-size:12px;}
  .parent-calendar-upcoming .event-meta{font-size:9px;line-height:1.35;}
  .parent-calendar-upcoming .event-card>.btn{grid-column:2;justify-self:start;margin-top:2px;min-height:28px;padding:0 10px;font-size:9px;}
}
@media(min-width:821px) and (max-width:1180px){
  .parent-calendar-desktop-layout{grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:14px;}
  .parent-month-grid .month-cell{min-height:70px;padding:7px 8px;}
  .parent-calendar-upcoming{padding:14px;}
}
@media(max-width:820px){
  .parent-calendar-desktop-layout{display:block;}
}


/* KINDAY v14.24 — tylko Rodzic / mobile: czytelność, pulpit, wydarzenia pod kalendarzem. */
@media (max-width:820px){
  /* Szybki pulpit: wszystkie cztery kafle pozostają widoczne bez przewijania. */
  .parent-mobile-quick .parent-quick-grid{grid-template-rows:minmax(0,.92fr) minmax(0,1.08fr);gap:9px;}
  .parent-mobile-quick .parent-quick-card:not(.parent-quick-time-card){
    justify-content:center;
    gap:9px;
    padding:13px;
  }
  .parent-mobile-quick .parent-quick-card strong{font-size:clamp(12.5px,3.65vw,15px);line-height:1.18;}
  .parent-mobile-quick .parent-quick-card>span:last-of-type{
    font-size:clamp(10px,2.7vw,11.5px);
    line-height:1.4;
    max-width:100%;
    overflow-wrap:anywhere;
  }
  .parent-mobile-quick .parent-quick-icon{flex:none;}
  .parent-mobile-quick .parent-quick-time-card{gap:8px;padding:13px;}
  .parent-mobile-quick .parent-quick-time-action{min-height:40px;font-size:11px;font-weight:800;}
  .parent-mobile-quick .parent-quick-details{min-height:26px;font-size:10px;text-align:left;}
  /* Pełny pulpit: napisy pomocnicze nie są mikroskopijne. */
  .parent-mobile-home .parent-mobile-status span:not(.badge){font-size:10px;}
  .parent-mobile-home .parent-mobile-time small{font-size:9.5px;}
  .parent-mobile-home .parent-app-tile strong{font-size:12px;line-height:1.18;}
  .parent-mobile-home .parent-app-tile small{font-size:9.5px;line-height:1.27;}
  .parent-mobile-home .parent-mobile-feed-title strong{font-size:12px;}
  .parent-mobile-home .parent-mobile-feed-title button{font-size:10px;}
  .parent-mobile-home .parent-mobile-feed-row .list-title{font-size:11px;line-height:1.2;}
  .parent-mobile-home .parent-mobile-feed-row .list-sub{font-size:9.5px;line-height:1.2;}
  .mobile-layout .bottom-nav-btn{font-size:10px;}
  /* Mobilny kalendarz: lista otwierająca działające szczegóły wydarzeń. */
  .parent-calendar-mobile-upcoming{margin-top:13px;padding:0 2px 8px;display:grid;gap:7px;}
  .parent-calendar-mobile-upcoming h3{margin:0 0 2px;font-size:14px;line-height:1.3;color:var(--primary);font-weight:800;}
  .parent-calendar-mobile-event{
    display:grid;grid-template-columns:42px minmax(0,1fr) 12px;gap:11px;align-items:center;
    width:100%;min-height:62px;padding:8px 10px;border:1px solid var(--line);
    background:#fff;border-radius:10px;color:var(--text);text-align:left;cursor:pointer;
  }
  .parent-calendar-mobile-event:focus-visible{outline:2px solid var(--primary);outline-offset:2px;}
  .parent-calendar-mobile-event-date{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    width:42px;min-height:42px;border-radius:8px;background:var(--primary-soft);color:var(--primary);
  }
  .parent-calendar-mobile-event-date strong{font-size:16px;line-height:1.1;}
  .parent-calendar-mobile-event-date small{font-size:9px;font-weight:800;}
  .parent-calendar-mobile-event-text{display:grid;gap:3px;min-width:0;}
  .parent-calendar-mobile-event-text strong{font-size:11px;line-height:1.3;overflow-wrap:anywhere;}
  .parent-calendar-mobile-event-text small{font-size:10px;line-height:1.25;color:var(--muted);}
  .parent-calendar-empty{margin:0;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--muted);font-size:11px;line-height:1.45;}
}
@media (max-width:380px),(max-height:700px) and (max-width:820px){
  .parent-mobile-quick .parent-quick-grid{gap:7px;}
  .parent-mobile-quick .parent-quick-card:not(.parent-quick-time-card){padding:10px;gap:6px;}
  .parent-mobile-quick .parent-quick-time-card{padding:10px;gap:5px;}
  .parent-mobile-quick .parent-quick-time-action{min-height:35px;}
  .parent-mobile-quick .parent-quick-details{min-height:23px;}
  .parent-mobile-home .parent-app-tile small{font-size:9px;}
  .parent-mobile-home .parent-mobile-feed-row .list-sub{font-size:9px;}
}

/* Bardzo małe telefony: dolna nawigacja bez nachodzenia etykiet. */
@media (max-width:350px){
  .mobile-layout .bottom-nav-btn{font-size:8.5px;letter-spacing:-.1px;white-space:nowrap;gap:2px;}
}

/* KINDAY v14.25 — mobile-first parent UI: clear labels, attendance entry, prominent time control. */
.parent-time-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;}
.parent-time-header>div{min-width:0;}
.parent-time-header h1{margin:0;color:var(--primary);font-size:clamp(19px,2vw,24px);line-height:1.2;letter-spacing:-.35px;}
.parent-time-header p{margin:5px 0 0;color:var(--muted);font-size:11px;}
.parent-profile-link{flex:none;white-space:nowrap;}
@media(max-width:820px){
  .mobile-layout.route-time .parent-time-page{padding-top:10px;}
  .parent-time-header{gap:7px;margin-bottom:11px;}
  .parent-time-header h1{font-size:clamp(16px,4.25vw,20px);letter-spacing:-.3px;}
  .parent-time-header p{font-size:9.5px;margin-top:3px;}
  .parent-profile-link.btn{min-height:34px!important;padding:6px 8px!important;font-size:9.5px!important;border-radius:9px!important;gap:4px;}
  .parent-profile-link svg{width:14px;height:14px;}
  .parent-time-page .parent-rcp-card{padding:13px!important;margin-bottom:8px!important;}
  .parent-time-page .parent-rcp-head{gap:10px;align-items:center;}
  .parent-time-page .parent-rcp-head h2{font-size:16px!important;margin:0 0 3px;}
  .parent-time-page .parent-rcp-head p{font-size:10px!important;line-height:1.3;margin:0!important;}
  .parent-time-page .parent-rcp-head .badge{white-space:nowrap;line-height:1.2;max-width:110px;text-align:center;}
  .parent-time-page .parent-rcp-controls{margin-top:10px!important;gap:8px!important;}
  .parent-time-page .parent-rcp-person>span{font-size:10px!important;}
  .parent-time-page .parent-rcp-person .select{height:43px!important;font-size:12px;}
  .parent-time-page .parent-rcp-actions{gap:7px!important;}
  .parent-time-page .parent-phone-btn{min-height:51px!important;font-size:13px!important;font-weight:850;touch-action:manipulation;}
  .parent-time-page .parent-missed-btn{min-height:31px!important;background:transparent!important;border:0!important;box-shadow:none!important;font-size:10px!important;color:var(--muted)!important;}
  .parent-time-page .parent-stay-card{padding:13px!important;}
  .parent-time-page .parent-stay-card .section-head{margin-bottom:7px;}
  .parent-time-page .parent-stay-card .card-title{font-size:15px!important;}
  .parent-time-page .parent-stay-timeline{gap:11px!important;margin-top:9px!important;}
  .parent-time-page .parent-stay-timeline strong{font-size:19px;}
  .parent-time-page .parent-stay-timeline small{font-size:9px!important;line-height:1.35;}
  /* Keep all four tiles on one phone screen. Labels stay at top. */
  .parent-mobile-quick .parent-quick-grid{grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;gap:8px;}
  .parent-mobile-quick .parent-quick-card:not(.parent-quick-time-card){justify-content:flex-start!important;align-items:flex-start;gap:7px!important;padding:13px!important;}
  .parent-mobile-quick .parent-quick-card:not(.parent-quick-time-card)>strong{font-size:clamp(12px,3.5vw,15px);}
  .parent-mobile-quick .parent-quick-desc{display:block;font-size:clamp(10px,2.7vw,11.5px)!important;line-height:1.35;overflow-wrap:anywhere;color:var(--muted);}
  .parent-mobile-quick .parent-quick-indicator{display:inline-flex;font-size:9px;font-weight:800;line-height:1.2;color:var(--primary);border:1px solid var(--line);background:rgba(255,255,255,.8);border-radius:7px;padding:4px 6px;max-width:100%;}
  .parent-mobile-quick .parent-quick-time-card{padding:12px!important;gap:5px!important;display:flex;}
  .parent-quick-time-heading{display:flex;align-items:center;gap:7px;min-width:0;}
  .parent-quick-time-heading .parent-quick-icon{width:30px!important;height:30px!important;}
  .parent-quick-time-heading strong{font-size:clamp(11px,3.2vw,14px);}
  .parent-quick-time-state{font-size:10px;color:#4c8a5d;font-weight:750;}
  .parent-quick-time-metric{min-height:0;display:flex;flex-direction:column;justify-content:center;gap:2px;margin:auto 0 4px;max-width:100%;}
  .parent-quick-time-metric strong{font-size:clamp(17px,4.9vw,26px)!important;line-height:1.05;white-space:nowrap;letter-spacing:-.7px;}
  .parent-quick-time-metric small{font-size:9px;color:var(--muted);line-height:1.2;}
  .parent-mobile-quick .parent-quick-time-action{margin-top:0;min-height:42px!important;border-radius:9px;font-size:clamp(9px,2.65vw,12px)!important;touch-action:manipulation;}
  .parent-mobile-quick .parent-quick-details{font-size:9px;min-height:18px!important;text-align:left;}
}
@media(max-width:380px),(max-height:700px) and (max-width:820px){
  .parent-mobile-quick .parent-quick-card:not(.parent-quick-time-card){padding:9px!important;gap:5px!important;}
  .parent-mobile-quick .parent-quick-time-card{padding:9px!important;gap:3px!important;}
  .parent-mobile-quick .parent-quick-time-metric strong{font-size:clamp(15px,4.7vw,19px)!important;}
  .parent-mobile-quick .parent-quick-time-action{min-height:35px!important;}
  .parent-mobile-quick .parent-quick-icon{width:31px!important;height:31px!important;}
  .parent-mobile-quick .parent-quick-details{min-height:15px!important;}
  .parent-time-header h1{font-size:16px;}
  .parent-profile-link.btn{font-size:9px!important;}
}

/* KINDAY v14.26 — single-action stay tile, no redundant details link. */
@media (max-width:820px) {
  .parent-mobile-quick .parent-quick-time-card {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:space-between!important;
    gap:0!important;
    padding:12px!important;
    overflow:hidden;
  }
  .parent-quick-time-heading {align-items:center;gap:7px;flex:0 0 auto;}
  .parent-quick-time-heading strong {color:var(--primary);font-size:clamp(11px,3.15vw,14px);}
  .parent-quick-time-heading .parent-quick-icon {width:29px!important;height:29px!important;flex:0 0 auto;}
  .parent-quick-time-heading svg {width:18px;height:18px;}
  .parent-quick-time-middle {
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    flex:1 1 auto;min-height:0;gap:3px;margin:3px 0 5px;
    text-align:center;border-radius:9px;
    background:radial-gradient(ellipse at center,rgba(255,255,255,.9) 0%,rgba(255,255,255,0) 72%);
  }
  .parent-quick-time-status {font-size:clamp(9px,2.6vw,11px);font-weight:800;line-height:1.25;color:#357349;}
  .parent-quick-time-clock {
    color:var(--primary);font-size:clamp(24px,7vw,34px)!important;
    line-height:1.08!important;letter-spacing:-1.3px;font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  .parent-quick-time-caption {font-size:clamp(9px,2.55vw,10.5px);line-height:1.2;color:var(--muted);}
  .parent-mobile-quick .parent-quick-time-action {
    flex:0 0 auto;margin-top:0!important;width:100%;min-height:43px!important;
    padding:9px 4px;border-radius:9px;
    font-size:clamp(10px,2.7vw,12px)!important;font-weight:850;
    touch-action:manipulation;cursor:pointer;
  }
  .parent-mobile-quick .parent-quick-time-action:focus-visible {outline:2px solid var(--primary);outline-offset:2px;}
}
@media (max-width:380px),(max-height:700px) and (max-width:820px) {
  .parent-mobile-quick .parent-quick-time-card {padding:9px!important;}
  .parent-quick-time-heading .parent-quick-icon {width:24px!important;height:24px!important;}
  .parent-quick-time-heading svg {width:16px;height:16px;}
  .parent-quick-time-middle {gap:1px;margin:2px 0 3px;}
  .parent-quick-time-clock {font-size:clamp(20px,6.4vw,26px)!important;}
  .parent-mobile-quick .parent-quick-time-action {min-height:35px!important;padding:7px 2px;}
}


/* v14.27 — mobile parent onboarding, isolated above existing UI */
.kinday-parent-tour { position:fixed; inset:0; z-index:30000; isolation:isolate; pointer-events:auto; font-family:inherit; }
.kinday-parent-tour.kinday-tour-intro { background:rgba(15,31,55,.66); }
.kinday-tour-spotlight { position:fixed; box-shadow:0 0 0 160vmax rgba(15,31,55,.69); border:2px solid rgba(255,255,255,.96); border-radius:13px; z-index:1; pointer-events:none; transition:top .22s ease,left .22s ease,width .22s ease,height .22s ease; }
.kinday-tour-panel { position:fixed; z-index:2; left:14px; right:14px; width:auto; box-sizing:border-box; overflow-y:auto; overscroll-behavior:contain; border:1px solid #dce8f3; border-radius:17px; padding:15px 16px 13px; background:#fff; box-shadow:0 14px 40px rgba(4,24,56,.25); color:#17395d; }
.kinday-tour-topline { display:flex; justify-content:space-between; gap:6px; align-items:center; }
.kinday-tour-label { color:#2e6da8; font-size:10px; font-weight:850; letter-spacing:.02em; }
.kinday-tour-skip { border:0; background:transparent; padding:5px; font-size:11px; color:#5b7088; font-weight:700; cursor:pointer; }
.kinday-tour-progress { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:7px 0 6px; color:#718399; font-size:10px; font-weight:700; }
.kinday-tour-dots { display:flex; gap:4px; }
.kinday-tour-dots i { width:13px; height:4px; border-radius:5px; background:#e5ebf2; display:block; }
.kinday-tour-dots i.on { background:#4b9fe3; }
.kinday-tour-panel h2 { margin:0 0 6px; color:#123d6b; font-size:clamp(17px,4.5vw,21px); line-height:1.22; letter-spacing:-.3px; }
.kinday-tour-panel p { margin:0; color:#53697e; font-size:clamp(11px,3.2vw,13px); line-height:1.45; }
.kinday-tour-actions { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-top:12px; }
.kinday-tour-prev { border:1px solid #d9e5f0; background:white; color:#35597a; padding:10px 13px; min-height:38px; border-radius:10px; font-size:11px; font-weight:800; cursor:pointer; }
.kinday-tour-next { background:#225f99; color:#fff; border:0; border-radius:10px; padding:10px 17px; min-height:40px; font-size:12px; font-weight:850; cursor:pointer; }
.kinday-parent-tour button:focus-visible { outline:2px solid #45a9f0; outline-offset:2px; }
@media (max-width:350px), (max-height:630px) { .kinday-tour-panel { left:9px; right:9px; padding:10px 12px; border-radius:13px; } .kinday-tour-panel p {font-size:10.5px;} .kinday-tour-actions {margin-top:8px;} .kinday-tour-next,.kinday-tour-prev {min-height:36px;padding:8px 11px;} .kinday-tour-topline,.kinday-tour-progress {margin-top:3px;} }
@media (prefers-reduced-motion:reduce){ .kinday-tour-spotlight { transition:none; } }

/* v14.28 — only mobile Parent interface: equal date inputs and tappable stay tile. */
.parent-absence-card #absence-form .parent-absence-dates {
  display:grid;grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;width:100%;min-width:0;
}
.parent-absence-card #absence-form .parent-absence-dates .field {min-width:0;width:100%;}
.parent-absence-card #absence-form .parent-absence-dates input[type="date"] {
  box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;
  height:46px;min-height:46px;padding:8px 9px;font:600 13px/1.25 Inter,system-ui,sans-serif;
  -webkit-appearance:none;appearance:none;
}
.parent-absence-card #absence-form .parent-absence-dates input[type="date"]::-webkit-calendar-picker-indicator {margin:0 0 0 3px;padding:0;flex-shrink:0;}
@media (max-width:820px) {
  .parent-quick-time-card { cursor:pointer; }
  .parent-quick-time-card:focus-visible {outline:2px solid #225f99;outline-offset:2px;}
}
@media (max-width:350px) {
  .parent-absence-card #absence-form .parent-absence-dates {grid-template-columns:minmax(0,1fr);gap:10px;}
  .parent-absence-card #absence-form .parent-absence-dates input[type="date"] {font-size:14px;}
}
