input,
select,
textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #bdb5a5;
    border-radius: 7px;
    background: #fff;
    font: inherit;
}

textarea { resize: vertical; }
input:focus,
select:focus,
textarea:focus { outline: 3px solid #e8c3bd; border-color: var(--red); }
button:disabled,
select:disabled { cursor: not-allowed; opacity: .55; }
.events small { display: block; margin-top: 5px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.message-log { display: grid; gap: 12px; margin-top: 18px; }
.message-entry { border: 1px solid #d8d0c1; border-left: 4px solid #777; border-radius: 8px; padding: 14px 16px; background: #fff; }
.message-entry.inbound { border-left-color: #356f58; background: #f4faf7; }
.message-entry.outbound { border-left-color: #9b3a2f; background: #fff8f5; }
.message-entry p { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-entry small { color: #6d665c; }
.message-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.message-status { flex: 0 0 auto; border-radius: 999px; padding: 3px 8px; font-size: .78rem; background: #e8e3da; }
.message-status.sent, .message-status.received { background: #dcefe5; color: #245640; }
.message-status.pending { background: #fff0c9; color: #745200; }
.message-status.failed { background: #f5d9d5; color: #80281e; }
.message-status.skipped { background: #e8e3da; color: #5d574e; }
.player-actions { display: inline-flex; align-items: center; gap: 12px; }
.debug-panel { border-color: #b8892f; background: #fffaf0; }
.debug-player-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.inline-debug-form { max-width: 620px; margin: 18px 0 24px; padding: 16px; border: 1px dashed #b8892f; border-radius: 9px; }
.inline-debug-form label { margin-top: 0; }
.inline-debug-form .button { margin-top: 0; white-space: nowrap; }
.debug-deadline { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 18px 0 24px; padding: 16px; border: 1px solid #b8892f; border-radius: 9px; background: #fff4d9; }
.debug-deadline p { margin: 3px 0 0; }
.debug-deadline .button { flex: 0 0 auto; }
.debug-grid { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 26px; align-items: start; }
.debug-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 0 0 22px; }
.debug-facts dt { color: var(--muted); }
.debug-facts dd { margin: 0; overflow-wrap: anywhere; }
.message-log.compact { max-height: 520px; overflow: auto; padding-right: 4px; }
.message-log.compact .message-entry { padding: 11px 13px; }

@media (max-width: 640px) {
    .message-meta, .row-between { align-items: flex-start; flex-direction: column; }
    .debug-grid { grid-template-columns: 1fr; }
    .player-actions { display: flex; flex-direction: column; align-items: flex-end; }
    .debug-deadline { align-items: stretch; flex-direction: column; }
}
