:root {
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-title: 'Barlow Condensed', var(--font-ui);
  --bg: #0e1014;
  --panel: #151920;
  --panel-border: #232936;
  --text: #f2f4f8;
  --muted: #8b94a7;
  --blue: #2b6fe3;
  --blue-hover: #2361c9;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
}

header {
  border-bottom: 1px solid var(--panel-border);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--font-title);
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

h2 {
  font-family: var(--font-title);
  font-size: 22px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

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

.muted { color: var(--muted); }

button,
.button {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button:hover { background: var(--blue-hover); }

button:disabled { opacity: 0.55; cursor: default; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-border);
}

.row:last-child { border-bottom: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.card h3 {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 18px;
  margin: 0 0 6px;
}

.notice {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  color: var(--muted);
}

@media (max-width: 640px) {
  main { padding: 20px 16px 48px; }
  header { padding: 14px 16px; }
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  padding: 10px 12px;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
}

button.secondary { background: var(--panel-border); }
button.secondary:hover { background: #1b212c; }

.error { color: #e06a6a; min-height: 18px; margin: 4px 0 10px; font-size: 14px; }

a.row { text-decoration: none; color: inherit; }
a.row:hover { background: #1a1f28; }

a.back { display: inline-block; margin-bottom: 14px; text-decoration: none; }
a.back:hover { color: var(--text); }

.msg { padding: 12px 0; border-bottom: 1px solid var(--panel-border); }
.msg:last-child { border-bottom: 0; }
.msg-head { font-size: 14px; margin-bottom: 4px; }
.msg-body { white-space: normal; word-break: break-word; }
.msg-staff .msg-head b { color: var(--blue); }
.msg-system { color: var(--muted); font-style: normal; }

nav {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  gap: 8px;
}

nav .tab {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
}

nav .tab:hover { background: #1a1f28; color: var(--text); }
nav .tab.on { background: var(--panel); color: var(--text); border: 1px solid var(--panel-border); }

.right { text-align: right; }

.req {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.answer { padding: 10px 0; border-bottom: 1px solid var(--panel-border); }
.answer:last-child { border-bottom: 0; }
.answer .muted { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }

.card .button { margin-top: 10px; }

@media (max-width: 640px) {
  nav { padding: 12px 16px 0; }
}

.pill {
  display: inline-block;
  background: var(--panel-border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 3px 9px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 6px;
}

.drop {
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: var(--bg);
}

.drop:hover, .drop:focus { border-color: var(--blue); outline: none; }
.drop.over { border-color: var(--blue); background: #141a24; }
.drop .link { color: var(--blue); }
.small { font-size: 12px; margin-top: 4px; }

.filelist { margin-top: 10px; }

.fileitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 14px;
}

.linkbtn {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}

.linkbtn:hover { color: var(--text); background: none; }

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.thumb {
  max-width: 220px;
  max-height: 160px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  display: block;
}

.filechip {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.filechip:hover { background: #1a1f28; }
