/* Terra do Saber — official brand assets layer */

/* Use the official logo artwork without redrawing it. */
.brand-lockup{
  width:190px;
  min-width:190px;
  height:54px;
  background:url('assets/logo-email-terra-do-saber.png?v=4') left center/contain no-repeat!important;
}
.brand-lockup img{visibility:hidden!important}
.brand-lockup>.brand-flower,.brand-lockup>.brand-copy{display:none!important}

/* Bring the real Sementinhas into the dashboard while keeping the UI readable. */
.dashboard-art{
  position:relative;
  min-height:230px!important;
  border-radius:24px!important;
  overflow:hidden!important;
  background:
    linear-gradient(90deg,rgba(255,253,250,.12),rgba(255,253,250,0)),
    url('assets/mascots-hero.webp') center right/cover no-repeat!important;
  box-shadow:inset 0 0 0 1px rgba(111,63,41,.06),0 12px 30px rgba(78,48,34,.08);
}
.dashboard-art .art-leaf,.dashboard-art .art-book,.dashboard-art .art-sun{display:none!important}
.dashboard-art small{
  position:absolute!important;
  left:18px!important;
  bottom:18px!important;
  max-width:155px;
  padding:9px 11px;
  border-radius:12px;
  background:rgba(255,253,250,.88);
  backdrop-filter:blur(8px);
  color:#744126!important;
  font-weight:800!important;
  line-height:1.25!important;
  box-shadow:0 5px 18px rgba(79,48,34,.07);
}

/* Make the login feel like the same product, not a separate utility page. */
.login-wrap{
  background:
    radial-gradient(circle at 12% 10%,rgba(211,141,184,.18),transparent 26%),
    radial-gradient(circle at 90% 88%,rgba(238,128,104,.16),transparent 28%),
    #fbf8f5!important;
}
.login-card{position:relative;overflow:hidden;padding-top:98px!important}
.login-card:before{
  content:'';
  position:absolute;
  left:28px;top:22px;
  width:190px;height:58px;
  background:url('assets/logo-email-terra-do-saber.png?v=4') left center/contain no-repeat!important;
}
.login-logo{content:url('assets/logo-email-terra-do-saber.png?v=4')!important}
.login-card:after{
  content:'';
  position:absolute;
  width:110px;height:110px;
  right:-42px;top:-38px;
  border-radius:43% 57% 63% 37%/56% 37% 63% 44%;
  background:linear-gradient(145deg,rgba(211,141,184,.22),rgba(238,128,104,.18));
  z-index:0;
}
.login-card>*{position:relative;z-index:1}

