/* ===== 班级奖励兑换商店 class-store ===== */
.cs-prize-form {
    display: grid;
    grid-template-columns: 1fr 78px 78px auto;
    gap: 8px;
    margin-bottom: 12px;
}
.cs-prize-form .calc-input { height: 40px; }
.cs-w-pts, .cs-w-stock { text-align: center; }

.cs-prize-list { display: flex; flex-direction: column; gap: 8px; }
.cs-prize {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 11px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    font-size: 13.5px;
}
.cs-prize .cs-pz-nm { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-prize .cs-pz-pts {
    font-weight: 900;
    color: #7a5af8;
    background: rgba(122,90,248,.12);
    border-radius: 99px;
    padding: 2px 10px;
    font-size: 12.5px;
    white-space: nowrap;
}
.cs-prize .cs-pz-stock { color: var(--c-text-muted); font-size: 12px; min-width: 52px; text-align: right; }
.cs-prize .cs-pz-stock.is-out { color: #e0447c; }
.cs-prize button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--c-text-muted);
    font-size: 13px;
    padding: 2px 4px;
}
.cs-prize button:hover { color: #e0447c; }

.cs-sub { margin-top: 18px; }
.cs-textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.8;
    color: var(--c-text);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    outline: none;
    resize: vertical;
}
.cs-textarea:focus { border-color: #7a5af8; box-shadow: 0 0 0 3px rgba(122,90,248,.14); }
.cs-names-btns { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }

/* 学生行 */
.cs-student-list { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.cs-stu {
    display: grid;
    grid-template-columns: minmax(64px, 1fr) 64px auto minmax(120px, 1.4fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 11px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
}
.cs-stu .cs-stu-nm { font-weight: 800; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-stu .cs-stu-bal {
    text-align: center;
    font-size: 17px;
    font-weight: 900;
    color: #7a5af8;
    font-variant-numeric: tabular-nums;
}
.cs-stu .cs-quick { display: flex; gap: 4px; }
.cs-stu .cs-quick button {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(31,157,67,.4);
    background: rgba(31,157,67,.08);
    color: #1f9d43;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    font-size: 12.5px;
}
.cs-stu .cs-quick button:active { transform: scale(.9); }
.cs-stu select {
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    color: var(--c-text);
    font-size: 12.5px;
    padding: 0 8px;
    outline: none;
}
.cs-stu .cs-exchange {
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    border: none;
    background: #7a5af8;
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.cs-stu .cs-exchange:disabled { background: var(--c-border); color: var(--c-text-muted); cursor: not-allowed; }
.cs-stu.is-empty { grid-template-columns: 1fr; }
.cs-stu select option:disabled { color: var(--c-text-muted); }

/* 记录 */
.cs-log { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.cs-log-empty { font-size: 12.5px; color: var(--c-text-muted); padding: 4px 0; }
.cs-rec {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 9px;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    font-size: 12.5px;
}
.cs-rec .cs-rec-main { flex: 1; min-width: 0; }
.cs-rec .cs-rec-main b { white-space: nowrap; }
.cs-rec .cs-rec-time { color: var(--c-text-muted); font-size: 11.5px; white-space: nowrap; }
.cs-rec .cs-rec-pts { font-weight: 900; white-space: nowrap; }
.cs-rec .cs-rec-pts.is-plus { color: #1f9d43; }
.cs-rec .cs-rec-pts.is-minus { color: #e0447c; }
.cs-rec button { border: none; background: none; cursor: pointer; font-size: 13px; color: var(--c-text-muted); padding: 0 2px; }
.cs-rec button:hover { color: #e0447c; }

/* 打印价目表 */
#csPrintArea { display: none; }
#csPrintArea .cs-print-sheet { width: 210mm; min-height: 297mm; padding: 18mm 16mm; box-sizing: border-box; font-family: "Microsoft YaHei", sans-serif; color: #222; }
.cs-print-title { text-align: center; font-size: 26px; font-weight: 900; margin: 0 0 4px; }
.cs-print-sub { text-align: center; font-size: 13px; color: #666; margin-bottom: 16px; }
.cs-print-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cs-print-table th, .cs-print-table td { border: 1px solid #888; padding: 9px 12px; text-align: center; }
.cs-print-table th { background: #efe9ff; font-weight: 800; }
.cs-print-table td:nth-child(1) { text-align: left; font-weight: 700; }
.cs-print-table td:nth-child(2) { color: #7a5af8; font-weight: 900; font-size: 17px; white-space: nowrap; }
.cs-print-foot { margin-top: 18px; font-size: 12.5px; color: #666; text-align: center; }

@media print {
    body * { visibility: hidden !important; }
    #csPrintArea, #csPrintArea * { visibility: visible !important; }
    #csPrintArea { display: block !important; position: absolute; inset: 0; }
    @page { size: A4 portrait; margin: 0; }
}

@media (max-width: 760px) {
    .cs-prize-form { grid-template-columns: 1fr 64px 64px; }
    .cs-prize-form #csPrizeAdd { grid-column: 1 / -1; }
    .cs-stu { grid-template-columns: 1fr 58px auto; }
    .cs-stu select { grid-column: 1 / 3; }
    .cs-stu .cs-exchange { grid-column: 3; grid-row: 2; }
}
