/* R75 teacher-only, RTL attendance dashboard. Reuses current QR and forms. */
.teacher-presence-dashboard,
.teacher-presence-web{--t-ink:#16344c;--t-muted:#64758b;--t-line:#dfe8ef;--t-bg:#f7fafc;min-width:0}
.teacher-presence-dashboard *,.teacher-presence-web *{box-sizing:border-box}
.teacher-presence-dashboard{display:grid;gap:15px;margin:0 0 18px}
.teacher-presence-dashboard>.teacher-presence-heading{font-size:17px;font-weight:850;color:var(--t-ink);margin:3px 0 -6px}
.teacher-presence-scanbar{
 position:sticky;top:8px;z-index:35;display:flex;align-items:center;
 justify-content:space-between;gap:12px;
 padding:13px 16px;border-radius:18px;
 border:1px solid #82ced9;background:rgba(239,251,253,.98);
 box-shadow:0 8px 27px rgba(9,110,132,.13);
 backdrop-filter:blur(10px);direction:rtl;
}
.teacher-presence-scanbar .teacher-scan-intro{display:grid;gap:3px;min-width:0;text-align:right}
.teacher-presence-scanbar .teacher-scan-intro small{font-size:11px;color:#426c7b;font-weight:700}
.teacher-presence-scanbar .teacher-scan-intro strong{font-size:16px;color:#12546a;font-weight:850}
.teacher-presence-scanbar .teacher-scan-button{
 width:auto!important;min-width:150px;min-height:49px;border-radius:13px!important;
 border:1px solid #067b91!important;background:#087f96!important;color:#fff!important;
 box-shadow:0 4px 12px rgba(0,111,138,.18);font-size:14px!important;font-weight:850!important;
 padding:10px 18px!important;margin:0!important;white-space:nowrap;
}
.teacher-presence-scanbar .teacher-scan-button:hover{background:#05657a!important}
.teacher-presence-dashboard button:focus-visible,.teacher-presence-web button:focus-visible{
 outline:3px solid #42b9d4!important;outline-offset:2px;
}
.teacher-presence-tiles{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 gap:12px;direction:rtl;min-width:0;
}
.teacher-presence-tile{
 position:relative;display:flex!important;flex-direction:column;align-items:flex-start;
 justify-content:center;gap:9px;min-width:0;width:100%!important;
 min-height:140px;aspect-ratio:1.14/1;max-height:215px;padding:17px!important;
 border:1px solid var(--t-border,#dbe8f1)!important;
 border-radius:18px!important;
 background:linear-gradient(155deg,var(--t-fill,#f5faff),#fff)!important;
 color:var(--t-ink)!important;text-align:right!important;
 box-shadow:0 3px 12px rgba(27,57,87,.045);
 white-space:normal!important;line-height:1.35;
 transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.teacher-presence-tile:hover{
 transform:translateY(-2px);box-shadow:0 8px 21px rgba(23,67,101,.11);
 border-color:var(--t-accent,#83c5d5)!important;
}
.teacher-presence-tile[aria-pressed="true"]{border-color:var(--t-accent,#50aebf)!important;box-shadow:0 0 0 2px var(--t-glow,#cae8ef)}
.teacher-tile-sky{--t-fill:#eaf7ff;--t-border:#c6e4f4;--t-accent:#58afd2;--t-glow:#e2f5fd}
.teacher-tile-purple{--t-fill:#f2efff;--t-border:#dfd8fb;--t-accent:#aa91e2;--t-glow:#f2e9ff}
.teacher-tile-amber{--t-fill:#fff4de;--t-border:#f5e2b7;--t-accent:#dba94b;--t-glow:#fff5dd}
.teacher-tile-cyan{--t-fill:#e5f8f5;--t-border:#bbe8e1;--t-accent:#4eb6a7;--t-glow:#e0faf3}
.teacher-tile-green{--t-fill:#eef9ee;--t-border:#d0eacc;--t-accent:#77b976;--t-glow:#edf9e9}
.teacher-tile-pink{--t-fill:#fff0f2;--t-border:#f6d7df;--t-accent:#d993a4;--t-glow:#fff1f4}
.teacher-presence-tile .teacher-tile-icon{
 width:41px;height:41px;display:inline-grid;place-items:center;
 border-radius:13px;background:#fff;border:1px solid #ffffffd6;
 color:var(--t-accent,#388baf);font-size:25px;line-height:1;
 font-weight:700;box-shadow:0 2px 6px rgba(0,0,0,.045);
}
.teacher-presence-tile .teacher-tile-title{
 display:block;color:#243c54;font-size:15px;font-weight:850;
}
.teacher-presence-tile .teacher-tile-desc{
 display:block;color:#58718a;font-size:11px;line-height:1.65;
 overflow:hidden;white-space:normal;max-height:38px;
}
.teacher-presence-tile .teacher-tile-arrow{
 position:absolute;inset-inline-end:15px;bottom:13px;font-size:21px;
 color:var(--t-accent,#6faaba);line-height:1;
}
.teacher-presence-summary{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
 border:1px solid #e0eaf0;background:#fff;border-radius:15px;
 padding:12px;
}
.teacher-presence-summary>div{
 display:flex;min-width:0;flex-direction:column;gap:7px;
 border-radius:11px;padding:11px;background:#f6f9fc;
}
.teacher-presence-summary small{font-size:11px;color:#687e8f}
.teacher-presence-summary strong{font-size:13px;color:#223e53;font-weight:850;overflow-wrap:anywhere}
.teacher-presence-panels{display:block;min-width:0}
.teacher-presence-panel{min-width:0;padding:14px;border-radius:16px;background:#fff;border:1px solid #dbe6ec}
.teacher-presence-panel[hidden],.teacher-presence-preview[hidden],.teacher-leave-panel[hidden]{display:none!important}
.teacher-presence-panel .section-card,.teacher-presence-panel .card{
 min-width:0;width:100%;box-shadow:none!important;background:transparent!important;
 border:0!important;padding:8px 0!important;margin:0!important;
}
.teacher-presence-panel h3{font-size:15px;color:#24475c;margin:0 0 12px}
.teacher-presence-preview{
 padding:13px;border-radius:16px;background:#f5f9fb;
 border:1px solid #d9e6ed;min-width:0;
}
.teacher-presence-preview .staff-scanner{width:100%;max-width:420px;margin-inline:auto;scroll-margin-top:100px}
.teacher-presence-preview .staff-photo-label{max-width:420px;margin-inline:auto}
.teacher-presence-preview .teacher-photo-fallback{
 width:auto!important;min-height:38px;padding:8px 12px!important;
 margin-top:8px;border-radius:9px!important;
 background:#e9f5f7!important;color:#196077!important;
 border:1px solid #c7e6e9!important;
}
.teacher-leave-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.teacher-leave-form label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;font-weight:700;color:#3a5568}
.teacher-leave-form input,.teacher-leave-form select,.teacher-leave-form textarea{
 width:100%;min-width:0;min-height:42px;border-radius:9px;
 padding:9px 11px;font-size:13px;border:1px solid #ccdde5;
 background:#fff;color:#243e54;font-family:inherit;
}
.teacher-leave-form .teacher-full{grid-column:1/-1}
.teacher-leave-form [data-hour][hidden]{display:none!important}
.teacher-form-note{margin:0;color:#597285;font-size:12px;line-height:1.7}
.teacher-form-footer{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.teacher-form-footer button{width:auto!important;min-height:43px;border-radius:10px!important;padding:10px 16px!important}
.teacher-form-footer [role=status]{font-size:12px;color:#35677d}
.teacher-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.teacher-panel-head h3{margin:0}
.teacher-panel-head .teacher-close{width:auto!important;padding:7px 12px!important;min-height:37px;border-radius:10px!important;background:#f3f6fa!important;color:#405569!important;border:1px solid #dce5ee!important;font-size:12px}
.teacher-presence-active>.staff-time-request-panel{display:none}
.teacher-presence-dashboard .staff-range-panel,
.teacher-presence-dashboard .staff-history-list{min-width:0}
.teacher-presence-dashboard .staff-history-row{padding:11px;border-radius:10px}
.teacher-presence-web .teacher-hidden-nav{display:none!important}
.teacher-presence-web>.teacher-presence-tiles{margin:0 0 12px}
.teacher-presence-web>.teacher-presence-summary{margin:0 0 15px}
.teacher-presence-web>.staff-hub-scan-quick{z-index:40}
@media(min-width:1160px){
 .teacher-presence-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
 .teacher-presence-tile{aspect-ratio:1.65/1;min-height:145px;max-height:190px}
}
@media(max-width:760px){
 .teacher-presence-dashboard{gap:12px}
 .teacher-presence-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .teacher-presence-tile{aspect-ratio:1/1;min-height:138px;max-height:none;padding:12px!important;gap:8px;border-radius:15px!important}
 .teacher-presence-tile .teacher-tile-icon{width:36px;height:36px;font-size:22px;border-radius:11px}
 .teacher-presence-tile .teacher-tile-title{font-size:13px}
 .teacher-presence-tile .teacher-tile-desc{font-size:10px}
 .teacher-presence-tile .teacher-tile-arrow{inset-inline-end:12px;bottom:11px}
 .teacher-presence-scanbar{padding:10px 11px;top:7px;gap:8px;border-radius:13px}
 .teacher-presence-scanbar .teacher-scan-intro small{font-size:10px}
 .teacher-presence-scanbar .teacher-scan-intro strong{font-size:13px}
 .teacher-presence-scanbar .teacher-scan-button{min-width:118px;min-height:47px;padding:9px 13px!important;font-size:13px!important}
 .teacher-presence-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px}
 .teacher-presence-summary>div{padding:9px 7px}
 .teacher-presence-summary small{font-size:10px}
 .teacher-presence-summary strong{font-size:11px}
 .teacher-leave-form{grid-template-columns:1fr}
 .teacher-presence-panel{padding:11px}
}
@media(max-width:360px){
 .teacher-presence-tile{min-height:131px;padding:10px!important}
 .teacher-presence-tile .teacher-tile-title{font-size:12px}
 .teacher-presence-scanbar .teacher-scan-button{min-width:103px;font-size:12px!important}
 .teacher-presence-summary{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
 .teacher-presence-tile{transition:none!important}
}

.teacher-presence-web .teacher-web-history{margin:0 0 16px;padding:16px}
.teacher-presence-web .teacher-web-history-rows{display:grid;gap:8px}
.teacher-presence-web .teacher-web-history-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 15px;padding:12px;border:1px solid #e1eaf0;border-radius:10px;background:#f9fcfd}
.teacher-presence-web .teacher-web-history-row strong{font-size:13px;color:#243d53}
.teacher-presence-web .teacher-web-history-row span,.teacher-presence-web .teacher-web-history-row small{font-size:12px;color:#536c80}
.teacher-presence-web .teacher-web-history-refresh{width:auto!important;padding:8px 12px!important;margin:0 0 9px;border-radius:9px!important;min-height:36px}
.teacher-presence-web .staff-hub-panes[hidden]{display:none!important}


/* R76: scoped mobile-first attendance; QR precedes every tile and detail. */
@media(max-width:760px){
 .attendance-scan-first > .page-head{display:none!important}
 #content.attendance-scan-first,
 #mobile-content.attendance-scan-first{padding-top:0!important}
 .attendance-scan-first .staff-hub-root > .staff-hub-intro,
 .attendance-scan-first .staff-hub-root > .staff-hub-quick-actions,
 .attendance-scan-first .staff-hub-root > nav.staff-hub-tabs:not(.staff-hub-subtabs){display:none!important}
 .attendance-scan-first .staff-hub-panes[hidden],
 .attendance-scan-first .teacher-presence-panel[hidden],
 .attendance-scan-first .teacher-presence-preview[hidden]{display:none!important}
 .attendance-scan-first .teacher-presence-dashboard{margin-top:0!important}
 .attendance-scan-first .staff-hub-root > .staff-hub-scan-quick{
  margin-top:0!important;margin-bottom:10px!important;
  border-color:#71c3d3;background:#e9f9fb!important
 }
 .attendance-scan-first .teacher-presence-scanbar{
  background:#e9f9fb!important;border-color:#79c9d8!important;margin-top:0!important;
 }
 .attendance-scan-first .teacher-presence-tiles{margin-top:0;gap:10px}
 .attendance-scan-first .teacher-presence-tile{
  border-width:1.5px!important;box-shadow:0 3px 11px #173d5e10;
 }
 .attendance-scan-first .teacher-tile-sky{--t-fill:#dbf2ff;--t-border:#9fdaef;--t-accent:#228bb3}
 .attendance-scan-first .teacher-tile-purple{--t-fill:#eae2ff;--t-border:#c6b5f4;--t-accent:#8065c2}
 .attendance-scan-first .teacher-tile-amber{--t-fill:#fff0ce;--t-border:#e9ce86;--t-accent:#b68a27}
 .attendance-scan-first .teacher-tile-cyan{--t-fill:#d6f5ef;--t-border:#99d9cd;--t-accent:#238a81}
 .attendance-scan-first .teacher-tile-green{--t-fill:#e1f6d9;--t-border:#b3dc9f;--t-accent:#488f48}
 .attendance-scan-first .teacher-tile-pink{--t-fill:#ffe5ea;--t-border:#ecb3c0;--t-accent:#b55c7e}
 .attendance-scan-first .teacher-presence-tile .teacher-tile-icon{
  background:#ffffffea;border-color:var(--t-border,#dbe8f1);
  color:var(--t-accent,#238a81)
 }
 .attendance-scan-first .teacher-manager-mobile-dashboard > .teacher-presence-panels{margin-top:0}
 .attendance-scan-first .teacher-manager-mobile-dashboard .teacher-manager-detail > .section-card{
  border:0!important;box-shadow:none!important;background:transparent!important;
  margin:0!important;padding:9px 0!important
 }
 .attendance-scan-first .teacher-manager-mobile-dashboard .teacher-manager-detail > .staff-time-request-panel{
  border:0!important;box-shadow:none!important;margin:0!important;
 }
 .attendance-scan-first .teacher-presence-scanbar .teacher-scan-button{white-space:nowrap}
}
/* Responsive desktop-manager navigation remains untouched. */
@media(min-width:761px){.teacher-manager-web-tiles{display:none!important}}
