/* Drexorra Mail · Mail app: side bar, folders, list, reading pane */
#app {
  height: 100vh;
  display: grid;
  grid-template-rows: 64px 1fr;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar .mbrand .mlogo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--teal);
}
.topbar .mbrand .mlogo svg {
  width: 24px;
  height: 24px;
}
.topbar .mname {
  font-size: 20px;
  color: var(--teal);
}
.topbar .mname small {
  color: var(--muted);
  opacity: 1;
  letter-spacing: 0.1em;
}
.search {
  flex: 1;
  max-width: 680px;
  position: relative;
}
.search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: 24px;
  border: 1px solid transparent;
  background: var(--chip);
}
.search input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.me {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  flex: none;
}
.me .who {
  text-align: right;
  line-height: 1.2;
}
.me .who b {
  display: block;
  font-size: 14px;
}
.me .who small {
  color: var(--muted);
  font-size: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 0;
}
.nav {
  padding: 14px 10px;
  overflow-y: auto;
}
.compose-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 16px;
  border: 0;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(240, 106, 76, 0.35);
  margin: 0 0 14px 4px;
}
.compose-btn:hover {
  background: var(--coral2);
}
.compose-btn svg {
  width: 20px;
  height: 20px;
}
.fold {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 9px 16px;
  border: 0;
  background: none;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.fold:hover {
  background: var(--hover);
}
.fold.on {
  background: var(--teal3);
  color: var(--teal);
  font-weight: 800;
}
.fold svg {
  width: 19px;
  height: 19px;
  flex: none;
}
.fold .n {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 800;
}
.navnote {
  margin: 18px 10px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--chip);
  color: var(--muted);
  font-size: 12.5px;
}
.navnote b {
  color: var(--text);
}
.main {
  background: var(--card);
  margin: 0 14px 14px 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.tools {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}
.tools .sp {
  flex: 1;
}
.tools .pg {
  color: var(--muted);
  font-size: 13px;
  margin-right: 6px;
}
.chk {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}
.list {
  overflow-y: auto;
  flex: 1;
}
.row {
  display: grid;
  grid-template-columns: 34px 30px 200px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 10px;
  height: 48px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--card);
}
.row:hover {
  box-shadow:
    inset 0 -1px 0 var(--line),
    0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}
.row.unread {
  background: var(--card);
}
.row.read {
  background: var(--hover);
}
.row.sel {
  background: var(--sel);
}
.row .from {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row.unread .from,
.row.unread .subj,
.row.unread .dt {
  font-weight: 800;
}
.row .line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.row .subj {
  color: var(--text);
}
.row .dt {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.row.unread .dt {
  color: var(--text);
}
.star {
  border: 0;
  background: none;
  cursor: pointer;
  color: #b9c3c0;
  padding: 4px;
  display: grid;
  place-items: center;
}
.star.on {
  color: var(--sun);
}
.star svg {
  width: 18px;
  height: 18px;
}
.clip {
  width: 15px;
  height: 15px;
  color: var(--muted);
  display: inline-block;
  vertical-align: -2px;
}
.clip svg {
  width: 15px;
  height: 15px;
  display: block;
}
.dtag {
  font-size: 12px;
  font-weight: 800;
  color: var(--coral2);
  margin-right: 4px;
}
.empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.empty svg {
  width: 70px;
  height: 70px;
  color: var(--teal);
  opacity: 0.35;
}
.read-wrap {
  overflow-y: auto;
  flex: 1;
  padding: 8px 28px 30px;
}
.rsubj {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  margin: 16px 0 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rsubj .lbl {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 800;
  background: var(--chip);
  padding: 3px 9px;
  border-radius: 6px;
  color: var(--muted);
  margin-top: 6px;
}
.msg {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.msg-h {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}
.msg-h .meta {
  flex: 1;
  min-width: 0;
}
.msg-h .meta b {
  font-size: 15px;
}
.msg-h .meta .em {
  color: var(--muted);
  font-size: 13px;
}
.msg-h .meta .to {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-h .when {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.msg-b {
  margin: 14px 0 0 48px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.65;
}
.msg.collapsed .msg-b,
.msg.collapsed .atts {
  display: none;
}
.msg.collapsed .snip {
  display: block;
}
.snip {
  display: none;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.rep {
  margin: 14px 0;
  white-space: normal;
}
.repf {
  display: block;
  width: 100%;
  border: 0;
  min-height: 200px;
  background: transparent;
  color-scheme: light;
}
.pic {
  display: block;
  max-width: min(100%, 560px);
  max-height: 420px;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: var(--hover);
  object-fit: contain;
}
.pic.ld {
  width: 240px;
  height: 160px;
}
.cpics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 14px 8px;
}
.cpic {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.cpic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cpic button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}
.ced.drag {
  background: var(--hover);
}
.atts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 0 48px;
}
.att {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--hover);
  cursor: pointer;
  max-width: 260px;
}
.att:hover {
  border-color: var(--teal);
}
.att svg {
  width: 22px;
  height: 22px;
  color: var(--coral);
  flex: none;
}
.att span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13.5px;
}
.att small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}
.ractions {
  display: flex;
  gap: 10px;
  margin: 22px 0 0 48px;
  flex-wrap: wrap;
}
.ractions .btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 22px;
  padding: 9px 20px;
}
.ractions .btn:hover {
  background: var(--hover);
}
