﻿* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Arial, sans-serif;
  background: #f4f6f8;
  color: #20242c;
}

button, input, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 270px;
  background: white;
  border-right: 1px solid #e5e7eb;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 10px 24px;
}

.logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  border-radius: 14px;
  font-size: 24px;
}

.brand h1 {
  font-size: 19px;
}

.brand span,
.account span {
  display: block;
  color: #9ca3af;
  font-size: 12px;
}

.compose-btn {
  background: #4f46e5;
  color: white;
  padding: 13px;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 20px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  background: transparent;
  text-align: left;
  padding: 11px;
  border-radius: 10px;
  color: #4b5563;
}

.nav-item.active,
.nav-item:hover {
  background: #eef2ff;
  color: #4338ca;
}

.nav-item b {
  float: right;
}

.account {
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.main {
  flex: 1;
}

.topbar {
  height: 76px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 28px;
}

.search {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 10px 14px;
  width: 500px;
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 90%;
}

.topbar button {
  background: #f3f4f6;
  padding: 9px 12px;
  border-radius: 9px;
}

.content {
  padding: 28px;
}

.page-header {
  margin-bottom: 18px;
}

.page-header h2 {
  font-size: 25px;
}

.page-header p {
  color: #9ca3af;
  font-size: 13px;
}

.mail-list {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}

.mail {
  display: grid;
  grid-template-columns: 22px 30px 170px 1fr 60px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid #eef0f3;
}

.mail:last-child {
  border-bottom: 0;
}

.mail.unread {
  font-weight: 700;
}

.mail div {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mail div span,
.mail time {
  color: #9ca3af;
  font-weight: 400;
}

.star {
  background: transparent;
  font-size: 19px;
  color: #9ca3af;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  padding: 20px;
}

.compose-window {
  width: min(700px, 100%);
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,.2);
}

.compose-header,
.compose-footer {
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
}

.compose-window > input,
.compose-window > textarea {
  width: 100%;
  border: 0;
  border-top: 1px solid #eef0f3;
  outline: 0;
  padding: 15px 18px;
}

.compose-window textarea {
  height: 260px;
  resize: vertical;
}

.compose-footer {
  justify-content: flex-start;
  gap: 12px;
}

#send {
  background: #4f46e5;
  color: white;
  padding: 10px 18px;
  border-radius: 9px;
}

.hidden {
  display: none;
}

@media (max-width: 700px) {
  .sidebar {
    width: 75px;
  }

  .brand div:not(.logo),
  .compose-btn,
  .account strong,
  .account span {
    display: none;
  }

  .mail {
    grid-template-columns: 20px 25px 1fr 45px;
  }

  .mail strong {
    display: none;
  }
}
