/* Shared calm, readable surfaces for teacher and parent dashboards. */
body{background:#f3f6fa!important;animation:none!important;color:#243449;font-family:'Nunito',system-ui,sans-serif;line-height:1.5}
.topbar{background:#263b59;border:0;box-shadow:0 2px 8px #172b4d12;backdrop-filter:none}
.container,.wrap{max-width:1120px;margin:24px auto 64px;padding:0 24px}
.welcome,.care-intro{background:#e7eef8;border:1px solid #d9e3f0;border-radius:18px;padding:24px;box-shadow:none;backdrop-filter:none;margin-bottom:20px}
.welcome h1,.care-intro h1{font:800 1.65rem/1.3 'Nunito',system-ui,sans-serif;color:#243b5a;margin:4px 0 8px}
.welcome p,.care-intro p{color:#52647d}
.chip{background:#fff;color:#334f74;border:1px solid #d6e0ed}
.section-card,.card,.comm-card{background:#fff;border:1px solid #e0e6ee;border-radius:18px;padding:22px;box-shadow:0 3px 12px #20365304;backdrop-filter:none;margin-bottom:20px}
.section-title{font-family:inherit;font-weight:800;color:#263b59}
.empty-msg{color:#64748b;background:#f7f9fc;border-radius:12px}
.btn-ghost{background:#edf2f8;color:#334e70;border:1px solid #d7e1ee}
.btn-danger{background:#fff1f2;color:#a32943;border:1px solid #f4ced6}
.btn-primary,.btn.primary{background:#315b91;box-shadow:none}
.assignment-card{border:1px solid #e1e7ef;background:#fff;padding:20px}
.assignment-meta{line-height:1.7}.assignment-top{flex-wrap:wrap}
.summary .s{border:1px solid #e0e6ee;box-shadow:none;padding:18px 12px;text-align:left}
.summary .s .l{font-size:.82rem}.summary .s .v{color:#294d7a}
.dash-eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.12em;color:#56708f;margin:0 0 6px}
.dash-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px}
.dash-stat{background:#fff;border:1px solid #e0e6ee;border-radius:14px;padding:18px}
.dash-stat strong{display:block;font-size:1.75rem;color:#294d7a}.dash-stat span{font-size:.86rem;color:#52647d}
.dash-nav{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 20px}.dash-nav a{color:#315b91;background:white;border:1px solid #d8e1ed;border-radius:10px;padding:8px 12px;text-decoration:none;font-weight:700;font-size:.85rem}
[id]{scroll-margin-top:90px}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #83a9de;outline-offset:3px}
.comm-card{font-family:'Nunito',system-ui,sans-serif;color:#243449}.comm-card h2{font-size:1.2rem;margin:0}.comm-card h3{font-size:1.05rem;margin:0}
.comm-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.comm-heading p{font-size:.86rem;color:#64748b;margin:4px 0}
.comm-button{border:1px solid #d4deeb;background:#f6f8fc;color:#315277;padding:9px 13px;border-radius:10px;font:700 .82rem 'Nunito',system-ui,sans-serif;cursor:pointer}
.comm-button.primary{background:#315b91;color:white;border-color:#315b91}.comm-button:disabled{opacity:.5;cursor:not-allowed}
.comm-settings>div{background:#f1f5fa;border-radius:12px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;font-size:.85rem}
#commFeedback:empty{display:none}#commFeedback{background:#edf3ff;padding:10px 12px;border-radius:10px;margin-bottom:12px;color:#315277}
.comm-layout{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr);gap:20px}.comm-layout>div,.comm-layout>aside{min-width:0}.comm-card label{display:block;font-size:.8rem;font-weight:800;margin-bottom:6px}
.comm-card input,.comm-card textarea,.comm-card select{width:100%;border:1px solid #cbd7e6;border-radius:10px;padding:11px 12px;background:#fff;color:#243449;font:inherit;margin:0;box-sizing:border-box}.comm-card textarea{resize:vertical;min-height:88px}.comm-card textarea:disabled{background:#f0f3f7}
.comm-threads{max-height:480px;overflow:auto;margin-top:10px}.comm-thread{display:block;width:100%;text-align:left;border:1px solid #e0e6ee;background:#fff;border-radius:12px;margin-bottom:8px;padding:13px;cursor:pointer;color:#243449;font:inherit}.comm-thread.selected{background:#ecf3ff;border-color:#7599c8}.comm-thread strong,.comm-thread span,.comm-thread small{display:block}.comm-thread span,.comm-thread small{font-size:.78rem;color:#60728a;margin-top:4px}.comm-thread .comm-badge{display:inline-block;background:#315b91;color:white;border-radius:10px;padding:2px 7px;font-size:.68rem}
.comm-conversation{border:1px solid #e0e6ee;border-radius:14px;padding:18px}.comm-messages{height:300px;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:8px 4px;margin:12px 0;overscroll-behavior:contain}.comm-message{background:#f0f3f8;border:1px solid #e1e7ef;border-radius:12px;padding:12px;max-width:92%;align-self:flex-start;overflow-wrap:anywhere}.comm-message.mine{background:#edf4ff;border-color:#d8e5fa;align-self:flex-end}.comm-message strong{font-size:.76rem;color:#496280}.comm-message p{white-space:pre-wrap;margin:6px 0;font-size:.9rem}.comm-message small{font-size:.68rem;color:#67768a}.comm-state,.comm-empty{font-size:.84rem;color:#64748b;padding:10px 0}.comm-compose-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;font-size:.75rem;color:#64748b}
@media(max-width:640px){.container,.wrap{padding:0 14px;margin-top:16px}.section-card,.card,.comm-card{padding:16px}.welcome,.care-intro{padding:18px}.topbar{flex-wrap:wrap;gap:10px}.topbar-right{flex-wrap:wrap}.dash-stats{gap:8px}.dash-stat{padding:12px}.dash-stat strong{font-size:1.4rem}.dash-stat span{font-size:.75rem}.comm-layout{grid-template-columns:1fr}.comm-threads{max-height:190px}.comm-conversation{padding:12px}.comm-message{max-width:96%}.comm-heading{gap:8px}.sec-head>div{flex-wrap:wrap}.welcome h1,.care-intro h1{font-size:1.4rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.comm-layout.no-threads{grid-template-columns:1fr}.comm-card [hidden]{display:none!important}
/* A dashboard tab displays one panel; hidden wins over card display rules. */
[data-dashboard-panel][hidden]{display:none!important}
.dash-nav [role="tab"]{font:800 .85rem 'Nunito',system-ui,sans-serif;color:#315b91;background:#fff;border:1px solid #d8e1ed;border-radius:10px;padding:11px 16px;cursor:pointer}
.dash-nav [role="tab"]:hover{background:#e6edf7}
.dash-nav [role="tab"][aria-selected="true"]{background:#263b59;color:#fff;border-color:#263b59;box-shadow:0 2px 5px #263b5920}
.dash-nav [data-communication-unread]{display:inline-block;margin-left:5px;padding:1px 6px;border-radius:20px;background:#dbe8fb;color:#243f63;font-size:.75rem}
.dash-nav [data-communication-unread][hidden]{display:none}
.roster-hint{color:#64748b;font-size:.86rem;margin:8px 0 16px;line-height:1.6}
.roster-toolbar{display:grid;grid-template-columns:minmax(150px,1fr) minmax(180px,2fr);gap:12px}
.roster-toolbar label{display:block;font-size:.8rem;font-weight:800;margin-bottom:6px;color:#405775}
.roster-toolbar select,.roster-toolbar input{width:100%;padding:11px 12px;border:1px solid #cbd7e6;background:#fff;color:#243449;border-radius:10px;font:inherit;min-width:0}
.roster-list{display:grid;gap:10px}.roster-student{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid #e0e6ee;border-radius:12px}
.roster-avatar{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;background:#e8eff9;border-radius:12px;color:#315b91;font-weight:800;font-size:1.2rem}
.roster-identity{flex:1;min-width:0;overflow-wrap:anywhere}.roster-identity h3{font-size:.95rem;color:#263b59}.roster-identity p,.roster-identity small{color:#64748b;font-size:.8rem;margin:3px 0}.roster-student .badge{flex-shrink:0}
@media(max-width:640px){.dash-nav{gap:6px}.dash-nav [role="tab"]{padding:10px 12px;font-size:.8rem}.roster-toolbar{grid-template-columns:1fr}.roster-student{padding:12px;gap:10px;flex-wrap:wrap}.roster-identity{min-width:140px}}

/* Topic navigation on the left; recipient controls above the conversation. */
.comm-topics-panel{border:1px solid #e0e6ee;border-radius:14px;padding:16px;background:#f8fafd;align-self:start}
.comm-topic-hint{font-size:.78rem;color:#64748b;margin:6px 0 12px}
.comm-topics-panel .comm-threads{max-height:390px}
.comm-topics-panel form{padding-top:14px;margin-top:10px;border-top:1px solid #dce4ef}
.comm-topics-panel form button{margin-top:8px;width:100%}
.comm-thread:disabled{cursor:wait;opacity:.65}
.comm-thread strong{overflow-wrap:anywhere}
.comm-child-toolbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #e0e6ee}
.comm-child-toolbar>div{min-width:0}.comm-child-toolbar select{max-width:100%;text-overflow:ellipsis}
@media(max-width:640px){
  .comm-layout{grid-template-columns:1fr;gap:12px}
  .comm-topics-panel{padding:12px}
  .comm-topics-panel .comm-threads{display:flex;gap:8px;max-height:150px;overflow:auto}
  .comm-topics-panel .comm-thread{min-width:130px;max-width:220px;flex:0 0 auto;margin:0}
  .comm-topics-panel form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}
  .comm-topics-panel form label{grid-column:1/-1;margin:0}
  .comm-topics-panel form button{width:auto;margin:0;white-space:nowrap}
  .comm-child-toolbar{grid-template-columns:1fr}
}

/* Absensi kelas & pengajuan izin (js/school-attendance.js). */
.dash-nav [data-attendance-badge],.att-count{display:inline-block;margin-left:5px;padding:1px 7px;border-radius:20px;background:#dc2626;color:#fff;font-size:.75rem;font-weight:800}
.dash-nav [data-attendance-badge][hidden],.att-count[hidden]{display:none}
.att-subnav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.att-subnav [aria-pressed="true"]{background:#263b59;color:#fff;border-color:#263b59}
.att-feedback:empty{display:none}.att-feedback{background:#edf3ff;padding:10px 12px;border-radius:10px;margin-bottom:12px;color:#315277;font-size:.88rem}.att-feedback.error{background:#fff1f2;color:#a32943}
.att-toolbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:6px}.att-toolbar>div{min-width:0}
.att-chips{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 12px}
.att-chip{display:inline-block;padding:3px 10px;border-radius:20px;font-size:.78rem;font-weight:700;border:1px solid transparent}
.att-chip.att-hadir{background:#dcfce7;color:#166534}.att-chip.att-sakit{background:#dbeafe;color:#1e40af}.att-chip.att-izin{background:#ede9fe;color:#5b21b6}
.att-chip.att-terlambat{background:#fef3c7;color:#92400e}.att-chip.att-alpa{background:#fee2e2;color:#991b1b}
.att-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}.att-actions input{max-width:280px}.att-actions h3{margin:0}
.att-list{display:grid;gap:8px}
.att-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:center;padding:10px 12px;border:1px solid #e0e6ee;border-radius:12px;background:#fff}
.att-row.absent{background:#fffaf0;border-color:#f3d9a8}
.att-name{display:flex;gap:10px;align-items:flex-start;min-width:0}.att-name>div{min-width:0;overflow-wrap:anywhere}.att-name strong,.att-name small{display:block}.att-name small{color:#64748b;font-size:.76rem}
.att-no{flex-shrink:0;display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#eef3fa;color:#315b91;font-weight:800;font-size:.78rem}
.att-note{margin-top:4px;font-size:.76rem!important}.att-note.ok{color:#166534!important}.att-note.wait{color:#92400e!important}
.att-status{display:flex;gap:4px}
.att-opt{min-width:40px;height:38px;border:1px solid #cbd7e6;background:#fff;color:#475569;border-radius:9px;font:800 .82rem 'Nunito',system-ui,sans-serif;cursor:pointer;padding:0 8px}
.att-opt span{display:none}
.att-opt[aria-checked="true"].att-hadir{background:#16a34a;border-color:#16a34a;color:#fff}.att-opt[aria-checked="true"].att-sakit{background:#2563eb;border-color:#2563eb;color:#fff}
.att-opt[aria-checked="true"].att-izin{background:#7c3aed;border-color:#7c3aed;color:#fff}.att-opt[aria-checked="true"].att-terlambat{background:#d97706;border-color:#d97706;color:#fff}
.att-opt[aria-checked="true"].att-alpa{background:#dc2626;border-color:#dc2626;color:#fff}
.att-card .att-reason{grid-column:1/-1;padding:9px 11px}
.att-savebar{position:sticky;bottom:0;display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;background:#fff;padding:12px 0 4px;margin-top:10px;border-top:1px solid #e0e6ee}
.att-savebar span{color:#a16207;font-size:.82rem;font-weight:700}
.att-leave{border:1px solid #e0e6ee;border-radius:12px;padding:12px 14px;margin-bottom:10px;background:#fff}.att-leave.pending{border-color:#f3d9a8;background:#fffaf0}
.att-leave p{margin:6px 0;font-size:.88rem;overflow-wrap:anywhere}.att-leave small{color:#64748b;font-size:.76rem}
.att-leave-head{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;align-items:center}
.att-leave-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.att-leave-actions input{flex:1 1 220px}
.att-pill{padding:2px 9px;border-radius:20px;font-size:.72rem;font-weight:800;background:#f1f5f9;color:#475569}.att-pill.pending{background:#fef3c7;color:#92400e}
.att-pill.approved{background:#dcfce7;color:#166534}.att-pill.rejected{background:#fee2e2;color:#991b1b}
.att-table-wrap{overflow-x:auto;border:1px solid #e0e6ee;border-radius:12px}
.att-table{border-collapse:collapse;width:100%;font-size:.8rem}.att-table th,.att-table td{border-bottom:1px solid #eef2f7;padding:6px 7px;text-align:center;white-space:nowrap}
.att-table th{background:#f5f8fc;color:#334e70}.att-table .nm{text-align:left;white-space:normal;min-width:140px}
.att-table .c-A{color:#b91c1c;font-weight:800}.att-table .c-S{color:#1d4ed8;font-weight:800}.att-table .c-I{color:#6d28d9;font-weight:800}.att-table .c-T{color:#a16207;font-weight:800}.att-table .c-H{color:#16a34a}
.att-parent-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.att-box{border:1px solid #e0e6ee;border-radius:14px;padding:16px;margin-bottom:14px;min-width:0}.att-box h3{margin:0 0 10px}
.att-kind{display:flex;gap:16px;margin-bottom:10px}.att-card .att-kind label{display:flex;align-items:center;gap:6px;margin:0;font-size:.9rem}.att-card .att-kind input{width:auto}
.att-card textarea{min-height:60px}.att-hint{font-size:.76rem;color:#64748b;margin:6px 0 10px}
.att-notices{max-height:320px;overflow:auto;display:grid;gap:8px}
.att-notice{border:1px solid #e0e6ee;border-radius:10px;padding:10px 12px}.att-notice.unread{border-color:#93c5fd;background:#eff6ff}
.att-notice strong{font-size:.86rem}.att-notice p{font-size:.8rem;margin:4px 0;color:#475569;overflow-wrap:anywhere}.att-notice small{font-size:.72rem;color:#64748b}
@media(min-width:720px){.att-opt span{display:inline}.att-opt{min-width:auto}}
@media(max-width:640px){.att-row{grid-template-columns:1fr}.att-status{justify-content:space-between}.att-opt{flex:1}.att-actions input{max-width:none;flex:1}}
