/* V18.8 SAFE R3 — premium visual-only layer. No navigation/business logic changes. */
:root{
  --r3-green:#0a5f4f;--r3-green2:#0f7762;--r3-green3:#164f44;
  --r3-gold:#d5a341;--r3-gold2:#f0c66b;--r3-cream:#fffaf0;--r3-paper:#fffdf8;
  --r3-line:#dfd4c4;--r3-ink:#183f37;--r3-muted:#6f6b63;
  --r3-shadow:0 14px 34px rgba(19,66,56,.10);--r3-shadow-soft:0 8px 22px rgba(19,66,56,.07)
}
html,body{background:radial-gradient(circle at 88% 0,#eef5ef 0,transparent 28%),linear-gradient(145deg,#f9f7f0,#eff4ef)!important;color:#263d38!important}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.wrap{max-width:1320px!important;padding:clamp(12px,2.4vw,24px)!important}
.card{background:rgba(255,253,248,.985)!important;border:1px solid var(--r3-line)!important;box-shadow:var(--r3-shadow-soft)!important;border-radius:22px!important}
.primary{background:linear-gradient(135deg,var(--r3-green),var(--r3-green2))!important;color:#fff!important;box-shadow:0 8px 18px rgba(10,95,79,.18)!important}
.secondary{background:linear-gradient(180deg,#fffdf7,#f8f2e7)!important;color:var(--r3-green3)!important;border:1px solid #ddcfb8!important}
.primary,.secondary,.danger,.ghost{min-height:44px!important;border-radius:13px!important;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.field input,.field select,.field textarea,.setting input,.setting select{border-color:#d8dfda!important;background:#fff!important;border-radius:13px!important}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#6cae9d!important;box-shadow:0 0 0 3px rgba(39,123,101,.12)!important}
.top{background:rgba(255,253,248,.96)!important;border-bottom-color:#e2ded4!important;box-shadow:0 5px 20px rgba(35,61,54,.05)!important}
.brand .logo{background:linear-gradient(145deg,var(--r3-green),#153f36)!important;box-shadow:0 6px 16px rgba(8,74,61,.20)!important}
.tabs,.subtabs{background:#eef4f0!important;border-radius:14px!important;padding:5px!important}
.tabs button,.subtabs button{min-height:42px!important;border-radius:11px!important;color:#345a50!important}
.tabs button.on,.subtabs button.on{background:#fffdf8!important;color:var(--r3-green)!important;box-shadow:0 4px 12px rgba(22,70,58,.08)!important}

/* LOGIN — same original controls, stronger premium composition and contrast. */
#loginScreen{background:radial-gradient(circle at 18% 18%,#eef5ef 0,transparent 30%),linear-gradient(145deg,#fbf8f0,#edf4ef)!important}
#loginScreen .loginbox{border-radius:28px!important;border:1px solid #ddd7cc!important;box-shadow:0 26px 70px rgba(21,62,52,.13)!important;max-width:1000px!important}
#loginScreen .loginart{position:relative!important;isolation:isolate!important;overflow:hidden!important;background:#0b5e4e!important;color:#fff!important;padding:clamp(30px,4vw,48px)!important}
#loginScreen .loginart:before{content:"";position:absolute;inset:0;z-index:-2;background:url('./ui194/login_kid.webp') center/cover no-repeat!important;transform:none!important;animation:none!important;filter:saturate(1.05) contrast(1.03)!important}
#loginScreen .loginart:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(100deg,rgba(4,55,45,.94) 0%,rgba(4,55,45,.75) 46%,rgba(4,55,45,.25) 100%)!important}
#loginScreen .loginart h1{font-size:clamp(27px,3vw,38px)!important;line-height:1.25!important;color:#fff!important;text-shadow:0 2px 9px rgba(0,0,0,.28)!important}
#loginScreen .loginart p{color:#fff!important;font-weight:700!important;line-height:1.85!important;text-shadow:0 2px 8px rgba(0,0,0,.26)!important}
#loginScreen .loginform{background:linear-gradient(180deg,#fffdf9,#fffaf0)!important;padding:clamp(24px,4vw,42px)!important}
#loginScreen .accessAction{transform:none!important;animation:none!important;background:linear-gradient(180deg,#fffefb,#faf4e9)!important;border:1px solid #dfd2bd!important;box-shadow:0 6px 18px rgba(34,64,55,.06)!important;border-radius:17px!important}
#loginScreen .accessAction:hover{transform:none!important}
#loginScreen .accessAction.primaryAccess{background:linear-gradient(135deg,var(--r3-green),var(--r3-green2))!important;border-color:transparent!important;box-shadow:0 10px 23px rgba(11,103,84,.20)!important}
#loginScreen .accessAction.primaryAccess b,#loginScreen .accessAction.primaryAccess small{color:#fff!important}
#loginScreen .idLoginBox{background:#fff!important;border:1px solid #dce3df!important;box-shadow:0 8px 22px rgba(28,68,57,.05)!important;border-radius:18px!important}
#loginScreen .idLoginBox label{color:var(--r3-green3)!important}
#loginScreen .securityLine{display:none!important}

/* HOME HERO */
#home .hero{gap:14px!important}
#home .hero>.card{background:linear-gradient(145deg,#fffdf8,#f8fbf8)!important}
#home .hero>.card:first-child{position:relative!important;padding-inline-end:112px!important;min-height:148px!important;border-top:3px solid rgba(213,163,65,.65)!important}
#home .hero h2,#home .hero h3{color:var(--r3-ink)!important}
#home .stat{background:linear-gradient(180deg,#fffdf9,#f7f2e8)!important;border-color:#ded6c8!important}
#home .stat b{color:var(--r3-green)!important}
.safeProfileButton{position:absolute;inset-inline-end:19px;top:18px;width:78px;height:78px;border-radius:50%;border:3px solid var(--r3-gold);background:#fff;padding:0;overflow:hidden;cursor:pointer;box-shadow:0 8px 22px rgba(19,71,58,.14)}
.safeProfileButton img{width:100%;height:100%;object-fit:cover;display:block;transform:none!important;animation:none!important}
.safeProfileButton[hidden]{display:none!important}.safeProfileHint{position:absolute;inset-inline-end:12px;top:100px;width:92px;text-align:center;font-size:10px;color:#67736e;font-weight:800}.safeProfileHint[hidden]{display:none!important}

/* ORIGINAL MODULE CARDS — unchanged onclick/buttons, improved only visually. */
#modules.grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;align-items:stretch!important}
#modules .module,#modules .module:hover{transform:none!important;animation:none!important;transition:border-color .14s ease,box-shadow .14s ease!important}
#modules .module.card{min-height:226px!important;padding:16px!important;overflow:hidden!important;position:relative!important;background:linear-gradient(180deg,#fffdf9,#fbf8f1)!important;border:1px solid #dfd6c8!important;box-shadow:var(--r3-shadow-soft)!important}
#modules .module.card:before{content:""!important;position:absolute!important;inset-inline-start:0!important;top:0!important;width:4px!important;height:100%!important;background:linear-gradient(180deg,var(--r3-gold2),var(--r3-green2))!important;opacity:.85!important}
#modules .module:hover{box-shadow:var(--r3-shadow)!important;border-color:#c7d9d1!important}
#modules .module>div:first-child{min-width:0!important}
#modules .module .ico{width:94px!important;height:76px!important;min-width:94px!important;border-radius:20px!important;background-color:#eaf2ed!important;background-position:center!important;background-repeat:no-repeat!important;background-size:cover!important;border:1px solid #cbd9d2!important;box-shadow:0 8px 18px rgba(19,68,56,.11),inset 0 0 0 1px rgba(255,255,255,.45)!important;font-size:0!important;overflow:hidden!important;filter:saturate(1.08) contrast(1.035)!important;transform:none!important;animation:none!important}
#modules .module h3{margin:12px 0 5px!important;font-size:18px!important;color:var(--r3-green3)!important;line-height:1.38!important;letter-spacing:0!important}
#modules .module p{margin:0!important;color:var(--r3-muted)!important;line-height:1.65!important;font-size:13px!important;min-height:44px!important}
#modules .module>button{position:relative!important;z-index:2!important;margin-top:12px!important;width:100%!important;min-height:44px!important;background:linear-gradient(180deg,#fffdf8,#f7f0e5)!important;color:var(--r3-green)!important;border:1px solid #decdb3!important;font-weight:900!important;box-shadow:none!important}
#modules .module>button:active{background:#eef5f1!important}

/* Other surfaces: coherent premium identity, still light enough for low-end Android. */
.sectionbox,.activitypanel,.performanceTitleCard{border-color:#ddd5c9!important;box-shadow:var(--r3-shadow-soft)!important}
.activity{border-color:#e2d7c7!important;box-shadow:0 7px 18px rgba(28,67,57,.05)!important}
.activity:hover{transform:none!important;box-shadow:0 9px 22px rgba(28,67,57,.07)!important}
.activity .ico{background:linear-gradient(145deg,#f4faf6,#fff8e9)!important;border-color:#d7dfd8!important;box-shadow:none!important}
.head h2,.head h3,.performanceTitleCard h2{color:var(--r3-green3)!important}
.table th{color:#315c51!important;background:#f6f8f5!important;position:sticky;top:0}
.table td,.table th{border-bottom-color:#ece6dc!important}
.reportcards,#studentReportCards,#reportCards{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
.reportcards .stat,#studentReportCards .stat,#reportCards .stat{background:linear-gradient(180deg,#fffdf8,#f7f3eb)!important;border-color:#ded7cc!important;min-width:0!important}
.reportcards .stat b,#studentReportCards .stat b,#reportCards .stat b{color:var(--r3-green)!important;word-break:break-word}
.progressline{background:#e7e4dc!important}.progressline i{background:linear-gradient(90deg,var(--r3-green2),var(--r3-gold))!important}
.qrBox{border:1px solid #d7e1dc!important}.qrGalleryBox{background:#f7faf8!important;border-color:#d4e0da!important}

/* Avoid expensive visual effects on touch/mobile by default. */
@media(pointer:coarse){
  .top{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  #modules .module,#modules .module:hover,.activity,.activity:hover{transition:none!important;transform:none!important}
}
@media(max-width:980px){
  #modules.grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .wrap{padding:11px!important}
  .top{padding:8px 11px!important}
  #modules.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  #modules .module.card{min-height:205px!important;padding:12px!important;border-radius:18px!important}
  #modules .module .ico{width:82px!important;height:66px!important;min-width:82px!important;border-radius:17px!important}
  #modules .module h3{font-size:15.5px!important;margin-top:9px!important}
  #modules .module p{font-size:11.8px!important;line-height:1.55!important;min-height:38px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  #modules .module>button{min-height:42px!important;margin-top:9px!important}
  #home .hero>.card:first-child{padding-inline-end:91px!important;min-height:132px!important}
  .safeProfileButton{width:62px;height:62px;inset-inline-end:14px;top:15px}.safeProfileHint{inset-inline-end:4px;top:80px;width:82px}
  .reportcards,#studentReportCards,#reportCards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .table th,.table td{font-size:12px!important;padding:9px!important}
  .primary,.secondary,.danger,.ghost{min-height:46px!important}
}
@media(max-width:380px){
  #modules.grid{grid-template-columns:1fr!important}
  #modules .module.card{min-height:auto!important;display:grid!important;grid-template-columns:82px 1fr!important;grid-template-areas:'ico text' 'btn btn'!important;column-gap:12px!important;align-items:center!important}
  #modules .module>div:first-child{display:contents!important}
  #modules .module .ico{grid-area:ico!important;width:82px!important;height:70px!important}
  #modules .module h3,#modules .module p{grid-column:2!important}
  #modules .module h3{align-self:end!important;margin:0 0 2px!important}
  #modules .module p{align-self:start!important;min-height:0!important}
  #modules .module>button{grid-area:btn!important}
}

/* Adaptive low-power mode: visual only. */
.safeLowPower .card,.safeLowPower #modules .module.card,.safeLowPower .activity,.safeLowPower .sectionbox{box-shadow:none!important}
.safeLowPower #modules .module .ico{filter:none!important;box-shadow:0 2px 6px rgba(20,60,50,.07)!important}
.safeLowPower *{scroll-behavior:auto!important}
.safeLowPower .top{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

#v188FinalBanner{display:none!important}
