* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f1115;
  color: #e8eaed;
}

button {
  background: #2a6df4;
  color: white;
  border: 0;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
button:hover { background: #3a7df8; }
button.ghost {
  background: transparent;
  color: #e8eaed;
  border: 1px solid #2a2f3a;
}
button.ghost:hover { background: #1a1f2a; }
button.small { padding: 4px 8px; font-size: 12px; }

input {
  background: #1a1f2a;
  border: 1px solid #2a2f3a;
  color: #e8eaed;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
input:focus { border-color: #2a6df4; }

.muted { color: #8a8f9a; }
.small { font-size: 12px; }
.err { color: #ff6b6b; margin-top: 8px; min-height: 18px; font-size: 13px; }

/* login */
.login {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0f1115;
  z-index: 10;
}
.login-box {
  background: #161a22;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid #2a2f3a;
  width: 320px;
  text-align: center;
}
.login-box h1 { margin: 0 0 6px; font-size: 22px; }
.login-box p { margin: 0 0 16px; color: #8a8f9a; font-size: 13px; }
.login-box input { width: 100%; margin-bottom: 10px; text-align: center; letter-spacing: 4px; font-size: 18px; }
.login-box button { width: 100%; }

/* app */
main {
  display: flex; flex-direction: column;
  height: 100vh;
}
header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #2a2f3a;
}
.title { font-weight: 600; font-size: 16px; }
.actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.actions input { width: 220px; }

.address-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #2a2f3a;
  background: #131722;
  font-size: 14px;
}
.address-bar .label { color: #8a8f9a; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.address-bar code {
  background: #1a1f2a;
  padding: 4px 10px;
  border-radius: 6px;
  color: #6ee7b7;
  font-size: 14px;
}
.address-bar .spacer { flex: 1; }

.content {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1;
  overflow: hidden;
}
.list {
  border-right: 1px solid #2a2f3a;
  overflow-y: auto;
}
.list .item {
  padding: 12px 16px;
  border-bottom: 1px solid #1a1f2a;
  cursor: pointer;
}
.list .item:hover { background: #161a22; }
.list .item.active { background: #1a2233; }
.list .from { font-weight: 600; font-size: 13px; }
.list .subject { font-size: 13px; color: #c8ccd4; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .meta { font-size: 11px; color: #8a8f9a; margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }
.list .meta .to { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list .empty { padding: 40px 20px; text-align: center; color: #8a8f9a; font-size: 13px; }

.view {
  overflow-y: auto;
  padding: 24px 28px;
}
.view .empty { color: #8a8f9a; text-align: center; padding-top: 40px; }
.view h2 { margin: 0 0 8px; font-size: 20px; }
.view .head { padding-bottom: 16px; border-bottom: 1px solid #2a2f3a; margin-bottom: 16px; }
.view .head .row { font-size: 13px; color: #c8ccd4; margin-top: 4px; }
.view .head .row b { color: #8a8f9a; font-weight: 500; margin-right: 6px; }
.view .body { white-space: pre-wrap; line-height: 1.6; font-size: 14px; }
.view iframe { width: 100%; border: 0; min-height: 60vh; background: white; border-radius: 6px; }
