:root {
  --bg: #0b0c10;
  --card: #16181d;
  --text: #e6e6e6;
  --muted: #a7abb4;
  --accent: #4fa3ff;
  --border: #242731;
  --green: #2ecc71;
  --red: #e74c3c;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, #0b0c10 0%, #0f1626 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.hidden { display: none; }

.card {
  max-width: 520px;
  margin: 12vh auto;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.card h1 { margin: 0 0 8px 0; font-size: 28px; }
.muted { color: var(--muted); margin: 0 0 16px 0; }
.hint { color: var(--muted); margin-top: 12px; font-size: 13px; }

form { display: flex; gap: 10px; }
input[type="email"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1116;
  color: var(--text);
  font-size: 14px;
}
button {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #081018;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }

#mail-ui header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.brand { font-weight: 700; letter-spacing: 0.2px; }
.session-email { color: var(--muted); }

main {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - 58px);
}

#list-pane {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: rgba(0,0,0,0.15);
}
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  position: sticky;
  top: 0;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(4px);
  z-index: 1;
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  display: inline-block;
}

#message-list {
  list-style: none;
  margin: 0; padding: 0;
}
.item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.item:hover { background: rgba(255,255,255,0.04); }
.item .from { color: var(--muted); font-size: 12px; }
.item .subject { font-size: 14px; margin-top: 4px; }
.item .time { color: var(--muted); font-size: 11px; margin-top: 2px; }

#viewer-pane {
  position: relative;
  height: 100%;
}
#placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}
#html-viewer {
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
  background: rgb(80, 75, 75);
}
