:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #1b2733;
  --muted: #5b6b7c;
  --line: #dde3ea;
  --accent: #1d65aa;
  --danger: #b4232a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand span {
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}

.who {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.app {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 {
  font-size: 22px;
  margin: 0 0 4px;
}
h2 {
  font-size: 17px;
  margin: 0 0 10px;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 12px 0 4px;
}

input,
textarea,
select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: #fff;
  color: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  font: inherit;
  cursor: pointer;
}

.btn {
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}

.link {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tabs button {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
}
.tabs button[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.ticket-row {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.ticket-row:hover {
  border-color: var(--accent);
}
.ticket-row .subject {
  font-weight: 700;
  margin-bottom: 3px;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e8edf3;
  color: var(--muted);
}
.badge.open {
  background: #e2f0e4;
  color: #1f6b2c;
}
.badge.pending {
  background: #fdf0d8;
  color: #8a5a00;
}
.badge.closed {
  background: #e8edf3;
  color: var(--muted);
}

.msg {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  margin-bottom: 10px;
  background: var(--panel);
}
.msg.staff {
  background: #f2f7fc;
  border-color: #cfe0f0;
}
.msg .meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.msg .body {
  white-space: pre-wrap;
  word-break: break-word;
}

.notice {
  padding: 10px 13px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.notice.error {
  background: #fdeceb;
  color: var(--danger);
}
.notice.ok {
  background: #e8f3ea;
  color: #1f6b2c;
}

@media (max-width: 520px) {
  .app {
    padding: 16px 12px 48px;
  }
}
