:root {
    --cream: #fff9ef;
    --paper: #ffffff;
    --paper-warm: #fff3e4;
    --coral: #ef765f;
    --coral-deep: #d95848;
    --coral-soft: #ffe0d6;
    --sun: #f6c955;
    --sun-soft: #fff1bd;
    --sage: #8cae8b;
    --sage-deep: #557b61;
    --sage-soft: #e2efe1;
    --ink: #4a342f;
    --ink-soft: #79645e;
    --line: #eadfd3;
    --danger: #bd3e3e;
    --danger-soft: #ffe1dd;
    --shadow: 0 18px 50px rgba(91, 60, 47, .09);
    --shadow-soft: 0 8px 24px rgba(91, 60, 47, .07);
    --radius: 24px;
    --radius-small: 16px;
    color-scheme: light;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--cream); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
h1 { font-size: clamp(1.65rem, 4vw, 2.55rem); line-height: 1.08; margin-bottom: .5rem; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.15; margin-bottom: .6rem; }
h3 { font-size: 1.12rem; line-height: 1.25; margin-bottom: .5rem; }
p { line-height: 1.65; }
small { color: var(--ink-soft); }

.eyebrow {
    margin-bottom: .45rem;
    color: var(--coral-deep);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.muted { color: var(--ink-soft); }
.script-switch {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 2px;
    border: 1px solid rgba(63, 51, 69, .16);
    border-radius: 999px;
    background: rgba(255, 250, 240, .7);
    box-shadow:
        0 4px 12px rgba(83, 62, 47, .08),
        inset 0 1px 0 rgba(255, 255, 255, .72);
}
.script-switch-auth {
    position: fixed;
    z-index: 80;
    top: 1rem;
    right: 1rem;
}
.script-switch button {
    min-width: 31px;
    min-height: 22px;
    padding: 3px 6px;
    border: 0;
    border-radius: 999px;
    color: rgba(63, 51, 69, .68);
    background: transparent;
    cursor: pointer;
    font-size: .61rem;
    font-weight: 900;
    letter-spacing: .015em;
    line-height: 1;
}
.script-switch button[aria-pressed="true"] {
    color: #a24a3a;
    background: rgba(239, 120, 95, .16);
    box-shadow: inset 0 0 0 1px rgba(217, 95, 73, .18);
}
.script-switch button:focus-visible {
    outline: 3px solid rgba(247, 201, 95, .62);
    outline-offset: 2px;
}
.brand { display: flex; align-items: center; gap: .75rem; }
.brand img { flex: 0 0 auto; filter: drop-shadow(0 6px 12px rgba(217, 88, 72, .18)); }
.brand span { display: grid; }
.brand strong { font-size: 1.25rem; letter-spacing: 0; }
.brand small { margin-top: .12rem; font-size: .72rem; }
.brand-large strong { font-size: 1.5rem; }
.product-brand { width: max-content; display: grid; justify-items: center; gap: .15rem; }
.product-brand .product-logo { width: 220px; max-width: 55vw; height: auto; filter: none; }
.product-brand-sidebar { width: 100%; }
.product-brand-sidebar .product-logo { width: 180px; max-width: 100%; }
.public-site-link {
    display: inline-flex;
    width: max-content;
    min-height: 38px;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    color: var(--coral-deep);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 900;
}
.public-site-link span { transition: transform .18s ease; }
.public-site-link:hover span { transform: translateX(3px); }
.auth-public-link {
    position: relative;
    z-index: 3;
    margin-top: 1rem;
    padding: .35rem .82rem;
    background: rgba(255,255,255,.62);
    box-shadow: var(--shadow-soft);
}
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr); }
.auth-story {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: 3.2rem clamp(2rem, 6vw, 6rem);
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(145deg, #fff0d6 0%, #ffe3cd 48%, #f9c9b9 100%);
}
.auth-story::before, .auth-story::after {
    position: absolute;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 50%;
    content: "";
}
.auth-story::before { width: 360px; height: 360px; right: -150px; top: -120px; }
.auth-story::after { width: 240px; height: 240px; left: -130px; top: 38%; }
.auth-shell-login .auth-story {
    background:
        radial-gradient(circle at 74% 22%, rgba(232, 244, 247, .9), transparent 24%),
        radial-gradient(circle at 24% 16%, rgba(255, 255, 255, .68), transparent 24%),
        linear-gradient(150deg, #fff2dc 0%, #fedfcd 52%, #f7c8ba 100%);
}
.auth-copy { position: relative; z-index: 2; max-width: 600px; margin: auto 0 22vh; }
.auth-copy > .product-brand { margin: 0 auto 1.5rem; }
.auth-copy h1 { max-width: 600px; font-size: clamp(2.5rem, 5vw, 5rem); }
.auth-copy > p:last-child { max-width: 570px; color: var(--ink-soft); font-size: 1.12rem; }
.auth-copy-login { width: 100%; max-width: none; margin-bottom: 18vh; }
.auth-copy-login > .auth-story-logo { margin: 0 auto 5.0rem; }
.auth-story-logo .product-logo { width: 440px; }
.auth-copy-login h1 {
    max-width: 650px;
    margin-bottom: 0;
    font-size: clamp(2.75rem, 3vw, 3.25rem);
    letter-spacing: -.045em;
    line-height: 1.01;
}
.auth-copy-login h1 span { display: block; white-space: nowrap; }
.auth-copy-login h1 span + span { margin-top: .12em; color: var(--coral-deep); }
.auth-copy-login > p:last-child {
    max-width: 545px;
    margin-top: 1.35rem;
    font-size: 1.05rem;
    line-height: 1.55;
}
.login-dashboard {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: none;
    pointer-events: none;
}
.login-dashboard-card {
    --card-rotation: 0deg;
    --card-scale: 1;
    --float-x: 10px;
    --float-y: 12px;
    --float-x-back: -6px;
    --float-y-return: 4px;
    --float-angle: .6deg;
    --float-angle-back: -.35deg;
    position: absolute;
    z-index: 4;
    display: flex;
    min-width: 190px;
    padding: 13px 15px;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(255, 255, 255, .84);
    border-radius: 18px;
    background: rgba(255, 255, 255, .86);
    box-shadow:
        0 20px 42px rgba(84, 59, 51, .15),
        inset 0 1px 0 #fff;
    backdrop-filter: blur(9px);
    animation: login-dashboard-float 9s ease-in-out infinite;
    pointer-events: none;
}
.login-dashboard-card > span:last-child { display: grid; }
.login-dashboard-card small {
    color: #8a6d64;
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}
.login-dashboard-card strong { margin-top: 3px; color: var(--ink); font-size: .83rem; line-height: 1.2; }
.login-dashboard-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    color: var(--coral-deep);
    background: var(--coral-soft);
}
.login-dashboard-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.login-dashboard-card-diary { --card-rotation: -2deg; --float-x: 12px; --float-y: 14px; animation-duration: 8.8s; }
.login-dashboard-card-messages { --card-rotation: 2deg; --float-x: -10px; --float-y: 12px; --float-x-back: 6px; animation-delay: -2.4s; animation-duration: 9.6s; }
.login-dashboard-card-messages .login-dashboard-icon { color: #2f7e92; background: #e8f4f7; }
.login-dashboard-card-finance { --card-rotation: -1deg; --float-x: 14px; --float-y: 10px; --float-x-back: -7px; animation-delay: -4.7s; animation-duration: 8.2s; }
.login-dashboard-card-finance .login-dashboard-icon { color: var(--sage-deep); background: var(--sage-soft); }
.login-dashboard-card-menu { --card-rotation: 1.5deg; --float-x: -13px; --float-y: 15px; --float-x-back: 6px; animation-delay: -6.1s; animation-duration: 10.4s; }
.login-dashboard-card-menu .login-dashboard-icon { color: #ad692e; background: #fff0d6; }
.login-dashboard-card-poll { --card-rotation: -.8deg; --float-x: 11px; --float-y: 13px; --float-x-back: -5px; animation-delay: -7.8s; animation-duration: 9.1s; }
.login-dashboard-card-poll .login-dashboard-icon { color: #6e6094; background: #eee9f8; }
@keyframes login-dashboard-float {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--card-rotation)) scale(var(--card-scale)); }
    35% { transform: translate3d(var(--float-x), calc(-1 * var(--float-y)), 0) rotate(calc(var(--card-rotation) + var(--float-angle))) scale(var(--card-scale)); }
    70% { transform: translate3d(var(--float-x-back), var(--float-y-return), 0) rotate(calc(var(--card-rotation) + var(--float-angle-back))) scale(var(--card-scale)); }
}
.sun-scene { position: absolute; right: 0; bottom: 0; left: 0; height: 34vh; overflow: hidden; }
.sun-face {
    position: absolute; z-index: 2; right: 18%; top: 5%; width: 128px; height: 128px;
    border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 18px rgba(246,201,85,.18);
}
.sun-face::before, .sun-face::after {
    position: absolute; top: 43px; width: 9px; height: 13px; border-radius: 50%; background: var(--ink); content: "";
}
.sun-face::before { left: 38px; }
.sun-face::after { right: 38px; }
.sun-face span {
    position: absolute; left: 46px; top: 73px; width: 38px; height: 19px;
    border-bottom: 5px solid var(--ink); border-radius: 0 0 50% 50%;
}
.hill { position: absolute; bottom: -34%; border-radius: 50% 50% 0 0; }
.hill-one { left: -8%; width: 72%; height: 65%; background: #9ab99a; transform: rotate(5deg); }
.hill-two { right: -12%; width: 70%; height: 72%; background: #73997c; transform: rotate(-6deg); }
.cloud { position: absolute; width: 105px; height: 30px; border-radius: 30px; background: rgba(255,255,255,.8); }
.cloud::before, .cloud::after { position: absolute; bottom: 0; border-radius: 50%; background: inherit; content: ""; }
.cloud::before { left: 20px; width: 42px; height: 42px; }
.cloud::after { right: 18px; width: 55px; height: 55px; }
.cloud-one { left: 16%; top: 10%; }
.cloud-two { left: 43%; top: 44%; transform: scale(.7); }
.auth-panel { display: grid; place-items: center; min-height: 100vh; padding: 3rem clamp(1.25rem, 5vw, 5rem); background: var(--cream); }
.auth-card { width: min(100%, 500px); }
.auth-card h2 { font-size: 2rem; }
.stack-form { display: grid; gap: 1rem; margin-top: 1.8rem; }
label { display: grid; gap: .45rem; color: var(--ink); font-size: .82rem; font-weight: 750; }
input, select, textarea {
    width: 100%; min-height: 48px; padding: .78rem .92rem;
    border: 1px solid var(--line); border-radius: 13px; outline: 0;
    color: var(--ink); background: #fffdf9; transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(239,118,95,.12); }
.button {
    display: inline-flex; min-height: 46px; padding: .75rem 1.1rem; align-items: center; justify-content: center;
    gap: .6rem; border: 0; border-radius: 14px; cursor: pointer; font-weight: 800;
    transition: transform .18s, box-shadow .18s, background .18s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { color: #fff; background: var(--coral); box-shadow: 0 9px 22px rgba(217,88,72,.22); }
.button-primary:hover { background: var(--coral-deep); }
.button-secondary { color: #fff; background: var(--sage-deep); }
.button-soft { color: var(--ink); background: rgba(255,255,255,.72); }
.button-wide { width: 100%; }
.demo-divider { display: flex; margin: 1.7rem 0 1.2rem; align-items: center; gap: .8rem; color: var(--ink-soft); font-size: .75rem; }
.demo-divider::before, .demo-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.demo-grid form { min-width: 0; }
.demo-role {
    width: 100%; min-height: 72px; display: flex; align-items: center; gap: .75rem; padding: .72rem;
    border: 1px solid var(--line); border-radius: 16px; background: var(--paper); cursor: pointer; text-align: left;
}
.demo-role:hover { border-color: var(--coral); background: var(--coral-soft); }
.demo-role > span:last-child { min-width: 0; display: grid; }
.demo-role small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.demo-icon {
    width: 39px; height: 39px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 12px;
    color: var(--coral-deep); background: var(--coral-soft); font-weight: 900;
}
.auth-shell-context .auth-copy { margin-bottom: 26vh; }
.context-grid { display: grid; gap: .75rem; margin-top: 1.5rem; }
.context-choice {
    width: 100%; min-height: 78px; display: flex; align-items: center; gap: .85rem; padding: .9rem;
    border: 1px solid var(--line); border-radius: 18px; background: var(--paper); cursor: pointer; text-align: left;
    box-shadow: var(--shadow-soft); transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.context-choice:hover { border-color: var(--coral); background: var(--coral-soft); transform: translateY(-1px); }
.context-choice > span:last-child { min-width: 0; display: grid; }
.context-choice strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-back-link { margin-top: 1.3rem; }
.alert { padding: .9rem 1rem; border-radius: 14px; background: var(--sun-soft); line-height: 1.45; }
.alert-danger { margin: 1rem 0; color: var(--danger); background: var(--danger-soft); }

.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed; z-index: 20; inset: 0 auto 0 0; width: 280px; max-height: 100vh; display: flex; padding: 1.5rem 1rem 1rem;
    flex-direction: column; border-right: 1px solid rgba(234,223,211,.8);
    background:
        linear-gradient(160deg, rgba(255,241,189,.46) 0%, rgba(255,249,239,.92) 33%, rgba(226,239,225,.52) 100%),
        var(--cream);
    overflow-x: hidden; overflow-y: hidden; overscroll-behavior: contain;
}
.sidebar > .brand { padding: 0 .7rem 1.25rem; }
.tenant-brand {
    align-items: center;
    flex-direction: column;
    gap: .65rem;
    text-align: center;
}
.tenant-logo-frame {
    width: 172px;
    height: 88px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.tenant-logo-frame img {
    width: 150px;
    height: 72px;
    object-fit: contain;
}
.tenant-brand-copy { max-width: 100%; }
.tenant-kind {
    color: var(--ink-soft);
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.1;
}
.tenant-brand-copy strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin-top: .18rem;
    font-size: 1.12rem;
    line-height: 1.08;
}
.family-brand .tenant-brand-copy strong { margin-top: 0; }
.tenant-brand-copy small {
    display: block;
    margin-top: .22rem;
    color: var(--ink-soft);
    font-size: .74rem;
    font-weight: 800;
}
.side-nav { display: grid; gap: .24rem; }
.nav-link {
    position: relative; display: flex; min-height: 46px; padding: .65rem .9rem; align-items: center; gap: .75rem;
    border: 0; border-radius: 14px; color: var(--ink-soft); background: transparent; cursor: pointer; font-weight: 750; text-align: left;
}
.nav-link > span:first-child { width: 24px; color: var(--coral-deep); font-size: 1.1rem; text-align: center; }
.finance-icon { display: block; width: 1.15em; height: 1.15em; margin: 0; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); background: var(--coral-soft); }
.nav-link b { margin-left: auto; min-width: 22px; padding: .18rem .4rem; border-radius: 20px; color: #fff; background: var(--coral); font-size: .68rem; text-align: center; }
.platform-signature {
    margin: .75rem .65rem 0;
    padding-top: .65rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    text-align: center;
}
.platform-signature-logo {
    display: block;
    width: 125px;
    margin: .38rem auto 0;
}
.platform-signature img {
    display: block;
    width: 125px;
    height: auto;
    margin: 0;
    filter: none;
}
.platform-signature-company {
    display: block;
    margin-top: .1rem;
    color: #171717;
    font-size: .59rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}
.platform-signature-name {
    letter-spacing: .055em;
}
.platform-signature-bracket {
    color: #ff6a00;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
}
.platform-signature small {
    display: block;
    margin-top: .26rem;
    color: #171717;
    font-size: .58rem;
    font-weight: 650;
    line-height: 1.2;
}
.user-card > div { min-width: 0; display: grid; }
.user-card strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .8rem;
    line-height: 1.12;
}
.user-card small { font-size: .66rem; }
.user-card {
    display: flex;
    margin-top: auto;
    padding: .82rem .9rem;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid rgba(234,223,211,.82);
    border-radius: 17px;
    background: rgba(255,255,255,.58);
}
.user-card > div { gap: .08rem; }
.avatar, .child-avatar {
    width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 14px;
    color: var(--coral-deep); background: var(--coral-soft); font-weight: 900;
}
.avatar.small, .child-avatar.small { width: 38px; height: 38px; border-radius: 12px; }
.icon-button, .notification-button {
    width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line);
    border-radius: 13px; background: var(--paper); cursor: pointer; font-weight: 900;
}
.user-card form { flex: 0 0 auto; }
.logout-button {
    min-height: 32px;
    padding: .36rem .76rem;
    border: 1px solid rgba(217,88,72,.24);
    border-radius: 999px;
    color: var(--coral-deep);
    background: rgba(255,224,214,.52);
    cursor: pointer;
    font-size: .7rem;
    font-weight: 900;
}
.logout-button:hover { background: var(--coral-soft); }
.app-main { min-height: 100vh; margin-left: 280px; padding: 1.5rem clamp(1.25rem, 3vw, 3.5rem) 3rem; }
.topbar { display: flex; min-height: 82px; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.topbar h1 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
.app-shell[data-diary-mode="child"][data-active-section="diary"] .topbar { min-height: 54px; justify-content: flex-end; }
.app-shell[data-diary-mode="child"][data-active-section="diary"] .topbar-greeting { display: none; }
.top-actions { display: flex; align-items: flex-start; gap: .5rem; }
.top-public-link {
    min-height: 42px;
    padding: .52rem .85rem;
    border: 1px solid rgba(234,223,211,.9);
    color: var(--ink);
    background: rgba(255,255,255,.74);
    box-shadow: var(--shadow-soft);
}
.top-public-link:hover { border-color: rgba(217,88,72,.36); background: var(--coral-soft); }
.notification-button { position: relative; }
.notification-button span {
    position: absolute; right: -4px; top: -5px; min-width: 19px; height: 19px; display: grid; place-items: center;
    border: 2px solid var(--cream); border-radius: 50%; color: #fff; background: var(--coral); font-size: .62rem;
}
.view-section { display: none; animation: section-in .26s ease; }
.view-section.is-active { display: block; }
@keyframes section-in { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bottom-nav { display: none; }
.toast {
    position: fixed; z-index: 100; right: 1.5rem; top: 1.5rem; max-width: 380px; padding: .85rem 1rem;
    border-radius: 14px; color: #fff; background: var(--sage-deep); box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-12px); transition: .2s;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast.is-error { background: var(--danger); }

.parent-hero, .staff-hero, .platform-hero {
    position: relative; min-height: 260px; display: flex; padding: clamp(1.5rem, 4vw, 3rem);
    align-items: center; justify-content: space-between; gap: 2rem; overflow: hidden;
    border-radius: 30px; background: linear-gradient(130deg, #ffd8c7, #fff0ca); box-shadow: var(--shadow-soft);
}
.parent-hero > div:first-child, .staff-hero > div:first-child, .platform-hero > div:first-child { position: relative; z-index: 2; max-width: 700px; }
.parent-hero h2, .staff-hero h2, .platform-hero h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); }
.parent-hero h2.family-title { white-space: nowrap; }
.parent-hero p:not(.eyebrow), .staff-hero p:not(.eyebrow), .platform-hero p:not(.eyebrow) { color: var(--ink-soft); }
.hero-sun {
    width: 170px; height: 170px; display: grid; flex: 0 0 auto; place-items: center;
    border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 25px rgba(246,201,85,.18), 0 0 0 50px rgba(246,201,85,.08);
}
.hero-sun span { font-size: 4rem; color: #fff6dc; }
.staff-hero { min-height: 220px; background: linear-gradient(135deg, #dcebdc, #fff3cc); }
.director-hero { background: linear-gradient(135deg, #fee2d5, #e3eee0); }
.platform-hero { background: linear-gradient(135deg, #e0ecdf, #fff0d1); }
.shield { width: 120px; height: 140px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 55px 55px 65px 65px; color: #fff; background: var(--sage-deep); font-size: 3.5rem; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0; }
.quick-card {
    min-height: 112px; display: flex; padding: 1.2rem; align-items: center; gap: 1rem; border: 0; border-radius: 22px;
    cursor: pointer; text-align: left; box-shadow: var(--shadow-soft);
}
.quick-card > span { width: 52px; height: 52px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 17px; background: rgba(255,255,255,.68); font-size: 1.5rem; }
.quick-card div { min-width: 0; display: grid; gap: .2rem; }
.quick-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.quick-card small { color: var(--ink-soft); }
.quick-card.coral { background: var(--coral-soft); }
.quick-card.sage { background: var(--sage-soft); }
.quick-card.yellow { background: var(--sun-soft); }
.family-children { display: grid; gap: 1rem; margin-top: 1rem; }
.family-group {
    min-width: 0; padding: 1rem; border: 1px solid rgba(234,223,211,.84); border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,243,228,.72)); box-shadow: var(--shadow-soft);
}
.family-group-head { display: flex; margin-bottom: .85rem; align-items: end; justify-content: space-between; gap: 1rem; }
.family-group-head h3 { margin: 0; font-size: 1rem; }
.family-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.family-child-card {
    min-width: 0; display: grid; gap: .65rem; padding: .95rem; border: 1px solid rgba(234,223,211,.9);
    border-radius: 18px; background: rgba(255,255,255,.86);
}
.family-child-card strong { display: block; overflow-wrap: anywhere; }
.family-child-card small, .family-child-card p { color: var(--ink-soft); }
.family-child-card p { min-height: 1.4rem; margin: 0; font-size: .85rem; line-height: 1.45; }
.family-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.family-actions .text-button { padding: .45rem .65rem; border-radius: 999px; background: rgba(239,118,95,.1); }
.child-tabs {
    display: flex;
    gap: .75rem;
    margin: 1rem 0;
    overflow-x: auto;
    padding: .15rem .1rem .45rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(239,118,95,.32) transparent;
}
.child-tabs::-webkit-scrollbar { height: 5px; }
.child-tabs::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(239,118,95,.32); }
.child-tab {
    min-width: 220px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .7rem;
    padding: .75rem .85rem;
    border: 1px solid rgba(234,223,211,.9);
    border-radius: 18px;
    background: rgba(255,255,255,.78);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    box-shadow: var(--shadow-soft);
    scroll-snap-align: start;
}
.child-tab.is-active {
    border-color: rgba(239,118,95,.34);
    background: linear-gradient(135deg, rgba(255,224,214,.92), rgba(255,247,231,.86));
}
.child-tab span:nth-child(2) { min-width: 0; display: grid; gap: .12rem; }
.child-tab strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.child-tab small { overflow: hidden; color: var(--ink-soft); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.child-tab b {
    padding: .28rem .48rem;
    border-radius: 999px;
    color: var(--sage-deep);
    background: var(--sage-soft);
    font-size: .62rem;
}
.child-mini-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--coral-deep);
    background: var(--sun-soft);
    font-weight: 950;
}
.child-profile-panel { display: none; }
.child-profile-panel.is-active { display: block; }
.child-profile-hero {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(234,223,211,.78);
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 12%, rgba(246,201,85,.22), transparent 26%),
        linear-gradient(135deg, rgba(255,224,214,.8), rgba(255,247,231,.84));
    box-shadow: var(--shadow-soft);
}
.child-avatar.large {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: var(--sun);
    font-size: 2.1rem;
}
.child-profile-hero h3 { margin: .1rem 0 .25rem; font-size: 1.55rem; }
.child-profile-hero p:last-child { margin: 0; color: var(--ink-soft); line-height: 1.45; }
.child-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.child-info-card {
    min-width: 0;
    padding: 1.1rem;
    border: 1px solid rgba(234,223,211,.9);
    border-radius: 20px;
    background: rgba(255,255,255,.82);
    box-shadow: var(--shadow-soft);
}
.child-info-card.today-card { background: linear-gradient(145deg, rgba(255,247,223,.92), rgba(255,255,255,.84)); }
.child-info-card > p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.row-icon.sage { color: var(--sage-deep); background: var(--sage-soft); }
.row-icon.coral { color: var(--coral-deep); background: var(--coral-soft); }
.info-list { display: grid; gap: .7rem; margin: 0; }
.info-list div {
    min-width: 0;
    padding: .75rem;
    border: 1px solid rgba(234,223,211,.72);
    border-radius: 14px;
    background: rgba(255,250,243,.72);
}
.info-list dt { color: var(--ink-soft); font-size: .68rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.info-list dd { margin: .25rem 0 0; overflow-wrap: anywhere; font-weight: 850; line-height: 1.42; }
.health-card { background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,249,239,.82)); }
.health-note-grid { display: grid; gap: .75rem; margin-bottom: .95rem; }
.health-note {
    min-width: 0;
    padding: .82rem .9rem;
    border: 1px solid rgba(234,223,211,.72);
    border-radius: 15px;
}
.health-note span, .allergy-manager-head span, .medical-allergy p span {
    color: var(--ink-soft);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.health-note strong { display: block; margin-top: .28rem; overflow-wrap: anywhere; line-height: 1.42; }
.health-note-medical { background: linear-gradient(135deg, rgba(226,239,225,.72), rgba(255,255,255,.78)); }
.health-note-instruction { background: linear-gradient(135deg, rgba(232,244,247,.74), rgba(255,255,255,.8)); }
.allergy-manager { display: grid; gap: .65rem; }
.allergy-manager-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.allergy-manager-head b {
    min-width: 28px;
    min-height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--coral-deep);
    background: var(--coral-soft);
    font-size: .72rem;
}
.medical-allergy-list { display: grid; gap: .6rem; }
.medical-allergy {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .8rem;
    padding: .85rem;
    border: 1px solid rgba(246,201,85,.36);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,241,189,.66), rgba(255,250,243,.88));
}
.medical-allergy.allergy-blaga { border-color: rgba(140,174,139,.35); background: linear-gradient(135deg, rgba(226,239,225,.7), rgba(255,250,243,.88)); }
.medical-allergy.allergy-visoka { border-color: rgba(239,118,95,.46); background: linear-gradient(135deg, rgba(255,224,214,.88), rgba(255,247,223,.78)); }
.medical-allergy-main { min-width: 0; }
.medical-allergy-main strong { display: block; margin-top: .42rem; overflow-wrap: anywhere; font-size: 1.02rem; }
.medical-allergy p { margin: .45rem 0 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.severity-badge {
    display: inline-flex;
    padding: .28rem .56rem;
    border-radius: 999px;
    color: #8c5222;
    background: rgba(255,255,255,.62);
    font-size: .66rem;
    font-weight: 900;
}
.allergy-visoka .severity-badge { color: var(--danger); background: var(--danger-soft); }
.allergy-blaga .severity-badge { color: var(--sage-deep); background: var(--sage-soft); }
.allergy-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.compact-editor { margin-top: 0; border-top: 0; }
.medical-allergy > .compact-editor { grid-column: 1 / -1; margin-top: -.35rem; }
.compact-editor summary { margin-top: 0; padding: .42rem .7rem; font-size: .72rem; }
.compact-editor[open] { grid-column: 1 / -1; }
.allergy-form { margin-bottom: 0; padding-top: .2rem; }
.empty-inline {
    margin: 0;
    padding: .78rem .9rem;
    border: 1px dashed rgba(140,174,139,.42);
    border-radius: 15px;
    color: var(--sage-deep);
    background: rgba(226,239,225,.45);
    font-weight: 850;
}
.inline-editor { margin-top: 1rem; border-top: 1px solid var(--line); }
.inline-editor summary {
    width: max-content;
    display: inline-flex;
    align-items: center;
    margin-top: .85rem;
    padding: .58rem .9rem;
    border: 1px solid rgba(239,118,95,.28);
    border-radius: 999px;
    color: var(--coral-deep);
    background: rgba(255,224,214,.45);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 900;
    list-style: none;
}
.inline-editor summary::-webkit-details-marker { display: none; }
.inline-editor .form-grid { margin-top: .9rem; }
.pickup-list { display: grid; gap: .15rem; }
.content-grid, .profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.card {
    min-width: 0; padding: 1.35rem; border: 1px solid rgba(234,223,211,.9);
    border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft);
}
.card-head { display: flex; margin-bottom: 1rem; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.card-head h3 { margin-bottom: 0; }
.text-button { padding: .35rem .1rem; border: 0; color: var(--coral-deep); background: transparent; cursor: pointer; font-size: .78rem; font-weight: 800; }
.timeline-item, .list-row { display: flex; padding: .85rem 0; align-items: center; gap: .8rem; border-top: 1px solid var(--line); }
.timeline-icon, .row-icon { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--sun-soft); }
.timeline-item > div, .list-row > div { min-width: 0; display: grid; }
.timeline-item small, .list-row small { margin-top: .2rem; }
.list-row > b { margin-left: auto; font-size: .78rem; }
.list-row.compact { padding: .65rem 0; }
.pickup-card { grid-column: 1 / -1; }
.pickup-card .list-row.compact { align-items: flex-start; }
.pickup-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pickup-management { display: grid; gap: 1rem; padding-top: .85rem; }
.pickup-management .form-grid { padding: 0; border: 0; }
.notice-preview { background: linear-gradient(145deg, #fff, #fff7df); }
.notice-preview p { margin: .4rem 0 0; color: var(--ink-soft); }
.count-badge, .status-pill, .security-pill {
    display: inline-flex; min-height: 28px; padding: .32rem .65rem; align-items: center; border-radius: 999px;
    color: var(--sage-deep); background: var(--sage-soft); font-size: .7rem; font-weight: 800; white-space: nowrap;
}
.count-badge { min-width: 28px; justify-content: center; color: var(--coral-deep); background: var(--coral-soft); }
.status-pill.danger { color: var(--danger); background: var(--danger-soft); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; }
.metric { min-height: 138px; display: grid; padding: 1.2rem; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-soft); }
.metric > span { color: var(--coral); font-size: 1.4rem; }
.metric small { align-self: end; }
.metric strong { font-size: 1.8rem; letter-spacing: -.04em; }
.metric-warn { background: var(--sun-soft); }
.section-title { display: flex; margin-bottom: 1.2rem; align-items: center; justify-content: space-between; gap: 1rem; }
.section-title h2 { margin-bottom: 0; }
.child-list { display: grid; gap: .7rem; }
.child-row { display: flex; padding: 1rem 1.15rem; align-items: center; gap: .85rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.child-row > div:nth-child(2) { min-width: 170px; display: grid; }
.allergy-tags { display: flex; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.allergy { padding: .42rem .65rem; border-radius: 999px; color: #8c5222; background: var(--sun-soft); font-size: .7rem; font-weight: 800; }
.allergy.visoka { color: var(--danger); background: var(--danger-soft); }
.child-identity { display: grid; min-height: 280px; place-items: center; align-content: center; text-align: center; background: linear-gradient(145deg, var(--coral-soft), var(--paper-warm)); }
.child-identity .child-avatar { width: 92px; height: 92px; margin-bottom: 1rem; border-radius: 30px; background: var(--sun); font-size: 2.5rem; }
.child-identity p { color: var(--ink-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin-bottom: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.card > label, .card > .button { margin-top: .8rem; }
.inline-check {
    display: flex;
    grid-template-columns: unset;
    align-items: center;
    gap: .65rem;
    padding: .75rem .85rem;
    border: 1px solid rgba(239, 118, 95, .24);
    border-radius: 14px;
    background: rgba(255, 224, 214, .38);
    font-weight: 850;
}
.inline-check input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--coral);
}
.public-alert-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
    margin-top: .8rem;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 247, 231, .92), rgba(226, 241, 225, .56));
}
.public-alert-fields label:first-child { grid-column: 1 / -1; }
.public-alert-fields[hidden] { display: none; }
.diary-workspace { margin-top: 0; }
.app-shell[data-diary-mode="child"] [data-section="diary"] .section-title { margin-bottom: .35rem; }
.diary-child-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
}
.diary-child-tabs .child-tab { width: 100%; min-width: 0; }
.diary-child-tab:focus-visible { outline: 3px solid rgba(239,118,95,.28); outline-offset: 3px; }
.diary-entry-forms { margin: 1rem 0; }
.diary-child-panel { display: none; }
.diary-child-panel.is-active { display: block; }
.diary-child-heading {
    min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .9rem;
    margin: 1rem 0; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,224,214,.6), rgba(255,247,231,.82));
}
.diary-child-heading h3, .diary-child-heading p { margin: 0; }
.diary-child-heading small { color: var(--ink-soft); }
.diary-empty-state { min-height: 230px; display: grid; place-items: center; align-content: center; gap: .4rem; text-align: center; }
.diary-empty-state h3, .diary-empty-state p { margin: 0; }
.empty-state-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 19px; color: var(--coral-deep); background: var(--sun-soft); font-size: 1.55rem; }
.diary-limit-note { margin: .8rem 0 0; color: var(--ink-soft); font-size: .78rem; text-align: center; }
.journal-list { display: grid; gap: .8rem; }
.journal-card { display: grid; grid-template-columns: 70px 1fr; gap: 1.1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.journal-date { width: 62px; height: 70px; display: grid; place-items: center; align-content: center; border-radius: 18px; background: var(--sun-soft); }
.journal-date strong { font-size: 1.5rem; }
.journal-date small { font-size: .65rem; font-weight: 800; }
.journal-card p { margin-bottom: .6rem; color: var(--ink-soft); }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-row span { padding: .4rem .65rem; border-radius: 999px; background: var(--cream); color: var(--ink-soft); font-size: .72rem; }
.finance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1rem; }
.big-number { display: block; margin: 1rem 0; font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -.06em; }
.finance-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.finance-summary span { display: grid; padding: .75rem; border-radius: 14px; background: var(--cream); color: var(--ink-soft); font-size: .72rem; }
.finance-summary b { margin-top: .25rem; color: var(--ink); font-size: 1rem; }
.money-icon { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--danger); background: var(--danger-soft); }
.money-icon.uplata { color: var(--sage-deep); background: var(--sage-soft); }
.conversation-layout { min-height: 520px; display: grid; grid-template-columns: 310px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.conversation-list { padding: .6rem; border-right: 1px solid var(--line); background: #fffaf3; }
.conversation-tab { width: 100%; display: flex; padding: .8rem; align-items: center; gap: .7rem; border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; }
.conversation-tab.is-active { background: var(--coral-soft); }
.conversation-tab > span:last-child { min-width: 0; display: grid; }
.conversation-tab small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-panel { height: 100%; display: none; grid-template-rows: auto 1fr auto; }
.conversation-panel.is-active { display: grid; }
.conversation-head { display: flex; padding: 1rem 1.2rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.conversation-head h3 { margin: 0; }
.messages { max-height: 440px; overflow-y: auto; padding: 1.2rem; }
.message { width: fit-content; max-width: 75%; margin-bottom: .8rem; padding: .75rem .9rem; border-radius: 6px 16px 16px; background: var(--cream); }
.message.mine { margin-left: auto; border-radius: 16px 6px 16px 16px; background: var(--coral-soft); }
.message strong { display: block; margin-bottom: .25rem; font-size: .7rem; }
.message p { margin-bottom: .25rem; line-height: 1.45; }
.message time { color: var(--ink-soft); font-size: .64rem; }
.message-form { display: flex; padding: .8rem; gap: .6rem; border-top: 1px solid var(--line); }
.new-conversation, .absence-form, .tenant-form { max-width: 680px; margin-top: 1rem; }
.notice-item { display: grid; grid-template-columns: auto 1fr auto; padding: 1rem 0; gap: .75rem; border-top: 1px solid var(--line); }
.notice-item.unread { background: linear-gradient(90deg, rgba(255,224,214,.34), transparent); }
.notice-item p { margin: .3rem 0; color: var(--ink-soft); font-size: .85rem; }
.priority { width: 9px; height: 9px; margin-top: .35rem; border-radius: 50%; background: var(--sage); }
.priority.vazno { background: var(--sun); }
.priority.hitno { background: var(--danger); }
.menu-day { padding: .85rem 0; border-top: 1px solid var(--line); }
.menu-day summary, .menu-day-summary { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; }
.menu-day summary { cursor: pointer; }
.menu-day summary span, .menu-day-summary span { color: var(--ink-soft); font-size: .82rem; }
.menu-day p { margin: .55rem 0; font-size: .82rem; }
.menu-day-empty { background: linear-gradient(90deg, rgba(255,247,231,.62), transparent); }
.menu-day-empty .menu-day-summary span { font-style: italic; }
.menu-tenant-label { margin: .8rem 0 .3rem; color: var(--coral-deep); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.poll-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; }
.vote-form { display: grid; gap: .55rem; }
.vote-option { display: flex; grid-template-columns: unset; padding: .7rem; align-items: center; gap: .7rem; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.vote-option input { width: 18px; min-height: 18px; }
.vote-option span { display: grid; }
.result-row { display: flex; padding: .75rem 0; justify-content: space-between; border-top: 1px solid var(--line); }
.management-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.table-card { margin-top: 1rem; }
.child-edit-card { display: grid; gap: .75rem; }
.child-edit {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    overflow: hidden;
}
.child-edit summary {
    display: flex;
    min-height: 58px;
    padding: .85rem 1rem;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    cursor: pointer;
    font-weight: 900;
}
.child-edit summary small { font-weight: 750; text-align: right; }
.child-edit-form { padding: 1rem; border-top: 1px solid var(--line); }
.child-edit-form .button { width: max-content; }
.permission-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin: 1rem 0 0;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.permission-checks legend { padding: 0 .35rem; color: var(--ink-soft); font-size: .72rem; font-weight: 900; }
.permission-check, .check-cell { display: flex; min-width: 0; align-items: center; gap: .45rem; font-size: .76rem; font-weight: 800; }
.permission-check input, .check-cell input { width: 18px; min-height: 18px; flex: 0 0 auto; }
.permission-check span { min-width: 0; overflow-wrap: anywhere; }
.permission-editor {
    border-top: 1px solid var(--line);
}
.permission-editor summary {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    cursor: pointer;
    font-weight: 900;
}
.permission-form { padding-bottom: 1rem; }
.quick-daily-form { margin-bottom: 1rem; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: .8rem 0 1rem; }
.quick-daily-table table { min-width: 760px; }
.quick-daily-table td:first-child { min-width: 180px; }
.quick-daily-table input[data-daily-field="napomena"] { min-width: 180px; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--ink-soft); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: .82rem; }
td small { display: block; margin-top: .2rem; }
.empty { color: var(--ink-soft); }

@media (min-width: 1500px) {
    .login-dashboard { display: block; }
    .login-dashboard-card-diary { top: 9%; right: 34px; }
    .login-dashboard-card-finance { top: 19%; right: 6px; }
    .login-dashboard-card-messages { top: 29%; right: 64px; }
    .login-dashboard-card-menu { top: 39%; right: 20px; }
    .login-dashboard-card-poll { top: 49%; right: 20px; }
}

@media (min-width: 1101px) and (max-width: 1499px) {
    .login-dashboard { display: block; }
    .auth-copy-login > p:last-child { max-width: 400px; }
    .login-dashboard-card {
        --card-scale: .82;
        min-width: 180px;
    }
    .login-dashboard-card-diary { top: 12%; right: 18px; }
    .login-dashboard-card-messages { top: 25%; right: 4px; }
    .login-dashboard-card-menu { top: 38%; right: 28px; }
    .login-dashboard-card-finance,
    .login-dashboard-card-poll { display: none; }
}

@media (max-width: 1100px) {
    .sidebar { width: 248px; padding-right: .8rem; padding-left: .8rem; }
    .app-main { margin-left: 248px; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-copy-login h1 span { white-space: normal; }
    .management-grid { grid-template-columns: 1fr 1fr; }
    .family-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .diary-child-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .child-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pickup-card { grid-column: 1 / -1; }
}

@media (max-height: 760px) and (min-width: 761px) {
    .sidebar { padding-top: .85rem; padding-bottom: .75rem; overflow-y: auto; }
    .sidebar > .brand { padding-bottom: .85rem; }
    .tenant-brand { gap: .45rem; }
    .tenant-logo-frame { width: 150px; height: 72px; border-radius: 18px; }
    .tenant-logo-frame img { width: 130px; height: 58px; }
    .tenant-brand-copy strong { font-size: 1rem; }
    .tenant-brand-copy small { margin-top: .1rem; font-size: .68rem; }
    .nav-link { min-height: 40px; padding: .5rem .75rem; }
    .user-card { padding: .68rem .72rem; gap: .55rem; }
    .logout-button { min-height: 30px; padding: .32rem .62rem; }
    .platform-signature { margin-top: .55rem; padding-top: .5rem; }
}

@media (max-width: 760px) {
    body.app-body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
    .sidebar { display: none; }
    .app-main { margin-left: 0; padding: 1rem 1rem 2rem; }
    .topbar { min-height: 72px; }
    .topbar > div:first-child { min-width: 0; }
    .top-actions { flex: 0 0 auto; }
    .top-public-link { width: 44px; min-height: 42px; padding: 0; justify-content: center; font-size: 0; }
    .top-public-link::before { content: "Sajt"; font-size: .66rem; }
    .top-public-link span { display: none; }
    .topbar .eyebrow { display: none; }
    .topbar h1 { margin: 0; font-size: 1.35rem; }
    .bottom-nav {
        position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: flex; height: calc(68px + env(safe-area-inset-bottom));
        padding: .35rem .3rem env(safe-area-inset-bottom); justify-content: space-around;
        border-top: 1px solid var(--line); background: rgba(255,252,246,.96); backdrop-filter: blur(14px);
    }
    .bottom-nav .nav-link { min-width: 0; min-height: 58px; flex: 1; padding: .3rem; flex-direction: column; justify-content: center; gap: .15rem; border-radius: 12px; }
    .bottom-nav .nav-link > span:first-child { width: auto; font-size: 1.08rem; }
    .bottom-nav .nav-link small { font-size: .58rem; }
    .bottom-nav .nav-link b { position: absolute; right: 16%; top: 2px; margin: 0; min-width: 17px; padding: .1rem .25rem; }
    .parent-hero, .staff-hero, .platform-hero { min-height: 220px; padding: 1.35rem; align-items: flex-start; border-radius: 23px; }
    .parent-hero h2, .staff-hero h2, .platform-hero h2 { font-size: 1.75rem; }
    .parent-hero h2.family-title { font-size: 1.55rem; }
    .hero-sun { position: absolute; width: 95px; height: 95px; right: -15px; bottom: -10px; box-shadow: 0 0 0 16px rgba(246,201,85,.18); opacity: .8; }
    .hero-sun span { font-size: 2.2rem; }
    .parent-hero > div:first-child { max-width: 88%; }
    .staff-hero, .platform-hero { flex-direction: column; }
    .shield { position: absolute; width: 80px; height: 92px; right: -8px; bottom: -12px; font-size: 2rem; opacity: .65; }
    .quick-grid { grid-template-columns: 1fr; gap: .65rem; }
    .quick-card { min-height: 86px; }
    .family-group { padding: .85rem; border-radius: 20px; }
    .family-group-head { align-items: flex-start; flex-direction: column; gap: .15rem; }
    .family-card-grid { grid-template-columns: 1fr; }
    .family-child-card { padding: .85rem; }
    .family-actions .text-button { padding-left: .55rem; padding-right: .55rem; }
    .child-tabs { margin-right: -1rem; margin-left: -1rem; padding-left: 1rem; padding-right: 1rem; }
    .child-tab { min-width: 205px; padding: .68rem; }
    .child-tab b { display: none; }
    .diary-child-tab b { display: inline-flex; grid-column: auto; justify-self: end; }
    .child-profile-hero { grid-template-columns: auto 1fr; align-items: flex-start; padding: 1rem; border-radius: 21px; }
    .child-profile-hero .status-pill { grid-column: 2; justify-self: start; }
    .child-avatar.large { width: 62px; height: 62px; border-radius: 20px; font-size: 1.75rem; }
    .child-profile-hero h3 { font-size: 1.22rem; }
    .child-profile-grid { grid-template-columns: 1fr; }
    .child-info-card { padding: .95rem; border-radius: 18px; }
    .medical-allergy { grid-template-columns: 1fr; }
    .allergy-actions { align-items: flex-start; }
    .inline-editor summary { width: 100%; justify-content: center; text-align: center; }
    .content-grid, .profile-grid, .management-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .metric { min-height: 115px; padding: .9rem; }
    .metric strong { font-size: 1.45rem; }
    .card { padding: 1.05rem; border-radius: 20px; }
    .section-title { align-items: flex-start; }
    .section-title .security-pill { display: none; }
    .child-row { align-items: flex-start; flex-wrap: wrap; }
    .child-row > div:nth-child(2) { flex: 1; min-width: 150px; }
    .allergy-tags { width: 100%; margin-left: 48px; justify-content: flex-start; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .permission-checks { grid-template-columns: 1fr; }
    .diary-child-tabs {
        grid-template-columns: 1fr;
        margin-right: 0;
        margin-left: 0;
        overflow: visible;
        padding-right: .1rem;
        padding-left: .1rem;
    }
    .diary-child-tabs .child-tab { min-width: 0; }
    .diary-child-heading { grid-template-columns: auto 1fr; align-items: flex-start; padding: .9rem; }
    .diary-child-heading .status-pill { grid-column: 2; justify-self: start; }
    .diary-empty-state { min-height: 205px; }
    .journal-card { grid-template-columns: 54px 1fr; padding: .9rem; gap: .8rem; }
    .journal-date { width: 50px; height: 60px; }
    .conversation-layout { min-height: 0; grid-template-columns: 1fr; }
    .conversation-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .conversation-tab { min-width: 230px; }
    .conversation-panel { min-height: 480px; }
    .message { max-width: 88%; }
    .message-form { align-items: end; }
    .message-form input { min-width: 0; }
    .menu-day summary, .menu-day-summary { grid-template-columns: 90px 1fr; }
    .notice-item { grid-template-columns: auto 1fr; }
    .notice-item .text-button { grid-column: 2; justify-self: start; }
    .toast { right: 1rem; top: 1rem; left: 1rem; max-width: none; }
    .auth-shell { display: block; }
    .auth-story { min-height: 270px; padding: 1.25rem; }
    .auth-copy { margin: 1rem 0 2rem; }
    .auth-copy h1 { max-width: 330px; font-size: 2.2rem; }
    .auth-copy-login h1 span { display: inline; }
    .auth-copy > p:last-child { display: none; }
    .sun-scene { height: 170px; opacity: .7; }
    .sun-face { width: 80px; height: 80px; right: 8%; }
    .sun-face::before, .sun-face::after { top: 26px; width: 6px; height: 9px; }
    .sun-face::before { left: 24px; }
    .sun-face::after { right: 24px; }
    .sun-face span { left: 28px; top: 44px; width: 25px; height: 13px; border-width: 3px; }
    .auth-panel { min-height: auto; padding: 1.4rem 1rem 2rem; }
    .auth-card h2 { font-size: 1.65rem; }
}

@media (max-width: 390px) {
    .app-main { padding-right: .75rem; padding-left: .75rem; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .metric { min-height: 108px; }
    .demo-grid { grid-template-columns: 1fr; }
    .auth-story { min-height: 230px; }
    .auth-copy { margin: 2rem 0; }
    .auth-copy h1 { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
