:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #24272d;
  background: #f4f5f7;
  color-scheme: light;
  --line: #daddE2;
  --orange: #a84009;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: white; border-bottom: 1px solid var(--line); padding: 18px max(20px, calc((100% - 1040px) / 2));
}
.brand { color: inherit; text-decoration: none; font-size: 25px; font-weight: 650; line-height: 1; }
.brand span { color: var(--orange); }
.brand small { display: block; font-size: 12px; font-weight: 400; margin-top: 6px; }
#account { display: flex; align-items: center; gap: 12px; overflow-wrap: anywhere; }
main { max-width: 1080px; margin: auto; padding: 36px 20px; }
h1 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.4rem); }
h2 { margin: 0; font-size: 1.15rem; }
.heading, .ticket-head, .actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sign-in, .ticket, dialog { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.sign-in { max-width: 420px; margin: 24px auto; }
.sign-in h1 { font-size: 1.6rem; margin-bottom: 18px; }
form, label { display: grid; gap: 8px; }
form { gap: 14px; }
input, textarea, button { font: inherit; color: inherit; }
input, textarea { width: 100%; border: 1px solid #a8adb5; padding: 9px 11px; border-radius: 8px; }
textarea { resize: vertical; }
button, .actions a { border: 1px solid #b8bcc4; background: white; border-radius: 8px; padding: 8px 13px; cursor: pointer; }
.actions a { text-decoration: none; }
button:hover { background: #f1f2f4; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.primary, .actions a.primary, .filters button[aria-pressed="true"] { color: white; background: var(--orange); border-color: var(--orange); }
.primary:hover, .actions a.primary:hover { background: #8d3206; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tickets { display: grid; gap: 12px; }
.ticket { border-left: 4px solid #ee7428; overflow-wrap: anywhere; }
.ticket p { white-space: pre-wrap; }
.ticket dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 10px; }
.ticket dt { font-size: .83rem; color: #555b65; }
.ticket dd { margin: 2px 0 0; }
.state { background: #e8ebee; color: #303943; border-radius: 8px; padding: 4px 9px; }
.state[data-state="new"] { color: #762e00; background: #fff0e2; }
.state[data-state="resolved"] { color: #205843; background: #e5f5eb; }
.message, #resolve-error, #agent-error { color: #8d3206; }
dialog { width: min(450px, calc(100% - 28px)); }
dialog::backdrop { background: #24272d70; }
dialog .actions { justify-content: flex-end; }
.ticket-alert {
  position: fixed; z-index: 1; right: 20px; bottom: 20px;
  width: min(340px, calc(100% - 40px)); padding: 16px;
  background: white; border: 1px solid var(--line); border-left: 4px solid var(--orange);
  border-radius: 10px; box-shadow: 0 6px 24px #24272d30;
}
.ticket-alert .actions { margin-top: 12px; justify-content: flex-start; }
