/* ===== 值日表生成器 duty-roster ===== */
.dr-setup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 16px;
}
.dr-input { height: 40px; padding: 0 14px; }
.dr-textarea {
    width: 100%;
    min-height: 148px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    color: var(--c-text);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    outline: none;
    resize: vertical;
}
.dr-textarea:focus { border-color: #0aa8a8; box-shadow: 0 0 0 3px rgba(10,168,168,.15); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.dr-demo { justify-self: start; }

.dr-jobs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dr-job {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px 7px 13px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
}
.dr-job button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--c-text-muted);
    font-size: 12px;
    width: 18px; height: 18px;
    border-radius: 50%;
    padding: 0;
    line-height: 18px;
}
.dr-job button:hover { background: rgba(224,68,124,.15); color: #e0447c; }
.dr-addjob { display: flex; gap: 8px; }
.dr-addjob .calc-input { flex: 1; }
.dr-addjob .btn-primary { white-space: nowrap; height: 40px; }
.dr-offset-line { font-size: 13.5px; color: var(--c-text-sub); }
.dr-offset-num {
    width: 64px; height: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--c-text);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    margin: 0 4px;
    -moz-appearance: textfield;
}
.dr-offset-num::-webkit-outer-spin-button, .dr-offset-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.dr-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dr-actions .btn-primary { height: 46px; padding: 0 24px; font-weight: 800; }
.dr-actions .btn-ghost { font-weight: 700; }

/* 结果表 */
.dr-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid var(--c-border);
    border-radius: 14px;
}
.dr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.dr-table thead th {
    padding: 12px 10px;
    font-size: 13px;
    background: rgba(10,168,168,.12);
    color: #0a7f8c;
    border-bottom: 1px solid var(--c-border);
    text-align: center;
    white-space: nowrap;
}
.dr-table tbody td {
    padding: 11px 10px;
    text-align: center;
    border-bottom: 1px solid var(--c-border);
    border-right: 1px solid var(--c-border);
    color: var(--c-text);
    font-weight: 600;
}
.dr-table tbody td:last-child { border-right: none; }
.dr-table tbody tr:last-child td { border-bottom: none; }
.dr-table .dr-day {
    background: var(--c-surface-soft);
    font-weight: 800;
    white-space: nowrap;
    color: var(--c-text-sub);
    text-align: left;
    padding-left: 14px;
}
.dr-table .dr-day small { display: block; font-weight: 500; font-size: 11px; color: var(--c-text-muted); }

/* 打印 */
#drPrintArea { display: none; }
@media print {
    body * { visibility: hidden; }
    #drPrintArea, #drPrintArea * { visibility: visible; }
    #drPrintArea { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 8mm; }
    .dr-print-title { text-align: center; font-size: 20pt; margin-bottom: 3pt; }
    .dr-print-meta { text-align: center; font-size: 10.5pt; color: #444; margin-bottom: 10pt; }
    .dr-print-table { width: 100%; border-collapse: collapse; font-size: 11pt; }
    .dr-print-table th, .dr-print-table td {
        border: 1.2pt solid #333;
        padding: 7pt 6pt;
        text-align: center;
    }
    .dr-print-table th { background: #eee; font-size: 10.5pt; }
    .dr-print-table .dr-day { text-align: left; padding-left: 8pt; font-weight: 700; white-space: nowrap; }
    .dr-print-sign { margin-top: 14pt; font-size: 10.5pt; }
}

@media (max-width: 820px) {
    .dr-setup { grid-template-columns: 1fr; }
    .dr-actions .btn-primary, .dr-actions .btn-ghost { width: 100%; }
}