/* Final production polish: accessibility, density and small-screen resilience. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{min-width:320px}
button,input,select,textarea{font:inherit}
button,.btn,.admin-nav button,.schedule-tabs button,.password-toggle{touch-action:manipulation}
:where(button,.btn,input,select,textarea,.student,.schedule-event):focus-visible{
  outline:3px solid rgba(238,128,104,.42)!important;
  outline-offset:2px!important;
}
header{
  z-index:50!important;
  backdrop-filter:saturate(1.15) blur(14px);
  -webkit-backdrop-filter:saturate(1.15) blur(14px);
  box-shadow:0 1px 0 rgba(111,63,41,.045);
}
main{width:100%}
.card,.stat,.student,.test,.schedule-event{min-width:0}
.card h2,.hero h1,.toolbar h2{overflow-wrap:anywhere}
.muted,.notice,.testmain small,.student small{line-height:1.5}
.table{font-variant-numeric:tabular-nums}
.table th,.table td{white-space:normal}
.table-actions{min-width:max-content}
.schedule-grid-wrap,.table{overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.schedule-grid-wrap{scrollbar-gutter:stable}
.schedule-week-toolbar .week-actions .btn{min-height:38px}
.overlay{z-index:100!important}
.modal{width:min(520px,100%)!important}
.actions{flex-wrap:wrap}
.login-card{box-shadow:0 24px 70px rgba(65,39,28,.12)!important}
.login-card input{min-height:46px}
.login-card .btn{min-height:46px}
.empty{line-height:1.5}

@media(max-width:980px){
  .brand-lockup{width:158px;min-width:158px;height:46px}
  .dashboard-art{min-height:205px!important;background-position:65% center!important}
  main{padding-left:16px!important;padding-right:16px!important}
  .admin-nav{
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -ms-overflow-style:none;
  }
  .admin-nav::-webkit-scrollbar{display:none}
  .admin-nav button{scroll-snap-align:start;flex:0 0 auto!important}
  .schedule-tabs{max-width:100%;overflow-x:auto;scrollbar-width:none}
  .schedule-tabs::-webkit-scrollbar{display:none}
}

@media(max-width:700px){
  header{min-height:66px!important;padding:9px 12px!important;align-items:center!important;gap:8px!important}
  .brand-lockup{width:142px;min-width:142px;height:43px}
  .user-name{display:none!important}
  .logout-btn{min-height:38px!important;padding:8px 11px!important;font-size:11px!important}
  main{padding:16px 12px 64px!important}
  .hero:not(.dashboard-hero){padding:18px!important;min-height:auto!important;border-radius:18px!important}
  .hero h1{font-size:25px!important;line-height:1.08!important}
  .hero p{font-size:13px!important}
  .ey{font-size:9px!important}
  .card,.stat{padding:15px!important;border-radius:16px!important}
  .grid{gap:12px!important}
  .stats{gap:10px!important}
  .toolbar{gap:9px!important}
  .toolbar .btn{width:100%}
  .table{display:block!important;overflow-x:auto!important;max-width:100%}
  .table th,.table td{padding:10px 9px!important;font-size:12px!important;min-width:94px}
  .table th{font-size:9px!important}
  .table-actions{justify-content:flex-start!important}
  .test{gap:10px!important;padding:11px!important}
  .test-actions{max-width:none!important;width:100%;justify-content:flex-start!important}
  .test-actions .btn{flex:0 0 auto}
  .schedule-filters{padding:11px!important}
  .schedule-week-toolbar{align-items:flex-start!important}
  .schedule-week-toolbar .week-actions{width:100%}
  .schedule-week-toolbar .week-actions .btn{flex:1 1 auto}
  .modal{border-radius:18px!important;padding:19px!important;max-height:calc(100dvh - 24px)!important}
  .overlay{padding:12px!important;align-items:flex-end!important}
  .actions{position:sticky;bottom:-19px;margin:18px -19px -19px!important;padding:12px 19px 16px!important;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-top:1px solid #eee5e0}
  .actions .btn{flex:1 1 120px}
  .association-item{gap:8px!important}
  .association-item button{min-height:38px}
  .login-wrap{padding:14px!important}
  .login-card{border-radius:18px!important;padding-left:22px!important;padding-right:22px!important}
}

@media(max-width:680px){
  .dashboard-art{min-height:190px!important;background-position:70% center!important}
  .dashboard-art small{display:none!important}
  .login-card{padding-top:90px!important}
  .login-card:before{width:165px;height:52px;left:22px}
}

@media(max-width:430px){
  .brand-lockup{width:126px;min-width:126px;height:39px}
  header{padding-inline:10px!important}
  main{padding-inline:10px!important}
  .stats{grid-template-columns:1fr!important}
  .stats .stat:last-child{grid-column:auto!important}
  .stat b{font-size:22px!important}
  .card{padding:14px!important}
  .admin-nav{padding:7px!important;border-radius:15px!important}
  .admin-nav:before{display:none!important}
  .admin-nav button{padding:8px 10px!important;font-size:11px!important}
  .admin-nav button:before{width:25px!important;height:25px!important;flex-basis:25px!important}
  .dashboard-art{min-height:165px!important;background-position:72% center!important;border-radius:18px!important}
  .date{width:48px!important;flex:0 0 48px}
  .test{flex-wrap:wrap}
  .testmain{min-width:calc(100% - 60px)}
  .student{padding:10px!important}
  .avatar{width:36px!important;height:36px!important;flex:0 0 36px}
  .modal h2{font-size:20px!important}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}


/* PWA installation */
.install-app-btn{
  align-items:center;
  gap:7px;
  white-space:nowrap;
  border-color:#e3d4cc!important;
  background:#fffaf7!important;
}
.install-app-btn:before{content:'↓';font-size:15px;font-weight:900;color:#ee7f68}
@media(max-width:680px){
  .install-app-btn{padding:9px 10px!important;font-size:11px!important}
  .install-app-btn:before{font-size:13px}
}
@media(display-mode:standalone){.install-app-btn{display:none!important}}

/* Mobile login background: crisp vector shapes, no soft radial haze. */
@media(max-width:700px){
  .login-wrap{
    isolation:isolate;
    background:#fbf8f5!important;
  }
  .login-wrap::before,
  .login-wrap::after{
    filter:none!important;
    -webkit-filter:none!important;
    opacity:1!important;
    z-index:0!important;
    pointer-events:none;
    box-shadow:none!important;
  }
  .login-wrap::before{
    width:310px!important;
    height:300px!important;
    left:-155px!important;
    bottom:-125px!important;
    background:#744126!important;
    border-radius:64% 36% 58% 42% / 48% 56% 44% 52%!important;
    transform:rotate(10deg);
  }
  .login-wrap::after{
    width:230px!important;
    height:220px!important;
    right:-88px!important;
    top:-78px!important;
    background:#d38db8!important;
    border-radius:43% 57% 61% 39% / 53% 42% 58% 47%!important;
    transform:rotate(-8deg);
  }
  .login-card{z-index:1!important}
}

@media(max-width:430px){
  .login-wrap::before{
    width:285px!important;
    height:275px!important;
    left:-150px!important;
    bottom:-118px!important;
  }
  .login-wrap::after{
    width:205px!important;
    height:198px!important;
    right:-82px!important;
    top:-68px!important;
  }
}