body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1f2328; background: #f6f8fa; }
.login { max-width: 380px; margin: 12vh auto; background: #fff; border: 1px solid #d0d7de; border-radius: 10px; padding: 28px; }
.login h1 { font-size: 20px; margin: 0 0 4px; }
.login label { display: block; margin-top: 12px; }
.login input { box-sizing: border-box; width: 100%; padding: 9px 11px; border: 1px solid #d0d7de; border-radius: 6px; margin: 6px 0 12px; font: inherit; }
.login .code { letter-spacing: .5em; font-size: 20px; text-align: center; }
.muted { color: #656d76; }
.error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; border-radius: 6px; padding: 8px 10px; }
button { font: inherit; cursor: pointer; }
button.primary { width: 100%; padding: 9px; border: 0; border-radius: 6px; background: #0b5cad; color: #fff; }
button.link { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; }
form.inline { display: inline; }
.bar { display: flex; justify-content: space-between; padding: 12px 20px; background: #0b3a66; color: #fff; }
.page { padding: 20px; }
.bar a { color: inherit; text-decoration: none; }
.tickets { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid #d0d7de; border-radius: 8px; }
.ticket { border-bottom: 1px solid #eaeef2; }
.ticket:last-child { border-bottom: 0; }
.ticket a { display: block; padding: 12px 14px; color: inherit; text-decoration: none; }
.ticket a:hover { background: #f6f8fa; }
.ticket.open a { background: #ddf4ff; box-shadow: inset 3px 0 0 #0b5cad; }
.ticket .meta { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #656d76; }
.ticket .status { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 11px; background: #eaeef2; color: #1f2328; }
.ticket .title { display: block; font-weight: 600; margin: 3px 0; }
.ticket .preview { display: block; font-size: 13px; color: #656d76; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Inbox: the ticket list in the middle, the open Ticket as a conversation on the right. */
.inbox { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1280px; margin: 0 auto; align-items: start; }
.conversation { background: #fff; border: 1px solid #d0d7de; border-radius: 8px; padding: 18px 20px; }
.conversation.empty { background: none; border: 1px dashed #d0d7de; min-height: 120px; }
.conversation h1 { font-size: 20px; margin: 0 0 4px; }
.conversation header .status { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 11px; background: #eaeef2; color: #1f2328; }
.entries { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.entry.customer, .entry.team { max-width: 85%; border-radius: 10px; padding: 9px 12px; }
.entry.customer { align-self: flex-end; background: #ddf4ff; border: 1px solid #b6e3ff; }
.entry.team { align-self: flex-start; background: #f6f8fa; border: 1px solid #d0d7de; }
.entry .head { display: flex; gap: 10px; justify-content: space-between; font-size: 13px; color: #656d76; margin-bottom: 3px; }
.entry .writer { font-weight: 600; color: #1f2328; }
.entry .text { white-space: pre-line; overflow-wrap: anywhere; }
.entry.status-change, .entry.file { align-self: center; font-size: 12px; color: #656d76; }
.entry.file .text { font-weight: 600; color: #1f2328; }
@media (max-width: 800px) { .inbox { grid-template-columns: 1fr; padding: 12px; } }
