/* Ma'alim Companion · parent Home tab and the bottom tab bar */

/* tabs */
.app.fam-app{padding-bottom:calc(110px + env(safe-area-inset-bottom))}
.fpane{display:flex;flex-direction:column;gap:12px}
.ftabs{position:fixed;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:5;width:min(340px,calc(100% - 32px));height:66px;padding:7px;border-radius:999px;background:var(--ink);box-shadow:0 18px 30px -12px rgba(14,17,22,.55)}
.ftabs>div{position:relative;height:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.fpill{position:absolute;top:0;left:0;width:33.333%;height:100%;border-radius:999px;background:#fff;transition:transform .45s cubic-bezier(.3,1.35,.5,1)}
.ftabs button{position:relative;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:14.5px;font-weight:800;color:#C9CBD2;transition:color .3s}
.ftabs button[aria-current=page]{color:var(--ink)}
.ftabs button:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* gauges */
.hm-g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;animation:rise .45s ease-out .05s both}
.hm-g.one{grid-template-columns:1fr}
.hm-gauge{height:128px;border-radius:24px;background:#fff;box-shadow:0 6px 16px -10px rgba(14,17,22,.35);padding:12px;display:flex;flex-direction:column;align-items:center;overflow:hidden}
.hm-gauge:disabled{opacity:1}
.hm-arc{position:relative;display:block;flex-shrink:0}
.hm-arc svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.hm-arc b{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:baseline;gap:1px;font-size:46px;font-weight:800;letter-spacing:-.05em;line-height:.86}
.hm-arc b i{font-style:normal;font-size:15px;font-weight:800;color:#8A9099;letter-spacing:0}
.hm-fill{animation:hmArc 1.3s cubic-bezier(.2,.8,.2,1) .3s both}
.hm-knob{animation:hmPop .3s ease-out 1.4s both;transform-box:fill-box;transform-origin:center}
.hm-lab{margin-top:auto;display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:11px;font-weight:800;letter-spacing:.1em;color:var(--mute)}
.hm-lab .chip,.hm-top .chip{letter-spacing:0}
.chip.gold:not(.hz *){background:#FDF0D5;color:#6B4A00} .chip.warn:not(.hz *){background:#FBE7D6;color:#7A3A06} .chip.gray:not(.hz *){background:var(--field);color:var(--ink2)}
@keyframes hmArc{from{stroke-dashoffset:100}}
@keyframes hmPop{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}

/* this week */
.hm-week{padding:16px 16px 6px!important;display:flex;flex-direction:column;animation:rise .45s ease-out .1s both}
.hm-strip{position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin-bottom:14px}
.hm-pill{position:absolute;top:20px;left:0;width:16.666%;display:flex;justify-content:center;transition:transform .45s cubic-bezier(.3,1.35,.5,1)}
.hm-pill i{width:44px;height:44px;border-radius:50%;background:var(--ink)}
.hm-strip button{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px}
.hm-strip span{height:16px;line-height:16px;font-size:13px;font-weight:600;color:var(--mute)}
.hm-strip b{width:44px;height:44px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;color:var(--ink);transition:color .3s}
.hm-strip .hm-later span,.hm-strip .hm-later b{color:#9AA0A9}
.hm-strip .hm-today:not([aria-selected=true]) b{box-shadow:inset 0 0 0 1.5px var(--ink);border-radius:50%}
.hm-strip [aria-selected=true] b{color:#fff}
.hm-seg button{height:42px!important;font-size:14px!important}
.hm-list{display:flex;flex-direction:column}
.hm-list.swap{animation:hmSwap .3s ease-out both}
.hm-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.hm-row>div{flex-grow:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.hm-row b{font-size:16px;font-weight:800;line-height:1.25}
.hm-row>div span{font-size:13px;font-weight:600;color:var(--mute);line-height:1.35}
.hm-row.soon b{font-size:15px;color:var(--ink2)}
.hm-row .bar{flex:none;width:4px;align-self:stretch;border-radius:4px}
.bar.gold{background:#D99A2B} .bar.red{background:#D9583B} .bar.gray{background:#C9CDD3}
.bar.dash{background:repeating-linear-gradient(#C9CDD3 0 4px,transparent 4px 7px)}
.hm-row .mk{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:12px;font-weight:700;color:var(--mute)}
.hm-row .mk b{font-size:14px;color:var(--ink)}
.hm-next{display:flex;align-items:center;gap:10px;min-height:50px;width:100%;text-align:left;color:var(--ink)}
.hm-next span{font-size:13.5px;font-weight:600;color:var(--mute)}
.hm-next b{flex-grow:1;text-align:right;font-size:14px;font-weight:800}
@keyframes hmSwap{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* leave and stickers */
.hm-leave{display:flex;flex-direction:column;gap:10px;animation:rise .45s ease-out .15s both}
.hm-apply{height:58px;border-radius:999px;border:2px solid var(--ink);background:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font-size:16px;font-weight:800;color:var(--ink)}
.hm-stick{display:flex;align-items:center;gap:14px;padding:4px;animation:rise .45s ease-out .2s both}
.hm-pile{display:flex;flex:none}
.hm-pile i{width:50px;height:50px;border-radius:50%;border:3px solid var(--bg);display:flex;align-items:center;justify-content:center;background:#F6EFC0}
.hm-pile i+i{margin-left:-14px;background:#DCE6FF} .hm-pile i:last-child{background:#DDF3E4}
.hm-stick>span:last-child{display:flex;flex-direction:column}
.hm-stick b{font-size:17px;font-weight:800} .hm-stick small{font-size:13.5px;font-weight:600;color:var(--mute)}

/* sheets: hifz details and the top of the attendance sheet */
.hm-top{display:flex;align-items:center;gap:16px}
.hm-top .hm-arc b{font-size:36px}
.hm-top>div{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.hm-top p{font-size:13px!important;color:var(--ink2)!important;line-height:1.4!important}
.hm-big{font-size:19px;font-weight:800}
.hm-cap{font-size:12px;font-weight:800;letter-spacing:.08em;color:var(--mute)}
.hm-parts{display:flex;flex-direction:column;gap:12px}
.hm-part{display:flex;flex-direction:column;gap:5px}
.hm-part>div{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.hm-part>div b{font-size:14.5px;font-weight:700}
.hm-part>div span{font-size:15px;font-weight:800} .hm-part>div small{font-size:13px;color:#8A9099}
.hm-part>small{font-size:12.5px;font-weight:600;color:var(--mute)}
.hm-track{display:block;height:8px;border-radius:8px;background:#F6ECD8;overflow:hidden}
.hm-track i{display:block;height:100%;border-radius:8px;background:#D99A2B;transform-origin:left;animation:hmBar .8s cubic-bezier(.2,.8,.2,1) both}
.hm-track.dark{background:#2B303A} .hm-track.dark i{background:#E9B85A}
.hm-trend{display:flex;flex-direction:column;gap:8px}
.hm-trend .cols{display:grid;gap:8px;align-items:end;height:100px}
.hm-trend .cols>div{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%}
.hm-trend .cols span{font-size:11px;font-weight:800}
.hm-trend .cols i{display:block;width:100%;border-radius:6px;background:#E9B85A;transform-origin:bottom;animation:hmCol .6s cubic-bezier(.2,.8,.2,1) both}
.hm-trend .cols i.last{background:var(--ink)}
.hm-trend .cols small{font-size:11px;font-weight:700;color:var(--mute)}
.hm-now{border-radius:18px;background:var(--ink);color:#fff;padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.hm-now .hm-cap{color:#B8BCC5}
.hm-now>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.hm-now b{font-size:21px;font-weight:800;letter-spacing:-.02em} .hm-now>div span{font-size:13px;font-weight:700}
.mleg{display:flex;gap:14px;font-size:12px;font-weight:700;color:var(--ink2)}
.mleg span{display:flex;align-items:center;gap:5px}
.mleg i{width:10px;height:10px;border-radius:3px} .mleg .p{background:#D6F0E1} .mleg .a{background:#FFD6C9} .mleg .l{background:#DCE6FF}
.fa-list h4{margin:6px 0 10px;font-size:16px;font-weight:800}
@keyframes hmBar{from{transform:scaleX(0)}}
@keyframes hmCol{from{transform:scaleY(0)}}

@media (prefers-reduced-motion: reduce){
  .hm-fill,.hm-knob,.hm-track i,.hm-trend .cols i,.hm-list.swap,.hm-g,.hm-week,.hm-leave,.hm-stick{animation:none!important}
  .fpill,.hm-pill{transition:none}
}

/* get the app / notifications */
.hm-su{border-radius:22px;background:#fff;box-shadow:0 6px 16px -10px rgba(14,17,22,.35);padding:16px;display:flex;flex-direction:column;gap:12px;animation:rise .45s ease-out both}
.hm-su b{font-size:16px;font-weight:800}
.hm-su p{margin:4px 0 0;font-size:13.5px;font-weight:600;color:var(--mute);line-height:1.45}
.hm-su p b{font-size:13.5px;color:var(--ink)}
.hm-su-a{display:flex;align-items:center;gap:10px}
.hm-su-a .btn{flex:1;height:46px!important;font-size:14.5px!important}
.hm-su-a .link{box-shadow:none;background:var(--field)}
#hmSetup{display:flex;flex-direction:column;gap:10px}
#hmSetup:empty{display:none}

/* parent header: name with a thin switch pill; class and sign out on the right */
.ftop{align-items:flex-start!important}
.ftop img{width:44px!important;height:50px!important}
.ftop .who{gap:8px!important}
.ftop .who b{font-size:19px!important;line-height:1.18!important}
.fside{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none}
.stdchip{height:26px;padding:0 10px;border-radius:999px;background:var(--ink);color:#fff;display:inline-flex;align-items:center;font-size:12.5px;font-weight:800}
.kidswap{align-self:flex-start;height:28px;padding:0 12px 0 9px;border-radius:999px;background:#fff;box-shadow:0 2px 6px -3px rgba(14,17,22,.3);display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:var(--ink2)}
.app.fam-app{gap:12px}
#hmPrac:empty{display:none}
.kidlist{display:flex;flex-direction:column}
.kidlist button{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:54px;border-bottom:1px solid var(--line);text-align:left}
.kidlist b{font-size:15px;font-weight:800} .kidlist span{font-size:13px;font-weight:700;color:var(--mute)}
