:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #0e1717;
  color: #eef6f2;
  --muted: #a7bcb5;
  --border: #304240;
  --mint: #a5f3cb;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 77rem; margin: auto; padding: clamp(1rem, 5vw, 4rem); }
header, .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
header { margin-bottom: 2rem; }
h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 3.25rem); letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.15rem; }
header p { margin: .45rem 0 0; }
header p, #count, #empty, #no-results, th, #status { color: var(--muted); }
section { background: #152120; border: 1px solid var(--border); border-radius: 1rem; overflow: hidden; }
.toolbar { padding: 1.15rem 1.25rem; }
.search { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .875rem; }
.search input { width: min(15rem, 100%); padding: .55rem .7rem; border: 1px solid #49635a; border-radius: .55rem; background: #0e1717; color: inherit; font: inherit; }
.search input::placeholder { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .9rem 1.25rem; border-top: 1px solid var(--border); white-space: nowrap; }
th { background: #1b2a28; font-size: .875rem; font-weight: 600; }
tbody tr:hover { background: #192926; }
.account-email { margin-bottom: .25rem; }
.account-comment { min-width: 10rem; max-width: 24rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.account-created { display: block; margin-top: .25rem; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.timer { --timer-color: var(--mint); position: relative; display: inline-grid; width: 2.75rem; aspect-ratio: 1; place-items: center; border-radius: 50%; background: conic-gradient(var(--timer-color) var(--remaining, 100%), var(--border) 0); color: var(--timer-color); font-size: .875rem; font-variant-numeric: tabular-nums; }
.timer::before { content: ''; position: absolute; inset: .2rem; border-radius: inherit; background: #152120; }
.timer-seconds { position: relative; }
.timer-accessible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.timer.urgent { --timer-color: #ffbd82; }
.actions { display: flex; gap: .45rem; }
button { font: inherit; font-size: .875rem; font-weight: 650; padding: .55rem .75rem; border: 1px solid #49635a; border-radius: .55rem; background: #233832; color: inherit; cursor: pointer; }
button:hover { background: #304d42; }
button:disabled { opacity: .55; cursor: default; }
.code { padding: .3rem .45rem; border-color: transparent; background: transparent; color: var(--mint); font: 650 1.22rem ui-monospace, monospace; letter-spacing: .09em; }
.code:hover:not(:disabled) { border-color: #49635a; background: #233832; }
.copy-control { position: relative; display: inline-flex; }
.copy-feedback { position: absolute; z-index: 1; left: 50%; bottom: calc(100% + .25rem); transform: translateX(-50%); padding: .2rem .5rem; border-radius: .35rem; background: var(--mint); color: #10241c; font-size: .875rem; font-weight: 700; pointer-events: none; opacity: 0; }
.copy-control > .is-copied { border-color: #68bb94; background: #294a3c; color: var(--mint); }
.is-copied + .copy-feedback { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .copy-feedback, .copy-control > button { transition: opacity .15s, color .15s, background-color .15s, border-color .15s; }
}
:focus-visible { outline: 2px solid #f9df99; outline-offset: 3px; }
#empty, #no-results { padding: 2rem 1.25rem; margin: 0; }
#status { min-height: 1.5rem; }
.users-link { color: var(--mint); font-size: .875rem; }
.user-management form { display: grid; gap: .75rem; max-width: 26rem; margin: 1rem 0; }
.user-management input, .user-management select { display: block; width: 100%; margin-top: .25rem; padding: .55rem; color: inherit; background: #152120; border: 1px solid #49635a; border-radius: .45rem; font: inherit; }
.remember-session { display: flex; align-items: center; gap: .55rem; }
.user-management .remember-session input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--mint); }
.password-field { position: relative; display: block; margin-top: .25rem; }
.user-management .password-field input, dialog .password-field input { margin-top: 0; padding-right: 3rem; }
.password-toggle { position: absolute; inset: 1px 1px 1px auto; display: grid; width: 2.75rem; place-items: center; padding: 0; border: 0; background: transparent; }
dialog { width: min(28rem, 90vw); background: #152120; color: inherit; border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; }
dialog::backdrop { background: #07100dd9; }
dialog form { margin-top: 1rem; }
dialog label { display: block; margin-bottom: .75rem; }
dialog input, dialog select { width: 100%; margin-top: .25rem; padding: .55rem; color: inherit; background: #0e1717; border: 1px solid #49635a; border-radius: .45rem; font: inherit; }
#account-comment-field[hidden] { display: none; }
#account-comment-field textarea { display: block; width: 100%; margin-top: .25rem; padding: .55rem; color: inherit; background: #0e1717; border: 1px solid #49635a; border-radius: .45rem; font: inherit; resize: vertical; }
.message-editor { margin-bottom: 1rem; }
.message-editor summary { cursor: pointer; font-weight: 650; }
.message-editor label { margin: .75rem 0 .5rem; }
.message-editor textarea { display: block; width: 100%; margin-top: .25rem; padding: .65rem; border: 1px solid #49635a; border-radius: .45rem; background: #0e1717; color: inherit; font: inherit; resize: vertical; }
.message-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.message-preview { max-height: 12rem; overflow: auto; padding: .65rem; border: 1px solid var(--border); border-radius: .45rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.save-message-template { margin-top: .75rem; }
