.history-main{max-width:1000px;margin:0 auto;padding:42px 32px 64px;min-height:calc(100vh - 180px)}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.history-heading h1,.history-main h1{font-size:32px;margin:8px 0}
.history-home-link{display:inline-flex;align-items:center;text-decoration:none}
.history-filters{display:flex;gap:12px;flex-wrap:wrap;padding:18px;background:#fff;border:1px solid var(--line);border-radius:18px;margin-bottom:18px}
.history-filters label{display:grid;gap:6px;min-width:145px;font-size:13px;font-weight:700}
.history-filters select{border:1px solid var(--line);border-radius:10px;padding:8px 12px;background:var(--paper);color:var(--ink)}
.history-items{display:grid;gap:14px;margin-top:14px}
.history-card{padding:20px 22px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 4px 14px #26493c08}
.history-card-heading,.history-card-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}
.history-card-heading h2{font-size:20px;margin:4px 0 0}
.history-date{font-size:13px;color:var(--muted);margin:0}
.history-status-badge{white-space:nowrap;padding:6px 11px;border-radius:20px;background:var(--mint);font-size:12px;color:var(--green-dark)}
.status-active{background:#fff3d4;color:#785c12}.status-abandoned{background:#f3e8e4;color:#8a4b3a}
.history-facts,.history-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.history-field{padding:12px 14px;background:#f8faf6;border-radius:12px;min-width:0}
.history-field dt{font-size:12px;color:var(--muted)}.history-field dd{font-weight:700;margin:6px 0 0;overflow-wrap:anywhere}
.history-card-footer{padding-top:13px;border-top:1px solid var(--line)}
.history-detail-link,.history-back{font-size:14px;font-weight:700;text-decoration:none}
.history-pagination{display:flex;align-items:center;justify-content:center;gap:18px;margin:24px 0}
.history-empty{text-align:center;padding:46px 20px;margin:24px 0;background:#fff;border:1px dashed #cbd9cc;border-radius:20px}
.history-empty>span{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 12px;border-radius:50%;background:#fbf2d9;color:#ac8526;font-size:30px}
.history-empty h2{margin:8px 0;font-size:21px}.history-empty p{color:var(--muted);line-height:1.8}.history-empty .primary{display:inline-block;text-decoration:none;margin-top:8px}
.history-empty.compact{padding:18px}.history-empty.compact p{margin:0}
.history-back{display:inline-block;margin:0 0 22px;color:var(--green)}
.history-turn-heading{font-size:21px;margin:26px 0 14px}
.history-turns{display:grid;gap:14px}
.history-turn{padding:17px 20px;background:#fff;border:1px solid var(--line);border-radius:18px}
.history-turn-number{font-size:12px;font-weight:700;color:var(--muted);margin:0 0 14px}
.history-message{max-width:88%;margin-bottom:14px}.history-message:last-child{margin-bottom:0}
.history-message .speaker{font-size:12px;color:var(--muted);margin:0 0 6px}
.history-message .bubble{font-size:17px;line-height:1.65;padding:13px 16px;margin:0;background:var(--mint);border-radius:3px 16px 16px}
.history-message.student{margin-left:auto}.history-message.student .speaker{text-align:right}.history-message.student .bubble{background:#fbefd0;border-radius:16px 3px 16px 16px}
.history-feedback{margin-top:8px}
@media(max-width:720px){.history-main{padding:24px 16px 42px}.history-heading{align-items:flex-start}.history-heading h1,.history-main h1{font-size:27px}.history-home-link{font-size:12px;padding:9px 11px}.history-filters{display:grid;grid-template-columns:1fr 1fr;padding:14px}.history-filters label:last-child{grid-column:1/-1}.history-facts,.history-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.history-card{padding:16px}.history-card-heading h2{font-size:18px}.history-card-footer{align-items:flex-start;flex-direction:column;gap:8px}.history-turn{padding:14px}.history-message{max-width:96%}}
