/* Reference weekly schedule: desktop matrix and mobile day/week/list modes. */
.tt-reference{display:grid;gap:14px;min-width:0;color:#111f52;--tt-border:#c7def9}
.tt-reference .tt-banner{display:flex;align-items:center;gap:20px;padding:18px 24px;background:linear-gradient(130deg,#eef8ff,#d2eaff);border:2px solid #fff;border-radius:25px;box-shadow:0 5px 10px #65a7ea33}
.tt-banner h2{font-size:24px;margin:0 0 6px}.tt-banner p{font-size:13px;margin:0}.tt-banner-icon{display:grid;place-items:center;flex:none}
.tt-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.tt-view-tabs{display:flex;gap:10px;flex-wrap:wrap}
.tt-view-tabs button,.tt-datebar button{border:1px solid #fff;border-radius:24px;background:linear-gradient(#fff,#d8eaff);box-shadow:0 3px 5px #6aa5e342;color:#13235c;min-height:44px;padding:10px 22px;font:inherit;font-weight:800;cursor:pointer}
.tt-view-tabs button.active{background:linear-gradient(#00bcff,#0064ff);color:#fff;border-color:#b4ecff}
.tt-datebar{display:flex;align-items:center;gap:10px;border:1px solid #fff;border-radius:24px;padding:8px;background:#e4f1ff;box-shadow:0 3px 7px #6aa5e333}
.tt-datebar strong{flex:1;text-align:center;font-size:16px}.tt-datebar button{padding:8px 12px;display:flex;align-items:center;justify-content:center}
.tt-repeat-note{margin:0;font-size:11px;color:#526487}
.tt-reference .tt-filters{display:flex;gap:10px;flex-wrap:wrap;max-width:none}
.tt-reference .tt-filters label{display:grid;gap:5px;font-size:12px;min-width:140px;flex:1}
.tt-reference .tt-grid-wrap{display:block;max-width:100%;overflow:auto;border:2px solid #fff;border-radius:22px;background:#edf6ff;box-shadow:0 6px 12px #6aa5e333}
.tt-reference .tt-grid{min-width:1120px;width:100%;border-collapse:separate;border-spacing:0;background:#edf6ff;table-layout:fixed}
.tt-reference .tt-grid th,.tt-reference .tt-grid td{border:1px solid #d1e3fb;vertical-align:top;padding:6px;text-align:center;width:auto}
.tt-reference .tt-grid th:first-child{width:85px}
.tt-reference .tt-grid thead th{background:linear-gradient(#fff,#dcecff);font-size:15px}
.tt-reference .tt-grid th button{background:transparent;border:0;color:inherit;font:inherit;font-weight:800;cursor:pointer;min-height:56px;width:100%}
.tt-reference .tt-grid th small{display:block;font-size:11px;font-weight:500;margin-top:5px}
.tt-reference .tt-grid tbody th{vertical-align:middle;background:#e1efff;color:#14244e;font-size:12px}
.tt-reference .tt-grid .tt-selected{background:#c5e8ff;box-shadow:inset 0 -3px #0677ff}
.tt-free{display:block;color:#9fb9d6;padding:20px 0}
.tt-event{display:grid;gap:5px;padding:10px 8px;border-radius:14px;margin-bottom:7px;background:var(--session-bg,#eee7fa);color:var(--session-ink,#101d36);border:1px solid #ffffffb3;box-shadow:0 2px 4px #416da119;text-align:start;overflow-wrap:anywhere}
.tt-event:last-child{margin-bottom:0}.tt-event-title{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.tt-event-title b{font-size:14px}
.tt-event span{font-size:12px}.tt-location{display:flex;gap:4px;align-items:center}.tt-event-time{font-size:11px!important}
.tt-overlap{display:inline-block;background:#ffffffc9;color:#27345d;border-radius:12px;padding:2px 5px;font-size:9px}
.tt-teacher-name{font-size:10px}.tt-subject{font-weight:700}
.tt-agenda{display:grid;gap:12px}.tt-agenda-row{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;padding:10px;border-radius:23px;border:2px solid #fff;background:linear-gradient(145deg,#f4fbff,#dceeff);box-shadow:0 5px 9px #7db2e537}
.tt-agenda-time{display:grid;place-items:center;border-radius:18px;background:linear-gradient(#fff,#d9eaff);font-size:13px;font-weight:900;color:#152453}
.tt-agenda-time bdi{white-space:normal;text-align:center}
.tt-agenda-row .tt-event{padding:16px;margin:0;min-height:106px;grid-template-columns:1fr auto;align-content:center}
.tt-agenda-row .tt-event-title,.tt-agenda-row .tt-location,.tt-agenda-row .tt-teacher-name{grid-column:1/-1}
.tt-agenda-row .tt-event-title b{font-size:18px}
.tt-list{display:grid;gap:18px}.tt-list h3{font-size:18px;margin:0 0 10px}
.tt-reference .tt-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:15px;border:2px solid #fff;border-radius:22px;background:#edf6ff;box-shadow:0 3px 8px #75afe533}
.tt-chip{padding:7px 12px;border-radius:18px;background:var(--session-bg,#eee7fa);color:var(--session-ink,#101d36);font-size:12px;font-weight:800}
.tt-daily-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px;border-radius:22px;border:2px solid #fff;background:#e9f4ff}
.tt-daily-summary span{display:grid;text-align:center;gap:6px;background:#f6fbff;border-radius:16px;padding:12px 3px;font-size:12px}.tt-daily-summary b{font-size:22px}
.tt-colors{border:1px solid #c7def9;border-radius:20px;background:#f7fbff;padding:15px}
.tt-colors summary{cursor:pointer;display:flex;gap:8px;font-weight:800;min-height:36px;align-items:center}
.tt-colors p{font-size:12px;color:#465e7d}.tt-colors h3{font-size:15px;margin:20px 0 10px}
.tt-color-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.tt-color-fields label{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid #d1e3f6;border-radius:14px;background:#fff;font-size:12px}
.tt-color-fields input[type=color]{width:48px;height:38px;min-width:48px;cursor:pointer;padding:2px}
.tt-color-fields input[type=checkbox]{width:18px;height:18px;vertical-align:middle}
.tt-color-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
.tt-reference button:focus-visible,.tt-reference select:focus-visible,.tt-reference input:focus-visible,.tt-grid-wrap:focus-visible{outline:3px solid #004bb5;outline-offset:3px}
@media(max-width:700px){
.tt-reference{gap:12px}.tt-reference .tt-banner{padding:14px;gap:12px}.tt-banner h2{font-size:18px}.tt-banner-icon .ic{width:48px!important;height:48px!important}
.tt-view-tabs{gap:6px;flex:1}.tt-view-tabs button{flex:1;padding:9px 10px;font-size:12px;white-space:nowrap}
.tt-datebar{gap:4px;padding:6px}.tt-datebar strong{font-size:12px}.tt-datebar button{font-size:11px;padding:8px;min-width:36px}
.tt-agenda-row{grid-template-columns:78px minmax(0,1fr);gap:8px;padding:8px}.tt-agenda-row .tt-event{padding:12px}.tt-agenda-row .tt-event-title b{font-size:16px}
.tt-reference .tt-filters label{min-width:110px}.tt-reference .tt-legend{padding:12px}.tt-chip{font-size:11px;padding:6px 9px}
}
@media print{.tt-reference .tt-banner,.tt-reference .tt-toolbar,.tt-reference .tt-datebar,.tt-reference .tt-filters,.tt-reference .tt-colors,.tt-repeat-note{display:none}
.tt-reference .tt-grid-wrap{overflow:visible;box-shadow:none}.tt-reference .tt-grid{min-width:0;font-size:9px}.tt-reference .tt-grid td,.tt-reference .tt-grid th{padding:2px}.tt-reference .tt-event{font-size:9px;padding:4px;box-shadow:none;break-inside:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.tt-reference .tt-event b,.tt-reference .tt-event span,.tt-reference .tt-event small{font-size:9px}.tt-reference .tt-grid th:first-child{width:50px}.tt-agenda-row{break-inside:avoid;box-shadow:none}.tt-reference .tt-legend{box-shadow:none}}

/* کارت ورود دانش‌آموز (چاپ) */
.cred-sheet{display:grid;grid-template-columns:repeat(2,9.6cm);gap:.4cm;justify-content:center;direction:rtl;color:#0f172a}
.cred-card{width:9.6cm;height:6.2cm;box-sizing:border-box;border:1.2px dashed #64748b;border-radius:.35cm;padding:.3cm .35cm;display:flex;flex-direction:column;gap:.15cm;background:#fff;break-inside:avoid;page-break-inside:avoid;font-size:10.5px}
.cred-head{display:flex;align-items:center;gap:.2cm;border-bottom:1px solid #cbd5e1;padding-bottom:.12cm}.cred-head b{display:block;font-size:12px}.cred-head small{color:#475569;font-size:9.5px}
.cred-logo{width:1cm;height:1cm;display:grid;place-items:center;font-size:22px;overflow:hidden;flex:none}.cred-logo img{max-width:100%;max-height:100%}
.cred-body{display:flex;gap:.25cm;flex:1;align-items:center}.cred-info{flex:1;display:grid;gap:.08cm;min-width:0}
.cred-name{font-size:14px;font-weight:800}.cred-cls{color:#475569;margin-bottom:.05cm}
.cred-row{display:flex;justify-content:space-between;align-items:center;gap:.15cm;background:#f1f5f9;border-radius:.15cm;padding:.07cm .18cm}.cred-row span{color:#475569}
.cred-row code{font-family:monospace;font-weight:800;font-size:12px;direction:ltr;letter-spacing:.5px}.cred-row code.url{font-size:9.5px;letter-spacing:0}
.cred-qr svg{width:2.5cm;height:2.5cm}.cred-qr{display:grid;justify-items:center;gap:.05cm;flex:none}.cred-qr small{font-size:8.5px;color:#475569}
.cred-foot{font-size:9px;color:#475569;text-align:center;border-top:1px solid #e2e8f0;padding-top:.1cm}
@media print{.cred-sheet{grid-template-columns:repeat(2,9.6cm)}}

.tt-reference{grid-template-columns:minmax(0,1fr)}
.tt-reference>*{min-width:0;max-width:100%}
.tt-reference #ttContent{width:100%;min-width:0}

/* Compact simultaneous sessions: class/subject on the right, venue on the left. */
.tt-reference .tt-grid .tt-event{grid-template-columns:minmax(0,1fr) minmax(0,.85fr);gap:2px 5px;padding:6px;margin-bottom:5px;border-radius:10px}
.tt-reference .tt-grid .tt-event-title{grid-column:1;grid-row:1;display:block}
.tt-reference .tt-grid .tt-event-title b{font-size:11px}
.tt-reference .tt-grid .tt-subject{grid-column:1;grid-row:2;font-size:10px}
.tt-reference .tt-grid .tt-location{grid-column:2;grid-row:1/4;align-self:center;justify-content:center;font-size:10px;text-align:center;display:block}
.tt-reference .tt-grid .tt-location .ic{display:none}
.tt-reference .tt-grid .tt-teacher-name{grid-column:1;grid-row:3;font-size:9px;opacity:.85}
.tt-reference .tt-grid .tt-event-time,.tt-reference .tt-grid .tt-overlap{display:none}
