/* SIMAJAR V6 — Prototype B teacher mobile-first PWA */
body.teacher-pwa{
  background:#edf4f8;
  overflow-x:hidden;
}
body.teacher-pwa .sidebar,
body.teacher-pwa .topbar{
  display:none!important;
}
body.teacher-pwa .app{
  display:block!important;
  min-height:100vh;
  background:#edf4f8;
}
body.teacher-pwa .main{
  width:100%;
  min-height:100vh;
  background:#edf4f8;
}
body.teacher-pwa .content{
  width:min(520px,100%);
  max-width:520px;
  margin:0 auto;
  padding:14px 14px 110px;
  background:#f8fbfd;
  min-height:calc(100vh - 230px);
}
body.teacher-pwa .page-head{
  display:block;
  margin:3px 2px 14px;
}
body.teacher-pwa .page-head h1{
  font-size:1.55em;
  margin:0 0 4px;
}
body.teacher-pwa .page-head p{
  margin:0;
  font-size:.92em;
}
body.teacher-pwa .page-head .actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.teacher-mobile-header{
  width:min(520px,100%);
  margin:0 auto;
  padding:20px 18px 24px;
  color:#fff;
  border-radius:0 0 28px 28px;
  background:
    radial-gradient(circle at 88% 15%,rgba(242,182,36,.24),transparent 18%),
    linear-gradient(145deg,#0d315d 0%,#155f9f 52%,#0e9a72 100%);
  box-shadow:0 12px 30px rgba(13,49,93,.18);
  position:relative;
  z-index:3;
}
.teacher-mobile-header.compact{
  padding-bottom:17px;
}
.teacher-mobile-header.compact .tmh-date{
  margin-top:11px;
}
.tmh-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.tmh-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.tmh-brand b{font-size:1.06em;letter-spacing:.02em}
.tmh-logo{
  width:40px;height:40px;border-radius:12px;
  display:grid;place-items:center;
  color:#123653;font-weight:900;
  background:linear-gradient(135deg,#ffe382,#f2b624);
  box-shadow:0 8px 18px rgba(0,0,0,.12);
}
.tmh-icons{display:flex;gap:8px}
.tmh-icons button{
  width:39px;height:39px;
  display:grid;place-items:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.09);
  color:#fff;
  font-weight:900;
}
.tmh-profile{
  margin-top:18px;
  display:flex;
  align-items:center;
  gap:12px;
}
.tmh-avatar{
  width:58px;height:58px;border-radius:50%;
  flex:none;
  display:grid;place-items:center;
  font-weight:900;
  color:#0d315d;
  background:linear-gradient(135deg,#fff1bb,#ffd56a);
  border:3px solid rgba(255,255,255,.35);
}
.tmh-profile b{
  display:block;
  font-size:1.14em;
  line-height:1.25;
}
.tmh-profile span{
  display:block;
  margin-top:3px;
  color:#dcecf8;
  font-size:.86em;
}
.tmh-date{
  margin-top:14px;
  padding:10px 12px;
  border-radius:15px;
  font-weight:800;
  font-size:.86em;
  background:linear-gradient(90deg,rgba(255,255,255,.15),rgba(242,182,36,.22));
  border:1px solid rgba(255,255,255,.14);
}
.tmh-font{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin-top:11px;
}
.tmh-font span{
  margin-right:2px;
  font-size:.78em;
  color:#dcecf8;
}
.tmh-font button{
  min-width:38px;
  padding:6px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-weight:900;
  font-size:.77em;
}
.tmh-font button.active{
  color:#0d315d;
  background:#fff;
}
.teacher-bottom-nav{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:min(520px,100%);
  z-index:30;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  padding:8px 7px calc(8px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.98);
  border-top:1px solid #d9e5ef;
  box-shadow:0 -8px 24px rgba(20,48,82,.10);
}
.teacher-bottom-nav button{
  border:0;
  background:transparent;
  color:#68798f;
  padding:6px 2px;
  font-weight:750;
  font-size:.69em;
  min-width:0;
}
.teacher-bottom-nav button b{
  display:block;
  font-size:1.35em;
  line-height:1;
  margin-bottom:4px;
}
.teacher-bottom-nav button span{display:block}
.teacher-bottom-nav button.active{color:#0e9a72}

.teacher-mobile-page{
  padding-top:11px!important;
}
.teacher-section-title{
  margin:11px 2px 8px;
  color:#17314d;
  font-size:.96em;
  font-weight:900;
}
.teacher-color-card{
  position:relative;
  overflow:hidden;
  border-radius:20px;
  color:#fff;
  padding:15px;
  margin-bottom:12px;
  box-shadow:0 10px 24px rgba(19,51,82,.12);
}
.teacher-color-card::after{
  content:"";
  position:absolute;
  right:-37px;bottom:-45px;
  width:105px;height:105px;
  border-radius:50%;
  border:20px solid rgba(255,255,255,.08);
  pointer-events:none;
}
.teacher-card-schedule{
  background:linear-gradient(130deg,#11618e,#11a8a0);
}
.teacher-card-journal{
  background:linear-gradient(130deg,#e56c43,#f2a143);
}
.teacher-card-attendance{
  background:linear-gradient(130deg,#7352a8,#a657aa);
}
.teacher-color-card h2{
  margin:0;
  font-size:1.04em;
}
.teacher-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.teacher-card-head span{
  font-size:.78em;
  opacity:.9;
}
.teacher-schedule-item{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:9px;
  padding:8px 0;
  border-top:1px solid rgba(255,255,255,.14);
}
.teacher-schedule-item:first-of-type{border-top:0}
.teacher-time-dot{
  width:10px;height:10px;border-radius:50%;
  background:#f2b624;flex:none;
}
.teacher-time-dot.done{background:#8ce6d8}
.teacher-schedule-copy{
  flex:1;
  min-width:0;
}
.teacher-schedule-copy b{
  display:block;
  font-size:.9em;
  line-height:1.35;
}
.teacher-schedule-copy span{
  display:block;
  margin-top:2px;
  font-size:.77em;
  opacity:.9;
}
.teacher-mini-badge,
.teacher-inline-btn{
  flex:none;
  border:0;
  border-radius:999px;
  padding:6px 9px;
  background:rgba(8,44,74,.68);
  color:#fff;
  font-size:.7em;
  font-weight:850;
}
.teacher-empty-card{
  padding:10px 0;
  font-size:.86em;
  opacity:.92;
}
.teacher-quick-pill{
  position:absolute;
  right:13px;top:12px;
  z-index:2;
  border:0;
  border-radius:999px;
  padding:6px 10px;
  background:rgba(10,43,79,.78);
  color:#fff;
  font-size:.7em;
  font-weight:850;
}
.teacher-card-journal>b{
  display:block;
  margin-top:9px;
  font-size:.9em;
}
.teacher-card-journal>span{
  display:block;
  font-size:.76em;
  margin-top:5px;
  opacity:.92;
}
.teacher-progress-line{
  margin-top:10px;
  width:78%;
  height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.25);
  overflow:hidden;
}
.teacher-progress-line i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:#fff;
}
.teacher-attendance-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:9px;
  position:relative;
  z-index:1;
}
.teacher-attendance-row>div:first-child{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.teacher-attendance-row b{font-size:.9em}
.teacher-attendance-row span{
  margin-top:3px;
  font-size:.77em;
  opacity:.9;
}
.teacher-card-link{
  border:0;
  margin-top:10px;
  border-radius:999px;
  padding:7px 10px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.2);
  color:#fff;
  font-size:.72em;
  font-weight:850;
}
.teacher-ring{
  --pct:0;
  width:78px;height:78px;
  flex:none;
  border-radius:50%;
  display:grid;place-items:center;
  background:conic-gradient(#35d4b5 calc(var(--pct)*1%),rgba(255,255,255,.24) 0);
}
.teacher-ring::before{
  content:"";
  width:56px;height:56px;
  border-radius:50%;
  background:#744e9d;
  grid-area:1/1;
}
.teacher-ring div{
  grid-area:1/1;
  position:relative;
  z-index:1;
  font-size:.78em;
}
.teacher-quick-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
}
.teacher-quick{
  min-height:85px;
  border:0;
  border-radius:18px;
  padding:12px 7px;
  color:#fff;
  font-weight:900;
  box-shadow:0 8px 18px rgba(25,52,84,.11);
}
.teacher-quick b{
  display:block;
  font-size:1.32em;
  margin-bottom:5px;
}
.teacher-quick span{
  display:block;
  font-size:.72em;
  line-height:1.25;
}
.q-blue{background:linear-gradient(145deg,#176fce,#11a8a0)}
.q-gold{background:linear-gradient(145deg,#e97843,#f2b624)}
.q-purple{background:linear-gradient(145deg,#7955a8,#0e9a72)}
.teacher-tip{
  margin-top:13px;
  padding:14px;
  border-radius:18px;
  background:#fff;
  border:1px solid #d9e5ef;
  box-shadow:0 7px 18px rgba(19,51,82,.05);
}
.teacher-tip b{
  display:block;
  color:#0e9a72;
  margin-bottom:3px;
}
.teacher-tip span{
  display:block;
  color:#5f7186;
  font-size:.82em;
}

/* Existing SIMAJAR pages become mobile friendly for teacher */
body.teacher-pwa .card{
  border-radius:19px;
  padding:15px;
  margin-bottom:12px;
}
body.teacher-pwa .toolbar{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
}
body.teacher-pwa .toolbar select,
body.teacher-pwa .toolbar input,
body.teacher-pwa select,
body.teacher-pwa input,
body.teacher-pwa textarea{
  width:100%;
  min-height:48px;
  font-size:1em;
}
body.teacher-pwa .form-grid.two,
body.teacher-pwa .form-grid.three,
body.teacher-pwa .journal-header{
  grid-template-columns:1fr!important;
}
body.teacher-pwa .table-scroll{
  overflow-x:auto;
  border-radius:14px;
}
body.teacher-pwa table{
  min-width:660px;
  font-size:.88em;
}
body.teacher-pwa th,
body.teacher-pwa td{
  padding:10px 9px;
}
body.teacher-pwa .schedule-table{
  min-width:880px;
}
body.teacher-pwa .btn{
  min-height:45px;
}

/* Profile */
.teacher-subpage-head{
  margin:2px 2px 13px;
}
.teacher-subpage-head h1{
  margin:0;
  font-size:1.5em;
}
.teacher-subpage-head p{
  margin:3px 0 0;
  color:#65768c;
  font-size:.84em;
}
.teacher-profile-card{
  text-align:center;
  padding:22px 15px;
  border-radius:20px;
  color:#fff;
  background:linear-gradient(145deg,#0d315d,#176fce 52%,#0e9a72);
  box-shadow:0 12px 25px rgba(20,55,89,.14);
}
.teacher-profile-big-avatar{
  width:76px;height:76px;
  margin:0 auto 10px;
  display:grid;place-items:center;
  border-radius:50%;
  color:#0d315d;
  background:linear-gradient(135deg,#fff0ae,#f2b624);
  font-weight:900;
  font-size:1.15em;
  border:4px solid rgba(255,255,255,.28);
}
.teacher-profile-card h2{
  margin:0;
  font-size:1.2em;
}
.teacher-profile-code{
  display:inline-block;
  margin-top:7px;
  padding:4px 9px;
  border-radius:999px;
  background:rgba(255,255,255,.15);
  font-weight:900;
  font-size:.76em;
}
.teacher-profile-card p{
  margin:8px 0 0;
  color:#dcecf8;
  font-size:.82em;
}
.teacher-white-card{
  margin-top:12px;
  padding:6px 15px;
  border-radius:19px;
  background:#fff;
  border:1px solid #d9e5ef;
}
.teacher-info-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-top:1px solid #edf1f4;
}
.teacher-info-row:first-child{border-top:0}
.teacher-info-row span{
  color:#718197;
  font-size:.82em;
}
.teacher-info-row b{
  max-width:60%;
  text-align:right;
  font-size:.84em;
}
.teacher-profile-actions{
  display:grid;
  gap:9px;
  margin-top:12px;
}
.teacher-profile-actions button{
  min-height:50px;
  border-radius:15px;
  border:1px solid #d7e3ed;
  background:#fff;
  color:#153653;
  font-weight:850;
}
.teacher-profile-actions button.danger{
  color:#a63737;
  background:#fff5f5;
  border-color:#f0d2d2;
}

@media(min-width:700px){
  body.teacher-pwa{
    background:linear-gradient(90deg,#e7f0f6 0%,#f7fafc 50%,#e7f0f6 100%);
  }
  .teacher-mobile-header,
  body.teacher-pwa .content,
  .teacher-bottom-nav{
    box-shadow:0 0 30px rgba(22,55,88,.07);
  }
}
