:root {
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  color:#25364a;
  background:#f5f7fb;
  --bg:#f5f7fb;
  --panel:#fff;
  --text:#25364a;
  --muted:#8391a3;
  --line:#e8edf4;
  --accent:#526de6;
  --soft:#eef1ff;
  --shadow:0 10px 40px #2d41630c
}
:root.dark {
  --bg:#151b27;
  --panel:#202938;
  --text:#ebf0fa;
  --muted:#9aaabe;
  --line:#354052;
  --soft:#303e66;
  --shadow:0 10px 40px #0003;
  color:var(--text);
  background:var(--bg)
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text)
}
button,input,textarea {
  font:inherit
}
button {
  cursor:pointer
}
button:focus-visible,input:focus-visible,textarea:focus-visible {
  outline:3px solid #7b92ff;
  outline-offset:2px
}
.shell {
  display:grid;
  grid-template-columns:258px minmax(300px,410px) minmax(360px,1fr);
  height:100dvh;
  min-height:610px;
  gap:0
}
.sidebar {
  padding:28px 20px;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:28px
}
.brand {
  display:flex;
  align-items:center;
  gap:11px;
  font-weight:800;
  letter-spacing:-.7px;
  font-size:23px;
  padding:3px 9px
}
.mark {
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#5976ef,#8968e9);
  width:35px;
  height:35px;
  border-radius:12px;
  color:white;
  font-size:21px
}
.compose {
  background:var(--accent);
  color:white;
  border:0;
  border-radius:14px;
  padding:15px;
  box-shadow:0 7px 19px #526de63d;
  font-weight:700;
  text-align:left
}
.compose span {
  margin-right:15px;
  font-size:19px
}
.nav {
  display:flex;
  flex-direction:column;
  gap:5px
}
.nav button {
  background:none;
  border:0;
  border-radius:11px;
  color:var(--muted);
  text-align:left;
  padding:12px 14px;
  font-weight:600;
  display:flex;
  justify-content:space-between
}
.nav button.active {
  color:var(--accent);
  background:var(--soft)
}
.nav button:hover {
  background:var(--soft)
}
.nav em {
  font-style:normal;
  background:var(--soft);
  border-radius:10px;
  padding:0px 7px
}
.sidefoot {
  margin-top:auto;
  padding:10px;
  font-size:13px;
  color:var(--muted)
}
.sidefoot button {
  background:none;
  border:0;
  color:var(--muted);
  padding:8px 0
}
.inbox {
  background:var(--panel);
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  min-width:0
}
.inboxhead {
  padding:32px 25px 20px
}
.eyebrow {
  font-size:12px;
  font-weight:700;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--accent)
}
h1 {
  font-size:30px;
  letter-spacing:-1.4px;
  margin:10px 0 19px
}
.search {
  width:100%;
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--bg);
  color:var(--text)
}
.list {
  overflow:auto;
  flex:1
}
.email {
  width:100%;
  border:0;
  border-bottom:1px solid var(--line);
  padding:19px 24px;
  text-align:left;
  background:transparent;
  color:var(--text);
  display:flex;
  gap:12px
}
.email:hover,.email.selected {
  background:var(--soft)
}
.avatar {
  height:40px;
  width:40px;
  flex:0 0 40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:800;
  background:#e6e5fc;
  color:#6b65ba
}
.email:nth-child(2n) .avatar {
  background:#e1f4ef;
  color:#3e9e82
}
.email:nth-child(3n) .avatar {
  background:#ffecda;
  color:#c98b4a
}
.emailbody {
  min-width:0;
  flex:1
}
.line1 {
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:14px
}
.line1 time {
  font-size:11px;
  color:var(--muted);
  white-space:nowrap
}
.subject {
  margin-top:6px;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.excerpt {
  margin-top:5px;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.viewer {
  padding:28px 42px;
  overflow:auto;
  background:var(--panel)
}
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:var(--muted);
  border-bottom:1px solid var(--line);
  padding-bottom:23px
}
.topbar strong {
  color:var(--text);
  font-size:13px
}
.actions {
  display:flex;
  gap:7px
}
.iconbtn {
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text);
  padding:10px 13px;
  border-radius:10px;
  font-size:13px
}
.message {
  max-width:760px;
  margin:44px auto
}
.message h2 {
  font-size:29px;
  line-height:1.25;
  letter-spacing:-1px;
  margin:0 0 25px
}
.sender {
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:28px;
  border-bottom:1px solid var(--line)
}
.sender .avatar {
  height:48px;
  width:48px
}
.sender small {
  display:block;
  color:var(--muted);
  margin-top:4px
}
.sender time {
  margin-left:auto;
  color:var(--muted);
  font-size:12px
}
.content {
  font-size:15px;
  line-height:1.85;
  color:var(--text);
  padding:18px 0;
  white-space:pre-wrap
}
.reply {
  margin-top:30px;
  border:1px solid var(--line);
  border-radius:12px;
  background:transparent;
  color:var(--muted);
  padding:17px;
  width:100%;
  text-align:left
}
.chip {
  display:inline-block;
  background:var(--soft);
  color:var(--accent);
  border-radius:10px;
  font-size:12px;
  padding:5px 10px;
  margin:12px 0
}
.modal {
  position:fixed;
  inset:0;
  background:#101c34a1;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px
}
.modal.show {
  display:flex
}
.dialog {
  background:var(--panel);
  color:var(--text);
  border-radius:20px;
  box-shadow:0 25px 80px #0004;
  width:min(600px,100%);
  padding:25px
}
.dialogheader {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px
}
.dialog h2 {
  margin:0;
  font-size:22px
}
.field {
  width:100%;
  border:1px solid var(--line);
  background:var(--bg);
  border-radius:9px;
  color:var(--text);
  padding:12px;
  margin:7px 0
}
.primary {
  background:var(--accent);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:12px 20px;
  font-weight:700
}
.note {
  font-size:12px;
  color:var(--muted);
  margin-top:8px
}
.mobileback {
  display:none
}
@media(max-width:1150px) {
  .shell {
    grid-template-columns:190px 320px minmax(320px,1fr)
  }
  .sidebar {
    padding:22px 12px
  }
  .viewer {
    padding:23px
  }
  .message {
    margin:35px auto
  }
}
@media(max-width:790px) {
  .shell {
    display:block;
    height:100dvh;
    min-height:0
  }
  .sidebar {
    height:auto;
    border:0;
    padding:12px 15px;
    flex-direction:row;
    align-items:center;
    gap:12px
  }
  .brand {
    font-size:18px;
    padding:0
  }
  .mark {
    width:30px;
    height:30px
  }
  .sidebar .compose {
    margin-left:auto;
    padding:10px
  }
  .sidebar .nav,.sidefoot {
    display:none
  }
  .inbox {
    height:calc(100dvh - 62px)
  }
  .inboxhead {
    padding:16px 20px
  }
  .inboxhead h1 {
    margin:4px 0 12px
  }
  .viewer {
    display:none;
    position:fixed;
    inset:0;
    z-index:3
  }
  .viewer.open {
    display:block
  }
  .mobileback {
    display:inline-block
  }
  .topbar {
    padding-bottom:14px
  }
  .message {
    margin-top:28px
  }
}
@media(min-width:791px) {
  .mobileback {
    display:none!important
  }
}
.pager {
  display:flex;
  gap:9px;
  align-items:center;
  justify-content:center;
  padding:12px;
  background:var(--panel);
  border-top:1px solid var(--line);
  font-size:12px;
  color:var(--muted)
}
.pager button:disabled {
  opacity:.4;
  cursor:not-allowed
}
.folder-subtitle {
  color:var(--muted);
  font-size:15px;
  font-weight:500
}
.empty-list {
  padding:25px;
  color:var(--muted)
}
