/* Tasks: colour per type, status and priority; board in columns by due date (like amoCRM). */
.tk-kind{display:inline-flex;align-items:center;gap:5px;font-weight:700;font-size:12px;color:var(--tk)}
.tk-kind::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--tk);flex:none}
.tk-general{--tk:#6b7a86}.tk-call{--tk:#1f9d55}.tk-reminder{--tk:#2563eb}.tk-documents{--tk:#7c3aed}.tk-payment{--tk:#b7740a}
.tk-camp{--tk:#ea580c}.tk-contact{--tk:#db2777}.tk-attendance{--tk:#0e8aa8}.tk-followup{--tk:#4f46e5}
.tk-line-general{--tk:#6b7a86}.tk-line-call{--tk:#1f9d55}.tk-line-reminder{--tk:#2563eb}.tk-line-documents{--tk:#7c3aed}.tk-line-payment{--tk:#b7740a}
.tk-line-camp{--tk:#ea580c}.tk-line-contact{--tk:#db2777}.tk-line-attendance{--tk:#0e8aa8}.tk-line-followup{--tk:#4f46e5}
.tk-status{display:inline-block;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:600}
.st-new{background:#e3edff;color:#1d4fd8}.st-awaiting_acceptance{background:#fff1d6;color:#9a6200}.st-in_progress{background:#d9f5ef;color:#0f7a68}
.st-waiting_repeat{background:#efe6ff;color:#6b3fd0}.st-done{background:#e2f6e9;color:#1f7a45}.st-cancelled{background:#eceff2;color:#5b6670}
.tk-flag{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.02em;padding:1px 7px;border-radius:6px}
.tk-urgent{background:#e0453a;color:#fff}.tk-high{background:#ffe1dd;color:#c4321f}
.tk-repeat{font-size:11px;font-weight:600;color:var(--accent,#1aa6c8)}
.tk-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 10px}
.tk-legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0 0 12px}
.tk-board{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-start;padding-bottom:8px}
.tk-col{flex:1 1 230px;max-width:340px;min-width:220px}
.tk-col h2{font-size:13px;text-transform:uppercase;letter-spacing:.04em;text-align:center;margin:0 0 8px;display:flex;flex-direction:column;gap:2px}
.tk-col h2 small{text-transform:none;letter-spacing:0;font-weight:400;color:var(--muted)}
.tk-col-overdue h2{color:#e0453a}
.tk-card{display:flex;flex-direction:column;gap:4px;padding:9px 11px;margin:0 0 8px;border-radius:10px;border:1px solid var(--line);border-left:4px solid var(--tk);
  background:#fff;color:#10232b;text-decoration:none;font-size:13px;line-height:1.35}
.tk-card:hover{outline:2px solid var(--accent,#1aa6c8)}
.tk-card .muted{color:#5d717a}
.tk-card .tk-title{white-space:pre-line;overflow-wrap:anywhere}
.tk-badges{display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center}
.tk-late{background:#fff4f3}
.pr-urgent.tk-card,.planner-task.pr-urgent{box-shadow:inset 0 0 0 2px #e0453a}
.pr-high.tk-card{box-shadow:inset 0 0 0 1px #f08a7e}
tr.pr-urgent td:first-child,article.pr-urgent{box-shadow:inset 4px 0 0 #e0453a}
tr.pr-high td:first-child,article.pr-high{box-shadow:inset 4px 0 0 #f08a7e}
article.pr-urgent,article.pr-high{padding-left:12px}
.planner-task[class*=tk-line-]{border-left:3px solid var(--tk);padding-left:8px}
section.card[class*=tk-line-]{border-left:4px solid var(--tk)}
html[data-theme=dark] .tk-general{--tk:#b8c7d0}html[data-theme=dark] .tk-call{--tk:#6ee7a0}html[data-theme=dark] .tk-reminder{--tk:#8fb4ff}
html[data-theme=dark] .tk-documents{--tk:#c4a5ff}html[data-theme=dark] .tk-payment{--tk:#f7c96b}html[data-theme=dark] .tk-camp{--tk:#ffad7a}
html[data-theme=dark] .tk-contact{--tk:#ff9cc8}html[data-theme=dark] .tk-attendance{--tk:#7fe3f7}html[data-theme=dark] .tk-followup{--tk:#a5a1ff}
html[data-theme=dark] a.tk-card{background:rgba(3,30,39,.72);color:var(--ink);border-color:var(--line);border-left-color:var(--tk)}
html[data-theme=dark] a.tk-card .muted{color:var(--muted)}
html[data-theme=dark] .tk-line-general{--tk:#b8c7d0}html[data-theme=dark] .tk-line-call{--tk:#6ee7a0}html[data-theme=dark] .tk-line-reminder{--tk:#8fb4ff}
html[data-theme=dark] .tk-line-documents{--tk:#c4a5ff}html[data-theme=dark] .tk-line-payment{--tk:#f7c96b}html[data-theme=dark] .tk-line-camp{--tk:#ffad7a}
html[data-theme=dark] .tk-line-contact{--tk:#ff9cc8}html[data-theme=dark] .tk-line-attendance{--tk:#7fe3f7}html[data-theme=dark] .tk-line-followup{--tk:#a5a1ff}
html[data-theme=dark] a.tk-card.tk-late{background:rgba(120,20,35,.35)}
html[data-theme=dark] .st-new{background:rgba(96,140,255,.2);color:#a9c3ff}html[data-theme=dark] .st-awaiting_acceptance{background:rgba(240,176,60,.18);color:#f5c76a}
html[data-theme=dark] .st-in_progress{background:rgba(46,197,170,.18);color:#7fe8d3}html[data-theme=dark] .st-waiting_repeat{background:rgba(160,120,255,.2);color:#cdb6ff}
html[data-theme=dark] .st-done{background:rgba(52,199,120,.18);color:#7be3a8}html[data-theme=dark] .st-cancelled{background:rgba(160,175,185,.16);color:#b8c7d0}
html[data-theme=dark] .tk-high{background:rgba(240,90,105,.22);color:#ffb0b8}
html[data-theme=light] .tk-col-overdue h2{color:#d0352b}html[data-theme=dark] .tk-col-overdue h2{color:#ff9aa5}
.tk-closed{opacity:.6}.tk-closed .tk-title{text-decoration:line-through}
/* Grant control panel */
.gc-stats{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 14px}
.gc-stat{flex:1 1 200px;display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:12px}
.gc-stat b{font-size:22px}.gc-stat small{color:var(--muted)}.gc-bad b{color:#e0453a}
.gc-bar{display:block;height:8px;border-radius:6px;background:rgba(120,140,150,.25);overflow:hidden}
.gc-fill{display:block;height:100%;background:var(--accent,#1aa6c8);width:0}
.gc-w1{width:10%}.gc-w2{width:20%}.gc-w3{width:30%}.gc-w4{width:40%}.gc-w5{width:50%}.gc-w6{width:60%}.gc-w7{width:70%}.gc-w8{width:80%}.gc-w9{width:90%}.gc-w10{width:100%}
tr.gc-late td:first-child{box-shadow:inset 4px 0 0 #e0453a}tr.gc-soon td:first-child{box-shadow:inset 4px 0 0 #f0b03c}tr.gc-done{opacity:.65}
.ck-list{list-style:none;padding:0;margin:0 0 10px}.ck-list li{display:flex;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}
.ck-list li.ck-done span.ck-text{text-decoration:line-through;opacity:.6}.ck-list form{margin:0}
.ck-box{min-width:34px;padding:4px 8px}
.ck-list li form.inline{margin-left:auto}
#id_team,#id_responsibles,#id_assignees{columns:3 210px;column-gap:18px}#id_team>div,#id_responsibles>div,#id_assignees>div{break-inside:avoid}
/* Event reports */
.er-status{display:inline-block;padding:2px 8px;border-radius:10px;font-size:.85em;background:#eef1f4;color:#33414e}
.er-submitted{background:#fff3d6;color:#7a5200}.er-accepted{background:#dcf3e4;color:#1d6b3a}.er-returned{background:#fde2e4;color:#8c1d2b}
html[data-theme=dark] .er-status{background:#26333f;color:#d6dee6}html[data-theme=dark] .er-submitted{background:#4a3a12;color:#ffd98a}
html[data-theme=dark] .er-accepted{background:#173f29;color:#9be6b6}html[data-theme=dark] .er-returned{background:#4a1d24;color:#ffb3bb}
p.er-returned{padding:8px 12px;border-radius:8px}
.er-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
.er-photos img{width:100%;height:140px;object-fit:cover;border-radius:8px;display:block}
.er-numbers{display:flex;gap:16px;flex-wrap:wrap}.er-numbers input{max-width:120px}
.er-lines ul,.er-lines div{list-style:none;padding-left:0;max-height:260px;overflow:auto}
.er-files{padding-left:18px}
#id_more_grant_activities,#id_activities{max-height:260px;overflow:auto;list-style:none;padding-left:0}
/* Teacher's «Мой день» as cards, like the task board: colour by lesson format */
.md-individual{--tk:#7c5ce6}.md-mini{--tk:#d48806}.md-group{--tk:#14a38b}.md-none{--tk:#6b7a86}.md-trial{--tk:#2563eb}
.md-swap-in{--tk:#0e8aa8}.md-swap-out{--tk:#b7740a}
.md-board{margin-top:6px}
.md-card{cursor:default}.md-card:hover{outline:none}a.md-card{cursor:pointer}a.md-card:hover{outline:2px solid var(--accent,#1aa6c8)}
.md-trial-card{border-left-style:dashed}
.md-now{box-shadow:0 0 0 2px var(--accent,#1aa6c8)}
.md-pupils{font-weight:700;overflow-wrap:anywhere}
.md-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.md-actions a,.md-actions span{display:inline-block;padding:3px 9px;border-radius:8px;border:1px solid var(--line);font-size:12px;font-weight:600;text-decoration:none;color:inherit}
.md-actions a:hover{border-color:var(--accent,#1aa6c8)}
.md-actions .warn{border-color:#e39a12;color:#9a6200}
.md-teacher .tk-col h2{font-size:13px}
html[data-theme=dark] .md-individual{--tk:#b9a5ff}html[data-theme=dark] .md-mini{--tk:#f7c96b}html[data-theme=dark] .md-group{--tk:#6fe0c8}
html[data-theme=dark] .md-none{--tk:#b8c7d0}html[data-theme=dark] .md-trial{--tk:#8fb4ff}
html[data-theme=dark] .md-swap-in{--tk:#7fe3f7}html[data-theme=dark] .md-swap-out{--tk:#f7c96b}
html[data-theme=dark] .md-card{background:rgba(3,30,39,.72);color:var(--ink);border-color:var(--line);border-left-color:var(--tk)}
html[data-theme=dark] .md-card .muted{color:var(--muted)}
html[data-theme=dark] .md-card.tk-late{background:rgba(120,20,35,.35)}
html[data-theme=dark] .md-actions .warn{border-color:#f7c96b;color:#f7c96b}
/* Teacher's own journal lines: events, trips, after-school care */
.wl-pending{background:#fff1d6;color:#9a6200}.wl-accepted{background:#dcf3e4;color:#1d6b3a}.wl-returned{background:#fde2e4;color:#8c1d2b}
html[data-theme=dark] .wl-pending{background:#4a3a12;color:#ffd98a}html[data-theme=dark] .wl-accepted{background:#173f29;color:#9be6b6}
html[data-theme=dark] .wl-returned{background:#4a1d24;color:#ffb3bb}
.wl-sum td:last-child{text-align:right;font-weight:700}
/* Pay from the journal: month status and the priced table */
.pay-submitted{background:#fff1d6;color:#9a6200}.pay-approved{background:#dcf3e4;color:#1d6b3a}.pay-returned{background:#fde2e4;color:#8c1d2b}.pay-none{background:#e8eef0;color:#4b5d64}
html[data-theme=dark] .pay-submitted{background:#4a3a12;color:#ffd98a}html[data-theme=dark] .pay-approved{background:#173f29;color:#9be6b6}
html[data-theme=dark] .pay-returned{background:#4a1d24;color:#ffb3bb}html[data-theme=dark] .pay-none{background:#24343a;color:#b8c7cc}
.pay-sum td,.pay-sum th{text-align:right}.pay-sum td:first-child,.pay-sum th:first-child{text-align:left}.pay-sum tfoot th{font-size:1.05em}
/* Консультация вне расписания */
.cs-form [hidden]{display:none!important}
.cs-form h2{margin:18px 0 6px;font-size:1.05em}
.cs-row{display:flex;flex-wrap:wrap;gap:12px}.cs-row .cs-field{flex:1 1 180px;margin:6px 0}
.cs-field label{display:block;font-weight:600;margin-bottom:4px}.cs-field small{display:block;margin-top:3px}
.cs-found{margin:6px 0 10px;padding:10px 12px;border-radius:10px;background:rgba(127,140,160,.12)}
.cs-yes{color:#1d6b3a;font-weight:700;margin:0 0 6px}.cs-none{color:#9a6200;font-weight:700;margin:0}
html[data-theme=dark] .cs-yes{color:#7fe0a2}html[data-theme=dark] .cs-none{color:#ffd98a}
.cs-person{display:block;margin:4px 0}.cs-who{display:flex;flex-wrap:wrap;gap:8px 20px;margin:4px 0 8px}
.cs-who label{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-weight:600}.cs-who input[type=radio],.cs-person input{width:auto;min-width:0;margin:0 6px 0 0;flex:none}
.wl-rejected{background:#e9e9ee;color:#555}html[data-theme=dark] .wl-rejected{background:#33363d;color:#c9ccd3}
.wl-pay{display:flex;flex-direction:column;gap:6px;margin:8px 0}.wl-pay label{display:flex;align-items:center;gap:8px}.wl-pay input[type=radio]{width:auto;min-width:0;margin:0;flex:none}
.ep-block .ep-found{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.ep-block .ep-add{width:auto;font-weight:500;text-align:left}
.ep-chosen{list-style:none;padding:0;margin:4px 0 8px}.ep-chosen li{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:4px 0}
.ep-chosen .ep-drop{width:auto;padding:2px 10px;min-height:0}.ep-people{margin:4px 0 8px}
/* Comments at the bottom of a task card, and dragging a card to another day (2026-10-21). */
.tk-notes{display:flex;flex-direction:column;gap:3px;margin-top:4px;padding-top:5px;border-top:1px dashed var(--line)}
.tk-notes small{color:#3f5560;white-space:pre-line;overflow-wrap:anywhere}
html[data-theme=dark] .tk-notes small{color:var(--muted)}
.tk-card[draggable=true]{cursor:grab}
.tk-card.tk-dragging{opacity:.45}
.tk-col.tk-drop-here{outline:2px dashed var(--accent,#1aa6c8);outline-offset:2px;border-radius:12px}
.tk-hint{margin:0 0 6px;font-size:13px}
.amo-tasks{display:flex;flex-direction:column;gap:6px;border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin:0 0 12px}
.amo-tasks label{display:flex;gap:8px;align-items:flex-start;font-weight:400}
.vk-chat{display:flex;flex-direction:column;gap:8px;max-height:460px;overflow-y:auto;margin:0 0 12px;padding:4px}
.vk-msg{max-width:78%;padding:8px 12px;border-radius:12px;border:1px solid var(--line);align-self:flex-start;white-space:normal;overflow-wrap:anywhere}
.vk-msg.vk-out{align-self:flex-end;background:rgba(46,197,230,.12)}
.vk-msg small{display:block;color:var(--muted);font-size:12px;margin-bottom:2px}
.vk-answer textarea{width:100%;min-height:80px}
