:root {
  --accent: #4C8BF5;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --border: #DFE3E8;
  --text: #1F2430;
  --text-muted: #6B7280;
  --danger: #E5484D;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.topbar .who {
  color: var(--text-muted);
  font-size: 14px;
}

.topbar nav a {
  margin-left: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.container {
  max-width: 760px;
  margin: 30px auto;
  padding: 0 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.login-wrap {
  max-width: 380px;
  margin: 80px auto;
  padding: 0 16px;
}

.login-wrap h1 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 20px;
}

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

input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
}

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

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

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 16px;
}

button:hover, .btn:hover { background: #3E72CC; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: #ECEFF3; }

.error {
  background: #FDECEC;
  border: 1px solid #F3C5C6;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 14px;
  margin-bottom: 14px;
}

.success {
  background: #E9F7EE;
  border: 1px solid #B7E4C7;
  color: #1E7A3C;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 14px;
  margin-bottom: 14px;
}

.msg-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.msg-list li {
  border-bottom: 1px solid var(--border);
}

.msg-list li:last-child { border-bottom: none; }

.msg-list a {
  display: block;
  padding: 14px 4px;
  text-decoration: none;
  color: var(--text);
}

.msg-list a:hover { background: #F0F3F9; }

.msg-subject { font-weight: 600; }

.msg-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}

.message-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.message-header h2 { margin: 0 0 8px; font-size: 18px; }

.message-body {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
}

.actions { margin-top: 20px; }
