* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef3f8;
  color: #0b1628;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 400px 1fr;
}

.left {
  background:
    linear-gradient(rgba(5,18,34,.82), rgba(5,18,34,.94)),
    url("bg.jpg") center/cover;
  padding: 34px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 110px;
  max-height: 70px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  display: block;
  font-size: 12px;
  color: #cbd8e7;
  margin-top: 4px;
}

.login-card {
  background: rgba(255,255,255,.96);
  color: #0b1628;
  padding: 34px;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: 27px;
}

.login-card p {
  color: #5b6677;
  margin-bottom: 28px;
}

.login-card label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin: 16px 0 8px;
}

.input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f9fc;
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  padding: 0 14px;
}

.input input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 0;
  outline: none;
  font-size: 15px;
}

.options {
  margin: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.options a {
  color: #005ecb;
  text-decoration: none;
  font-weight: 700;
}

.login-card button,
.compose {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6b00, #ff8f1f);
  color: white;
  padding: 16px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(255,107,0,.28);
}

.login-card small {
  display: block;
  margin-top: 18px;
  color: #6c7583;
  text-align: center;
}

.security {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: center;
  font-size: 13px;
}

.security b,
.security span {
  display: block;
}

.security span {
  color: #cad6e5;
  margin-top: 6px;
}

.mail-preview {
  background: white;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 78px;
  border-bottom: 1px solid #e3e8ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
}

.search {
  width: 430px;
  background: #f6f8fb;
  border: 1px solid #dce4ee;
  border-radius: 14px;
  padding: 18px;
  color: #647086;
}

.icons {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 21px;
}

.avatar {
  background: #061d3d;
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.mail-body {
  flex: 1;
  display: grid;
  grid-template-columns: 260px 430px 1fr;
  min-height: 0;
}

.sidebar {
  background: #061d3d;
  color: white;
  padding: 24px 18px;
}

.sidebar a {
  display: flex;
  justify-content: space-between;
  padding: 14px 14px;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  margin: 4px 0;
}

.sidebar a.active,
.sidebar a:hover {
  background: rgba(255,255,255,.12);
}

.sidebar h3 {
  margin: 26px 14px 12px;
  font-size: 12px;
  color: #9eb2ce;
  text-transform: uppercase;
}

.storage {
  margin-top: 28px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 18px;
}

.storage span {
  display: block;
  color: #c4d1e2;
  font-size: 13px;
  margin: 8px 0;
}

.storage div {
  height: 7px;
  background: rgba(255,255,255,.15);
  border-radius: 100px;
  overflow: hidden;
}

.storage i {
  display: block;
  width: 38%;
  height: 100%;
  background: #1683ff;
}

.list {
  border-right: 1px solid #e3e8ef;
  overflow: auto;
}

.list-tools {
  height: 64px;
  border-bottom: 1px solid #e3e8ef;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
}

.email {
  display: grid;
  grid-template-columns: 48px 1fr 55px;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid #edf1f5;
}

.email.selected {
  background: #eaf4ff;
}

.email strong,
.email b,
.email p {
  display: block;
  margin: 0 0 5px;
}

.email p {
  color: #667386;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.circle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.blue { background: #074b95; }
.dark { background: #0d1524; }
.orange { background: #ff7624; }
.green { background: #179553; }

.reader {
  padding: 30px;
  overflow: auto;
}

.reader-tools {
  color: #455268;
  font-size: 21px;
  word-spacing: 20px;
  margin-bottom: 32px;
}

.reader h2 {
  font-size: 28px;
}

.reader h2 span {
  font-size: 13px;
  color: #ff6b00;
  border: 1px solid #ffb077;
  border-radius: 6px;
  padding: 4px 9px;
  margin-left: 10px;
}

.sender {
  display: grid;
  grid-template-columns: 48px 1fr 55px;
  gap: 14px;
  align-items: center;
  margin: 24px 0;
}

.sender p {
  margin: 5px 0 0;
  color: #637086;
}

.reader p {
  line-height: 1.65;
  font-size: 16px;
}

.attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 18px;
}

.attachments div {
  background: #f6f8fb;
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  padding: 20px;
}

.attachments span {
  display: block;
  color: #667386;
  margin-top: 8px;
  font-size: 13px;
}

footer {
  border-top: 1px solid #e3e8ef;
  padding: 18px 28px;
  color: #627086;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 360px 1fr;
  }

  .mail-body {
    grid-template-columns: 230px 1fr;
  }

  .reader {
    display: none;
  }
}

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }

  .left {
    min-height: 100vh;
    padding: 22px;
  }

  .mail-preview {
    display: none;
  }

  .security {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .login-card {
    padding: 24px;
  }

  .options {
    flex-direction: column;
  }
}
