:root{--bg: #fcf5f8;--card: #ffffff;--ink: #3a2532;--muted: #8e7584;--line: #ebdce3;--brand: #b9578a;--brand-2: #c96e9c;--brand-soft: #f8e6ef;--gold: #a58bd6;--gold-soft: #f0eafa;--lilac-ink: #7a5fb8;--good: #15803d;--good-soft: #e7f6ec;--warn: #b45309;--warn-soft: #fdf2e2;--bad: #be123c;--bad-soft: #fde8ee;--radius: 16px;--shadow: 0 1px 2px rgba(120, 50, 85, .06), 0 4px 16px rgba(120, 50, 85, .06);color-scheme:light}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--ink);font-family:Tajawal,system-ui,sans-serif;font-size:16px;line-height:1.6;-webkit-tap-highlight-color:transparent}a{color:var(--brand);text-decoration:none}h1,h2,h3{margin:0 0 .4em;line-height:1.3}h2{font-size:1.4rem}h3{font-size:1.08rem}p{margin:0 0 .5em}small{font-size:.82rem}.muted{color:var(--muted)}.center{text-align:center}.small-text{font-size:.88rem}input,select,textarea,button{font:inherit;color:inherit}input:not([type=checkbox]),select,textarea{width:100%;padding:.6em .8em;border:1px solid var(--line);border-radius:12px;background:#fff;min-height:44px}input[type=color]{padding:4px}input:focus,select:focus,textarea:focus{outline:2px solid var(--brand-2);outline-offset:-1px}input[type=checkbox]{width:22px;height:22px;accent-color:var(--brand)}.btn{border:1px solid var(--line);background:#fff;padding:.55em 1.1em;border-radius:12px;cursor:pointer;font-weight:700;min-height:42px;white-space:nowrap}.btn:hover{border-color:var(--brand-2)}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.primary:hover{background:var(--brand-2)}.btn.danger{color:var(--bad)}.btn.ghost{border-color:transparent;background:transparent}.btn.small{padding:.3em .8em;min-height:34px;font-size:.88rem}.btn.block{width:100%}.btn:disabled{opacity:.5;cursor:not-allowed}.icon-btn{border:none;background:none;cursor:pointer;color:var(--muted);font-size:1rem;padding:4px 8px}.shell{min-height:100vh}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:16px;padding:10px 20px;background:#fff;color:var(--ink);border-bottom:1px solid var(--line);flex-wrap:wrap}.brand{display:flex;align-items:center;gap:10px}.brand img{width:36px;height:36px;border-radius:10px}.brand div{display:flex;flex-direction:column;line-height:1.2}.brand b{color:var(--brand)}.brand small{color:var(--muted)}.topnav{display:flex;gap:4px;flex-wrap:wrap;flex:1}.topnav a{color:var(--muted);padding:6px 12px;border-radius:10px;font-weight:500;font-size:.95rem;display:inline-flex;align-items:center;gap:6px}.topnav a:hover{color:var(--brand)}.topnav a.active{background:var(--brand-soft);color:var(--brand)}.who{display:flex;align-items:center;gap:6px;margin-inline-start:auto}.who-name{color:var(--ink);font-weight:700;display:inline-flex;align-items:center;gap:6px}.who .btn.ghost{color:var(--muted);display:inline-flex;align-items:center;gap:4px}.main{max-width:1150px;margin:0 auto;padding:20px 16px 40px}.with-bottom .main{max-width:640px;padding-bottom:100px}.bottomnav{position:fixed;bottom:0;inset-inline:0;display:flex;justify-content:space-around;background:#fff;border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));z-index:10}.bottomnav a{display:flex;flex-direction:column;align-items:center;font-size:.78rem;color:var(--muted);padding:4px 10px;border-radius:12px;min-width:64px}.bottomnav a.active{color:var(--brand);background:var(--brand-soft);font-weight:700}.bn-icon{font-size:1.35rem;line-height:1.2}.page{display:flex;flex-direction:column;gap:14px}.page.narrow{max-width:720px;margin:0 auto}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.head-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.head-tools input,.head-tools select{width:auto;min-width:140px}.page-alert{margin-bottom:12px}.card{background:var(--card);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow);border:1px solid #f3e6ec}.loading,.empty{text-align:center;color:var(--muted);padding:40px 10px}.alert{padding:10px 14px;border-radius:12px;background:var(--brand-soft)}.alert.good{background:var(--good-soft);color:var(--good)}.alert.warn{background:var(--warn-soft);color:var(--warn)}.alert.bad{background:var(--bad-soft);color:var(--bad)}.badge{display:inline-block;padding:2px 10px;border-radius:99px;font-size:.8rem;background:#f6eef2;font-weight:500}.badge.good{background:var(--good-soft);color:var(--good)}.badge.warn{background:var(--warn-soft);color:var(--warn)}.badge.bad{background:var(--bad-soft);color:var(--bad)}.badges{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.hello h2{margin-bottom:0}.stats-row{display:flex;gap:12px}.stats-row.wrap{flex-wrap:wrap}.stats-row.wrap .stat{flex:1 1 180px}.stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;flex:1}.stat.grow{flex:2;align-items:stretch;text-align:start}.stat-line{display:flex;justify-content:space-between;align-items:center;gap:8px}.huge{font-size:1.8rem;line-height:1.1;color:var(--brand)}.ring{position:relative}.ring svg{transform:rotate(-90deg);width:100%;height:100%}.ring circle{fill:none;stroke-width:10}.ring-bg{stroke:var(--brand-soft)}.ring-fg{stroke:var(--brand);stroke-linecap:round;transition:stroke-dasharray .4s}.ring-text{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1}.ring-text b{font-size:1.3rem}.bar{position:relative;height:10px;background:var(--brand-soft);border-radius:99px;overflow:visible;margin:4px 0}.bar-fill{height:100%;background:var(--brand);border-radius:99px;transition:width .4s}.bar-mark{position:absolute;top:-4px;bottom:-4px;width:3px;background:var(--gold);border-radius:2px}.credit-card{display:flex;gap:12px;align-items:center;background:var(--gold-soft);border-color:#ddd0f3;color:var(--ink)}.credit-card div{display:flex;flex-direction:column}.credit-card.off{background:#f8f1f4}.big{font-size:2rem}.note-card{background:#f0eafa;border-color:#ddd0f3}.review-card.good{background:var(--good-soft)}.review-card.warn{background:var(--warn-soft)}.review-card.bad{background:#fbf3f5}.intro-card{background:var(--brand);border-color:var(--brand);color:#fff}.intro-card .muted{color:#fbe3ee}.tabs{display:flex;gap:6px;overflow-x:auto}.tab{border:1px solid var(--line);background:#fff;border-radius:12px;padding:6px 14px;cursor:pointer;white-space:nowrap;font-weight:500}.tab small{color:var(--muted)}.tab.on{background:var(--brand);border-color:var(--brand);color:#fff}.tab.on small{color:#f0d3e1}.group h3{margin:6px 4px 8px}.items{display:flex;flex-direction:column;gap:8px}.item{display:flex;align-items:center;gap:12px;background:#fff;border-radius:14px;padding:12px 14px;border:1px solid #f3e6ec;transition:background .2s}.item.done{background:var(--brand-soft);border-color:#f0d3e1}.item.pick{cursor:pointer}.item.locked{opacity:.6}.item-main{flex:1;display:flex;flex-direction:column;min-width:0}.check-btn{width:48px;height:48px;border-radius:50%;border:2px solid var(--line);background:#fff;cursor:pointer;font-size:1.4rem;color:#fff;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}.check-btn.small{width:30px;height:30px;font-size:1rem}.check-btn.on{background:var(--brand);border-color:var(--brand)}.pill-btn{border:2px solid var(--line);background:#fff;border-radius:99px;padding:8px 14px;cursor:pointer;font-weight:700;white-space:nowrap}.pill-btn.on{background:var(--brand);border-color:var(--brand);color:#fff}.stepper{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.stepper>button:not(.full-btn){width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:#fff;font-size:1.3rem;cursor:pointer}.stepper-val{min-width:52px;text-align:center;font-weight:800;font-size:1.1rem}.stepper-val small{color:var(--muted);font-weight:400}.full-btn{border:none;background:var(--gold-soft);color:var(--lilac-ink);border-radius:99px;padding:6px 10px;font-weight:700;cursor:pointer;font-size:.82rem}button:disabled{cursor:not-allowed;opacity:.5}.target-pick{display:flex;align-items:center;gap:6px}.target-pick select{width:auto;min-height:36px;padding:4px 8px}.sticky-bar{position:sticky;bottom:12px;display:flex;flex-direction:column;gap:8px;padding-top:8px}.sticky-bar .btn{box-shadow:0 6px 20px #b9578a47;min-height:52px;font-size:1.05rem}.plain-list{list-style:none;margin:0;padding:0}.plain-list li{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #f6edf1;flex-wrap:wrap}.plain-list li:last-child{border-bottom:none}.plain-list li>span:first-child{flex:1;min-width:140px}.plain-list.compact li{padding:5px 0}.grow-1{flex:1;min-width:100px}.mini-bar{width:90px;height:6px;background:var(--brand-soft);border-radius:99px;overflow:hidden}.mini-bar span{display:block;height:100%;background:var(--brand-2)}.week-chart{display:flex;gap:6px;align-items:flex-end;margin:10px 0}.wc-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:.75rem}.wc-track{width:100%;max-width:34px;height:90px;background:#f5ecf0;border-radius:8px;display:flex;align-items:flex-end;overflow:hidden}.wc-fill{width:100%;background:#e7b9cf;border-radius:8px}.wc-fill.good{background:var(--brand)}.steps{margin:0;padding-inline-start:20px}.steps li{margin-bottom:6px}.board{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.board li{display:flex;align-items:center;gap:12px;background:#fff;border-radius:14px;padding:10px 14px;border:1px solid #f3e6ec}.board li.me{border-color:var(--gold);background:var(--gold-soft)}.rank{width:34px;text-align:center;font-weight:800;font-size:1.2rem}.board-name{flex:1;display:flex;flex-direction:column}.board-val{color:var(--brand)}.me-rank{text-align:center;background:var(--gold-soft)}.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.student-card{color:var(--ink);display:flex;flex-direction:column;gap:4px}.student-card:hover{border-color:var(--brand-2)}.inactive{opacity:.55}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.note-form{display:flex;gap:8px;align-items:flex-start;margin-bottom:8px}.table-wrap{overflow-x:auto;background:#fff;border-radius:var(--radius);border:1px solid #f3e6ec}.card .table-wrap{border:none}.table{width:100%;border-collapse:collapse;font-size:.93rem}.table th,.table td{padding:10px 12px;text-align:start;border-bottom:1px solid #f6edf1;vertical-align:middle}.table th{background:#fdf9fb;font-weight:700;color:var(--muted);white-space:nowrap}.row-actions{white-space:nowrap;text-align:end!important}.row-actions .btn{margin-inline-start:4px}.form{display:flex;flex-direction:column;gap:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:flex;flex-direction:column;gap:4px}.field.full{grid-column:1 / -1}.field.check{flex-direction:row;align-items:center;gap:10px;grid-column:1 / -1}.field-label{font-weight:500;font-size:.92rem}.actions{display:flex;gap:8px}.chips{display:flex;flex-wrap:wrap;gap:6px}.chip{border:1px solid var(--line);background:#fff;border-radius:99px;padding:4px 12px;cursor:pointer}.chip.on{background:var(--brand);color:#fff;border-color:var(--brand)}.modal-back{position:fixed;top:0;right:0;bottom:0;left:0;background:#32142373;display:flex;align-items:center;justify-content:center;z-index:50;padding:16px}.modal{background:#fff;border-radius:18px;padding:18px;width:100%;max-width:480px;max-height:92vh;overflow-y:auto}.modal.wide{max-width:720px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.setting{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:10px 0;border-bottom:1px solid #f6edf1}.setting:last-child{border-bottom:none}.setting>span{display:flex;flex-direction:column;flex:1}.setting input:not([type=checkbox]),.setting select{width:140px;flex-shrink:0}@media(max-width:720px){.topbar{padding:8px 12px;gap:8px}.topnav{order:3;flex-basis:100%;overflow-x:auto;flex-wrap:nowrap}.topnav a{white-space:nowrap;font-size:.88rem}.main{padding:14px 12px 40px}.two-col,.form-grid{grid-template-columns:1fr}.stats-row:not(.wrap) .stat:not(.grow){flex:0 0 auto}.head-tools{width:100%}.head-tools input,.head-tools select{flex:1}.table thead{display:none}.table tr{display:block;border-bottom:1px solid var(--line);padding:8px 0}.table td{display:flex;justify-content:space-between;gap:10px;border:none;padding:4px 12px}.table td[data-label]:before{content:attr(data-label);color:var(--muted);font-size:.82rem}.row-actions{justify-content:flex-end!important}.item,.setting{flex-wrap:wrap}}.ic{flex-shrink:0;vertical-align:-.18em}.ic-tile{width:36px;height:36px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;background:var(--brand-soft);color:var(--brand);flex-shrink:0}.item.done .ic-tile{background:#fff}.group-head{display:flex;align-items:center;gap:8px;margin:6px 4px 8px;font-size:1.05rem}.group-head .ic-tile{width:30px;height:30px;border-radius:9px}.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:6px}.icon-grid button{height:44px;border-radius:11px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer;display:flex;align-items:center;justify-content:center}.icon-grid button.on{background:var(--brand);border-color:var(--brand);color:#fff}.accent-ic{color:var(--lilac-ink)}.streak-ic{color:#e2702f}.medal-1{color:#d9a21b}.medal-2{color:#9aa3ad}.medal-3{color:#c07a45}.auth{min-height:100vh;display:grid;grid-template-columns:minmax(380px,46%) 1fr;background:#fff}.auth-panel{position:relative;background-color:#7d3560;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64'><g fill='none' stroke='white' stroke-opacity='0.09' stroke-width='1'><rect x='18' y='18' width='28' height='28'/><rect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/><circle cx='32' cy='32' r='6'/><path d='M0 0L10 10M64 0L54 10M0 64L10 54M64 64L54 54'/></g></svg>");color:#fff;display:flex;align-items:center;justify-content:center;padding:48px 40px}.auth-panel-inner{max-width:420px;display:flex;flex-direction:column;gap:22px}.auth-logo{width:60px;height:60px;border-radius:16px;box-shadow:0 0 0 6px #ffffff14}.auth-title{font-family:Amiri,serif;font-weight:700;font-size:2.7rem;line-height:1.35;margin:0}.auth-verse{font-family:Amiri,serif;font-size:1.3rem;line-height:2;color:#f9dceb;margin:0;padding-inline-start:16px;border-inline-start:2px solid rgba(255,255,255,.35);border-radius:0}.auth-verse small{display:block;font-family:Tajawal,sans-serif;font-size:.82rem;line-height:1.4;color:#ffffffa6}.auth-features{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-direction:column;gap:14px}.auth-features li{display:flex;gap:12px;align-items:center}.auth-features li>span:last-child{display:flex;flex-direction:column;line-height:1.4}.auth-features small{color:#ffffffb3}.auth-feature-ic{width:40px;height:40px;border-radius:12px;background:#ffffff1f;display:flex;align-items:center;justify-content:center;flex-shrink:0}.auth-main{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;padding:40px 24px}.auth-form{width:100%;max-width:360px;display:flex;flex-direction:column;gap:18px}.auth-head h2{font-size:1.6rem;margin-bottom:2px}.auth-head p{color:var(--muted);margin:0}.auth-field{display:flex;flex-direction:column;gap:6px}.auth-field>span{font-weight:500;font-size:.92rem}.auth-input{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:14px;padding:0 14px;background:#fff;color:var(--muted);transition:border-color .15s,box-shadow .15s}.auth-input:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft);color:var(--brand)}.auth-input input{border:none!important;outline:none!important;padding:0!important;min-height:50px;background:transparent;color:var(--ink);text-align:right}.auth-input input::placeholder{color:#c9b6c0}.auth-eye{border:none;background:none;color:var(--muted);cursor:pointer;padding:6px;display:flex}.auth-submit{min-height:52px;font-size:1.05rem;border-radius:14px;margin-top:4px}.auth-note{text-align:center;color:var(--muted);font-size:.88rem;line-height:1.8;margin:0}@media(max-width:860px){.auth{grid-template-columns:1fr;background:#7d3560}.auth-panel{padding:40px 24px 72px;text-align:center}.auth-panel-inner{align-items:center;gap:14px}.auth-title{font-size:2.1rem}.auth-verse{font-size:1.1rem;border:none;padding:0}.auth-features{display:none}.auth-main{background:#fff;border-radius:28px 28px 0 0;margin-top:-40px;align-items:flex-start;padding:32px 22px 40px}}
