:root{
  --blue:#4DA3F7; --blue-d:#2F86E0; --bg:#F2F5F9; --card:#fff; --text:#1F2A37; --muted:#8A94A3; --line:#E7ECF2;
  --red:#F25C54; --green:#2DBE7E; --yellow:#FFC93C; --orange:#FF9F43; --pink:#F78DA7; --r:16px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:#DDE6F0;font-family:-apple-system,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;color:var(--text);font-size:15px}
#phone{max-width:430px;margin:0 auto;min-height:100%;background:var(--bg);position:relative;box-shadow:0 0 40px rgba(0,0,0,.08)}
@media(min-width:600px){#phone{margin:20px auto;min-height:calc(100% - 40px);border-radius:28px;overflow:hidden}}
#app{min-height:100vh;display:flex;flex-direction:column}
@media(min-width:600px){#app{min-height:calc(100vh - 40px)}}
button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
input,select,textarea{font:inherit;color:inherit}
a{color:var(--blue-d)}

/* --- login */
.login{flex:1;background:var(--blue);color:#fff;display:flex;flex-direction:column;min-height:100vh}
@media(min-width:600px){.login{min-height:calc(100vh - 40px)}}
.login .inner{flex:1;padding:70px 30px 20px;display:flex;flex-direction:column}
.logo{width:64px;height:64px;margin:0 auto 46px;display:block}
.login h1{text-align:center;font-size:20px;margin:-30px 0 34px;font-weight:600;letter-spacing:.5px;opacity:.95}
.uline{width:100%;background:transparent;border:0;border-bottom:1px solid rgba(255,255,255,.7);color:#fff;padding:10px 2px;margin-bottom:18px;outline:0;font-size:15px}
.uline::placeholder{color:rgba(255,255,255,.75)}
.check{display:flex;align-items:center;gap:8px;font-size:13px;margin:4px 0 18px;cursor:pointer;user-select:none}
.check .dot{width:18px;height:18px;border-radius:50%;background:#fff;color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.check.off .dot{background:transparent;border:1.5px solid #fff;color:transparent}
.btn-white{width:100%;background:#fff;color:var(--blue-d);padding:14px;border-radius:30px;font-weight:700;font-size:15px}
.links{display:flex;justify-content:center;gap:22px;margin-top:16px;font-size:13px}
.links button{color:#fff;opacity:.9}
.login .bottom{display:flex;background:rgba(0,0,0,.08)}
.login .bottom button{flex:1;padding:18px;color:#fff;font-size:14px}
.login .bottom button+button{border-left:1px solid rgba(255,255,255,.25)}
.demo-pick{display:none;gap:8px;margin-top:14px;flex-wrap:wrap}
.demo-pick button{min-width:40%}
.demo-pick.on{display:flex}
.demo-pick button{flex:1;background:rgba(255,255,255,.18);color:#fff;padding:10px 4px;border-radius:12px;font-size:12px}

/* --- topbar */
.top{position:sticky;top:0;z-index:5;background:var(--blue);color:#fff;display:flex;align-items:center;height:56px;padding:0 6px}
.top h2{flex:1;margin:0;font-size:17px;font-weight:600;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top .ib{width:44px;height:44px;display:flex;align-items:center;justify-content:center;font-size:22px;color:#fff}
.top .tx{padding:0 10px;font-size:14px;color:#fff;min-width:44px}
.page{flex:1;padding:14px 14px 90px}
.page.np{padding:0 0 90px}

/* --- cards & lists */
.card{background:var(--card);border-radius:var(--r);padding:16px;margin-bottom:12px;box-shadow:0 1px 3px rgba(20,40,80,.05)}
.list .item{display:flex;gap:12px;align-items:flex-start;background:#fff;padding:14px;border-radius:14px;margin-bottom:10px;cursor:pointer;box-shadow:0 1px 3px rgba(20,40,80,.05)}
.item .grow{flex:1;min-width:0}
.item h4{margin:0 0 4px;font-size:15px;display:flex;align-items:center;gap:6px}
.item p{margin:0;color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.meta{font-size:12px;color:var(--muted)}
.new-dot{width:8px;height:8px;border-radius:50%;background:var(--red);display:inline-block;flex:none}
.tag{display:inline-block;font-size:11px;padding:3px 8px;border-radius:20px;background:#EAF3FE;color:var(--blue-d);font-weight:600;white-space:nowrap}
.tag.red{background:#FDECEB;color:var(--red)} .tag.green{background:#E3F7EE;color:#1A9A62} .tag.yellow{background:#FFF6DC;color:#B88700} .tag.gray{background:#EEF1F5;color:#6B7684}
.empty{text-align:center;color:var(--muted);padding:60px 20px}
.empty .big{font-size:48px;margin-bottom:10px}
.thumb{width:56px;height:56px;border-radius:12px;object-fit:cover;background:#EEF2F7;flex:none}
.av{width:42px;height:42px;border-radius:50%;background:#E6F0FC;display:flex;align-items:center;justify-content:center;font-size:20px;flex:none;overflow:hidden}
.av img{width:100%;height:100%;object-fit:cover}

/* --- forms */
.f{margin-bottom:14px}
.f label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px;font-weight:600}
.f input,.f select,.f textarea{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;outline:0;font-size:15px}
.f input:focus,.f select:focus,.f textarea:focus{border-color:var(--blue)}
.f textarea{min-height:110px;resize:vertical}
.row{display:flex;gap:10px} .row>*{flex:1;min-width:0}
.btn{display:block;width:100%;background:var(--blue);color:#fff;padding:14px;border-radius:14px;font-weight:700;font-size:15px;text-align:center}
.btn:active{background:var(--blue-d)}
.btn.sec{background:#EAF3FE;color:var(--blue-d)} .btn.red{background:#FDECEB;color:var(--red)} .btn.green{background:var(--green)}
.btn.sm{display:inline-block;width:auto;padding:8px 14px;font-size:13px;border-radius:10px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{padding:9px 14px;border-radius:22px;background:#fff;border:1px solid var(--line);font-size:14px}
.chip.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.photos{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
.photos img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:6px;cursor:zoom-in;background:#EEF2F7}
.pick{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.pick img{width:64px;height:64px;object-fit:cover;border-radius:10px}
.fileb{display:inline-flex;align-items:center;gap:6px;padding:10px 14px;border:1px dashed #B9C6D6;border-radius:12px;background:#fff;color:var(--blue-d);cursor:pointer;font-size:14px}
.fileb input{display:none}

/* --- home */
.home-hd{background:linear-gradient(180deg,#BFE2FF 0%,#E8F4FF 100%);padding:18px 16px 70px;position:relative;overflow:hidden}
.home-hd .kg{font-size:19px;font-weight:800;color:#24476B;display:flex;justify-content:space-between;align-items:center}
.home-hd .kg button{font-size:22px}
.animals{font-size:34px;letter-spacing:4px;margin-top:14px;white-space:nowrap;text-align:center}
.animals span{display:inline-block;animation:bob 2.4s ease-in-out infinite}
.animals span:nth-child(2n){animation-delay:.6s}
@keyframes bob{50%{transform:translateY(-6px)}}
.childcard{margin:-52px 14px 12px;background:#fff;border-radius:18px;padding:14px;display:flex;align-items:center;gap:12px;box-shadow:0 4px 16px rgba(30,70,120,.08);position:relative;cursor:pointer}
.childcard .av{width:50px;height:50px;font-size:26px}
.childcard b{font-size:16px}
.mode{margin-left:auto;font-size:12px;color:var(--muted);text-align:right}
.menu{background:#fff;border-radius:18px;margin:0 14px 12px;padding:16px 10px 8px;box-shadow:0 1px 3px rgba(20,40,80,.05)}
.menu .hd{display:flex;justify-content:space-between;padding:0 6px 10px;font-weight:700}
.menu .hd span{font-weight:400;color:var(--muted);font-size:13px}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}
.tile{display:flex;flex-direction:column;align-items:center;gap:7px;padding:8px 2px 12px;border-radius:14px;position:relative;font-size:12px;text-align:center;color:#3A4655}
.tile:active{background:#F2F6FB}
.tile .ic{width:52px;height:52px;border-radius:15px;display:flex;align-items:center;justify-content:center;font-size:27px}
.badge{position:absolute;top:2px;right:12%;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--red);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.today{margin:0 14px 12px}
.today .card h3{margin:0 0 10px;font-size:15px}

/* --- tab bar */
.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;background:#fff;display:flex;border-top:1px solid var(--line);z-index:6;padding-bottom:env(safe-area-inset-bottom)}
@media(min-width:600px){.tabbar{bottom:20px;border-radius:0 0 28px 28px}}
.tabbar button{flex:1;padding:9px 0 10px;font-size:11px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:2px;position:relative}
.tabbar button .e{font-size:21px;filter:grayscale(1);opacity:.6}
.tabbar button.on{color:var(--blue-d);font-weight:600}
.tabbar button.on .e{filter:none;opacity:1}
.tabbar .badge{right:30%}
.fab{position:fixed;bottom:84px;right:calc(50% - 200px);width:56px;height:56px;border-radius:50%;background:var(--blue);color:#fff;font-size:30px;box-shadow:0 6px 18px rgba(47,134,224,.4);z-index:7;display:flex;align-items:center;justify-content:center}
@media(max-width:430px){.fab{right:18px}}
@media(min-width:600px){.fab{bottom:104px}}

/* --- nickname */
.nick-prev{background:#fff;margin:0 0 12px;border-radius:0;padding:18px;text-align:center}
.nick-prev .lbl{background:#EEF1F5;color:var(--muted);font-size:12px;padding:8px;margin:-18px -18px 16px}
.radio{display:flex;align-items:center;gap:12px;padding:15px 18px;background:#fff;border-bottom:1px solid var(--line);cursor:pointer}
.radio .o{width:20px;height:20px;border-radius:50%;border:2px solid #C4CCD6;flex:none}
.radio.on .o{border:6px solid var(--blue)}
.radio input{flex:1;padding:10px 12px;border:1px solid var(--line);border-radius:10px;outline:0}
.hint{margin:16px;padding:12px;background:#E9EEF4;border-radius:10px;font-size:12px;color:#5B6675}

/* --- report detail */
.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}
.stat{background:#F6F9FC;border-radius:12px;padding:10px 12px}
.stat .k{font-size:12px;color:var(--muted)} .stat .v{font-weight:700;margin-top:3px}
.body-text{white-space:pre-wrap;line-height:1.55}
.post-img{width:100%;border-radius:12px;margin-top:12px;cursor:zoom-in}
.comments{margin-top:6px}
.cm{display:flex;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.cm .av{width:34px;height:34px;font-size:16px}
.cm b{font-size:13px} .cm p{margin:3px 0 0;font-size:14px;white-space:pre-wrap}
.cbox{display:flex;gap:8px;margin-top:10px}
.cbox input{flex:1;padding:11px 14px;border:1px solid var(--line);border-radius:22px;outline:0}
.cbox button{background:var(--blue);color:#fff;border-radius:22px;padding:0 16px;font-weight:600}

/* --- calendar */
.cal-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-h b{font-size:17px}
.cal-h button{width:38px;height:38px;border-radius:50%;background:#fff;font-size:18px}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.cal .dw{font-size:11px;color:var(--muted);padding:4px 0}
.cal .d{height:42px;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px;position:relative;cursor:pointer}
.cal .d.today{border:2px solid var(--blue)}
.cal .d.sel{background:var(--blue);color:#fff}
.cal .d .dt{width:6px;height:6px;border-radius:50%;margin-top:2px}
.cal .d.sun{color:var(--red)} .cal .d.sel.sun{color:#fff}
.legend{display:flex;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:12px}
.legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px}

/* --- attendance teacher */
.att{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:#fff;padding:12px;border-radius:14px;margin-bottom:8px}
.att .nm{flex:1;font-weight:600;font-size:14px}
.att .opts{display:flex;gap:6px;width:100%}
.att .opts button{flex:1}
.att .opts button{padding:7px 8px;border-radius:9px;font-size:12px;background:#F1F4F8;color:#5B6675}
.att .opts button.on.keldi{background:var(--green);color:#fff} .att .opts button.on.kelmadi{background:var(--red);color:#fff}
.att .opts button.on.kasal{background:var(--orange);color:#fff} .att .opts button.on.kechikdi{background:var(--yellow);color:#5a4500}

/* --- meals */
.meal-day{background:#fff;border-radius:16px;padding:14px;margin-bottom:10px}
.meal-day.today{border:2px solid var(--blue)}
.meal-day h4{margin:0 0 8px;display:flex;justify-content:space-between;align-items:center}
.meal-row{display:flex;gap:10px;padding:6px 0;font-size:14px}
.meal-row .k{width:92px;flex:none;color:var(--muted);font-size:13px}

/* --- chat */
.chat{display:flex;flex-direction:column;gap:8px;padding:14px 14px 80px}
.msg{max-width:78%;padding:10px 13px;border-radius:18px;background:#fff;font-size:14px;line-height:1.45;white-space:pre-wrap;word-wrap:break-word}
.msg.me{align-self:flex-end;background:var(--blue);color:#fff;border-bottom-right-radius:5px}
.msg.them{align-self:flex-start;border-bottom-left-radius:5px}
.msg .t{display:block;font-size:10px;opacity:.65;margin-top:4px;text-align:right}
.msg img{max-width:100%;border-radius:12px;display:block;margin-bottom:4px;cursor:zoom-in}
.msg .who{font-size:11px;font-weight:700;color:var(--blue-d);margin-bottom:2px}
.chatbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;display:flex;gap:8px;padding:10px;background:#fff;border-top:1px solid var(--line);z-index:6;align-items:center}
@media(min-width:600px){.chatbar{bottom:20px;border-radius:0 0 28px 28px}}
.chatbar input[type=text]{flex:1;padding:12px 16px;border-radius:24px;border:1px solid var(--line);outline:0}
.chatbar .send{width:44px;height:44px;border-radius:50%;background:var(--blue);color:#fff;font-size:18px}
.chatbar label{font-size:22px;cursor:pointer;padding:0 4px}
.chatbar label input{display:none}

/* --- misc */
.sect{font-size:13px;font-weight:700;color:var(--muted);margin:18px 4px 8px;text-transform:uppercase;letter-spacing:.4px}
.kv{display:flex;justify-content:space-between;padding:13px 0;border-bottom:1px solid var(--line);font-size:14px}
.kv:last-child{border:0}
.kv span{color:var(--muted)}
.seg{display:flex;background:#E6ECF3;border-radius:12px;padding:3px;margin-bottom:12px}
.seg button{flex:1;padding:9px;border-radius:10px;font-size:13px;color:#5B6675}
.seg button.on{background:#fff;color:var(--text);font-weight:700;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.code{font-family:Consolas,monospace;background:#FFF6DC;color:#7a5a00;padding:3px 8px;border-radius:6px;font-weight:700;letter-spacing:1px}
#toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%) translateY(20px);background:rgba(25,32,44,.92);color:#fff;padding:12px 18px;border-radius:12px;font-size:14px;opacity:0;pointer-events:none;transition:.25s;z-index:50;max-width:340px;text-align:center}
#toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
#viewer{position:fixed;inset:0;background:rgba(0,0,0,.92);display:none;align-items:center;justify-content:center;z-index:60}
#viewer.on{display:flex} #viewer img{max-width:100%;max-height:100%}
.sheet-bg{position:fixed;inset:0;background:rgba(10,20,35,.45);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--bg);width:100%;max-width:430px;border-radius:22px 22px 0 0;padding:18px 16px 26px;max-height:88vh;overflow:auto;animation:up .2s ease-out}
.sheet h3{margin:0 0 14px;text-align:center}
@keyframes up{from{transform:translateY(40px);opacity:.4}}
.spin{text-align:center;padding:50px;color:var(--muted)}
.steps{display:flex;gap:8px;margin-bottom:14px}
.steps span{flex:1;text-align:center;font-size:13px;padding:9px;border-radius:10px;background:#E6ECF3;color:#6B7684;font-weight:600}
.steps span.on{background:var(--blue);color:#fff}
.steps span.done{background:#E3F7EE;color:#1A9A62}
.phone-in{display:flex;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.phone-in span{padding:12px 12px;background:#F2F5F9;color:var(--text);font-weight:600;border-right:1px solid var(--line)}
.phone-in input{border:0!important;border-radius:0!important;flex:1}
.agree{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:#5B6675;line-height:1.45;margin-top:4px;cursor:pointer}
.agree input{margin-top:3px;width:18px;height:18px;flex:none}
.switch-row{display:flex;align-items:center;gap:14px;cursor:pointer}
.switch-row>div{flex:1}
.switch{appearance:none;-webkit-appearance:none;width:52px;height:30px;border-radius:30px;background:#CED6E0;position:relative;flex:none;transition:.2s;cursor:pointer;margin:0;padding:0;border:0}
.switch::after{content:'';position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.2s}
.switch:checked{background:var(--blue)} .switch:checked::after{left:25px}
.photos .ph{position:relative;cursor:pointer}
.photos .ph img{display:block}
.photos .ph span{position:absolute;left:3px;right:3px;bottom:3px;background:rgba(0,0,0,.6);color:#fff;font-size:10px;border-radius:5px;padding:2px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.photos .ph.rv img{outline:3px solid #F5A623;outline-offset:-3px}
.photos .ph.rv span{background:#F5A623}
/* til tanlash */
.langs{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:14px 0 4px}
.langs button{padding:7px 12px;border-radius:20px;background:#F0F3F7;color:var(--muted);font-size:13px;font-weight:600;border:0}
.langs button.on{background:var(--blue);color:#fff}
.langs.light button{background:rgba(255,255,255,.18);color:#fff}
.langs.light button.on{background:#fff;color:var(--blue-d)}
.ioshint{margin:14px 0 0;background:rgba(255,255,255,.18);color:#fff;border-radius:14px;padding:12px 14px;font-size:13px;line-height:1.45}
