/* ======================================================================
 *  家长会记录模板 /tool/parent-meeting-notes
 *  依赖 calc-common.css，支持黑夜模式与打印。
 * ====================================================================== */

.pm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pm-head-ops { display: flex; align-items: center; gap: 8px; }
.pm-saved { font-size: 11.5px; color: var(--c-text-muted); }
.pm-saved.is-ok { color: #1f9d43; }
.pm-mini { height: 32px; padding: 0 13px; font-size: 12px; }

.pm-sec {
    font-size: 14px;
    font-weight: 800;
    color: var(--c-text);
    margin: 18px 0 9px;
    padding-top: 14px;
    border-top: 1px dashed var(--c-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
#pmApp .pm-sec:first-of-type,
.pm-head + .pm-sec { border-top: none; padding-top: 4px; margin-top: 4px; }
.pm-add {
    margin-left: auto;
    height: 28px;
    padding: 0 11px;
    font-size: 11.5px;
    font-weight: 700;
}

.pm-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.pm-grid label { font-size: 12px; font-weight: 700; color: var(--c-text-sub); display: grid; gap: 5px; }
.pm-input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface-soft);
    color: var(--c-text);
    font-family: inherit;
    font-size: 13px;
    padding: 0 11px;
    outline: none;
    transition: border-color 0.15s;
}
.pm-input:focus { border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14); }
input.pm-input[type="date"] { padding-top: 0; padding-bottom: 0; }

.pm-textarea {
    width: 100%;
    border: 1px solid var(--c-border);
    border-radius: 11px;
    background: var(--c-surface-soft);
    color: var(--c-text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.75;
    padding: 10px 12px;
    resize: vertical;
    outline: none;
}
.pm-textarea:focus { border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14); }

/* ---------- 科目卡 ---------- */
.pm-subjects { display: grid; gap: 10px; }
.pm-subject {
    border: 1px solid var(--c-border);
    border-radius: 13px;
    background: var(--c-bg-card);
    padding: 11px 13px;
}
.pm-subject-head { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.pm-subj-name { flex: 1; max-width: 200px; font-weight: 800; }
.pm-del {
    border: none;
    background: none;
    color: var(--c-text-muted);
    cursor: pointer;
    font-size: 13px;
    width: 28px; height: 28px;
    border-radius: 8px;
}
.pm-del:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.pm-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--c-text-muted); margin: 7px 0 4px; }

/* ---------- 待办 ---------- */
.pm-todos { display: grid; gap: 8px; }
.pm-todo {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--c-border);
    border-radius: 11px;
    background: var(--c-bg-card);
    padding: 8px 10px;
}
.pm-todo.is-done { background: rgba(52, 199, 89, 0.06); border-color: rgba(52, 199, 89, 0.3); }
.pm-check {
    flex: none;
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 2px solid var(--c-border);
    background: var(--c-surface-soft);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
}
.pm-check.is-on { background: #34c759; border-color: #34c759; }
.pm-todo-text { flex: 1; min-width: 0; }
.pm-todo-owner { width: 76px; flex: none; }
.pm-todo-due { width: 140px; flex: none; }
.pm-todo.is-done .pm-todo-text { text-decoration: line-through; color: var(--c-text-muted); }

/* 打印区屏幕隐藏 */
#pmPrintArea { display: none; }

/* ---------- 右侧 ---------- */
.pm-side h3 { font-size: 14.5px; font-weight: 800; margin: 14px 0 7px; }
.pm-side h3:first-child { margin-top: 0; }
.pm-side p, .pm-side li { font-size: 13px; line-height: 1.85; color: var(--c-text-sub); }
.pm-side b { color: var(--c-text); }
.pm-side ol { padding-left: 20px; }
.pm-order {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    display: grid;
    gap: 6px;
}
.pm-order p { margin: 0; font-size: 12.5px; }
.pm-ban { padding-left: 20px; }
.pm-ban li { margin-bottom: 5px; color: #d97706; }

@media (max-width: 800px) {
    .pm-grid { grid-template-columns: 1fr 1fr; }
    .pm-todo { flex-wrap: wrap; }
    .pm-todo-text { flex-basis: calc(100% - 36px); }
    .pm-todo-owner, .pm-todo-due { width: auto; flex: 1; }
}

/* ---------- 黑夜模式 ---------- */
[data-theme="dark"] .pm-input,
[data-theme="dark"] .pm-textarea { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pm-subject,
[data-theme="dark"] .pm-todo { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .pm-check { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .pm-todo.is-done { background: rgba(52, 199, 89, 0.1); }
[data-theme="dark"] .pm-order { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .pm-ban li { color: #fbbf24; }

/* ---------- 打印 ---------- */
@media print {
    body * { visibility: hidden !important; }
    #pmPrintArea, #pmPrintArea * { visibility: visible !important; }
    #pmPrintArea {
        display: block !important;
        position: absolute;
        left: 0; top: 0;
        width: 100%;
        padding: 12mm 14mm;
        background: #fff;
        color: #000;
    }
    .pm-p-title { font-size: 18pt; text-align: center; margin: 0 0 10pt; }
    .pm-p-meta { width: 100%; border-collapse: collapse; margin-bottom: 8pt; }
    .pm-p-meta td { border: 1px solid #666; padding: 4pt 8pt; font-size: 10.5pt; }
    .pm-p-meta td:nth-child(odd) { background: #f3f4f6; font-weight: 700; width: 18%; }
    #pmPrintArea h2 { font-size: 12.5pt; margin: 11pt 0 4pt; }
    #pmPrintArea h3 { font-size: 11pt; margin: 7pt 0 3pt; }
    #pmPrintArea p { font-size: 10.5pt; line-height: 1.7; margin: 0 0 3pt; }
    .pm-p-home { color: #333; }
    #pmPrintArea ul { margin: 0; padding-left: 18pt; }
    #pmPrintArea li { font-size: 10.5pt; line-height: 1.8; }
    .pm-p-todo { width: 100%; border-collapse: collapse; }
    .pm-p-todo th, .pm-p-todo td { border: 1px solid #888; padding: 4pt 7pt; font-size: 10.5pt; text-align: left; }
    .pm-p-todo th { background: #f3f4f6; }
    .pm-p-sign { margin-top: 14pt !important; font-size: 10.5pt !important; }
    @page { size: A4; margin: 0; }
}
