:root {
  --navy: #112b49;
  --navy-2: #0d243e;
  --ofw-blue: #006da8;
  --tab-blue: #1686b5;
  --sidebar: #ffffff;
  --active-folder: #fff9df;
  --last-viewed: #f3fbff;
  --workspace: #f5f5f5;
  --line: #d8d8d8;
  --soft-line: #e8e8e8;
  --text: #111111;
  --muted: #757575;
  --pink: #df3f76;
  --star: #d99800;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--workspace);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 222px 1fr;
  grid-template-rows: 64px 1fr 82px;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  background: var(--navy);
  color: #ffffff;
}

.brand {
  width: 80px;
  display: grid;
  place-items: center;
  background: var(--navy-2);
}

.brand svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: #a3ebff;
  stroke-width: 3;
  stroke-linecap: round;
}

.archive-title {
  display: flex;
  align-items: center;
  padding: 0 22px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  height: 100%;
}

.main-nav a {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0 19px;
  font-size: 20px;
  border-bottom: 4px solid transparent;
}

.main-nav a.active {
  background: #123456;
  border-bottom-color: #39a9d6;
  font-weight: 600;
  min-width: 120px;
  justify-content: center;
}

.profile-icon {
  margin: auto 28px auto auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dbe4ef;
  display: block;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.profile-icon::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7b8795;
}

.profile-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 5px;
  width: 18px;
  height: 12px;
  border-radius: 12px 12px 0 0;
  background: #7b8795;
}

.sidebar {
  grid-row: 2 / 3;
  background: var(--sidebar);
  border-right: 1px solid #eeeeee;
  padding-top: 10px;
}

.compose-btn {
  width: calc(100% - 20px);
  height: 47px;
  margin: 0 10px 8px;
  color: var(--ofw-blue);
  background: #ffffff;
  border: 1px solid var(--ofw-blue);
  border-radius: 5px;
  font-size: 18px;
  font-weight: 600;
  cursor: default;
  opacity: 1;
}

.folder {
  width: 100%;
  height: 59px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0 21px;
  font-size: 16px;
  color: #1c2731;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.folder.active {
  background: var(--active-folder);
}

.folder [id="favoritesCount"] {
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: #f0f0f0;
  color: #4b4b4b;
  font-size: 13px;
  font-weight: 600;
}

.archive-file-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 14px 17px 0;
  padding: 13px 4px 0;
  border-top: 1px solid var(--line);
  color: var(--ofw-blue);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.archive-file-link:hover {
  text-decoration: underline;
}

.folder.draft {
  font-weight: 600;
}

.folder-group {
  margin: 14px 17px 0;
  border-top: 1px solid var(--line);
}

.folder-group .folder {
  padding: 0 4px 0 1px;
}

.last-viewed {
  margin: 10px 0 0;
  border-top: 0;
  background: var(--last-viewed);
  padding-left: 20px;
}

.last-viewed .folder {
  color: #1b2732;
}

.eye {
  color: var(--ofw-blue);
  font-size: 11px;
  margin-right: 8px;
}

.workspace {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  min-width: 0;
  background: var(--workspace);
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.inbox-toolbar,
.detail-toolbar {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 18px;
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
}

.search-box {
  width: 340px;
  height: 51px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 26px;
  overflow: hidden;
}

.search-box input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  font-size: 16px;
  color: #444444;
  padding-right: 20px;
}

.search-box input::placeholder {
  color: #a8a8a8;
}

.icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.search-icon {
  width: 21px;
  height: 21px;
  border: 2px solid #b8b8b8;
  border-radius: 50%;
  margin-left: 18px;
  margin-right: 15px;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  background: #b8b8b8;
  transform: rotate(45deg);
  right: -7px;
  bottom: 0;
}

.slider-icon {
  width: 50px;
  height: 30px;
  border-left: 1px solid #dddddd;
}

.slider-icon::before,
.slider-icon::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  right: 16px;
  background: #444444;
  box-shadow: 0 6px 0 #444444, 0 12px 0 #444444;
}

.slider-icon::before {
  top: 8px;
}

.slider-icon::after {
  top: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  right: 23px;
  box-shadow: 7px 6px 0 #444444, -3px 12px 0 #444444;
}

.report-btn {
  height: 32px;
  min-width: 99px;
  border: 1px solid var(--ofw-blue);
  border-radius: 3px;
  color: var(--ofw-blue);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.download-icon {
  width: 15px;
  height: 16px;
  border-bottom: 2px solid currentColor;
}

.download-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 2px;
  height: 11px;
  background: currentColor;
}

.download-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.toolbar-spacer {
  flex: 1;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #6d6d6d;
  display: grid;
  place-items: center;
  font-size: 29px;
  line-height: 1;
  border-radius: 4px;
}

.icon-button:hover,
.thread-row:hover {
  background: #f3f8fb;
}

.text-blue {
  color: var(--ofw-blue);
}

.sparkle-icon {
  color: var(--ofw-blue);
  font-size: 25px;
}

.layout-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 3px solid var(--ofw-blue);
  border-radius: 2px;
  position: relative;
}

.layout-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -3px;
  bottom: -3px;
  border-left: 3px solid var(--ofw-blue);
}

.filter-line {
  height: 47px;
  display: flex;
  align-items: center;
  padding: 0 22px 0 30px;
  justify-content: flex-end;
}

.archive-summary {
  color: #53616b;
  font-size: 14px;
  white-space: nowrap;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.switch-label input {
  position: absolute;
  opacity: 0;
}

.switch {
  width: 23px;
  height: 13px;
  background: #cfcfcf;
  border-radius: 20px;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
}

.switch::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  top: 1px;
  left: 1px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.switch-label input:checked + .switch {
  background: #5daed2;
}

.switch-label input:checked + .switch::after {
  left: 11px;
}

.range-control {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #4a4a4a;
  font-size: 14px;
}

.range-arrow {
  border: 0;
  background: transparent;
  color: var(--ofw-blue);
  font-size: 30px;
}

.range-arrow:disabled {
  color: #c8c8c8;
}

.message-table {
  margin: 0 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-head,
.thread-row {
  display: grid;
  grid-template-columns: 54px 274px 54px minmax(240px, 1fr) 112px;
  align-items: center;
}

.table-head {
  height: 62px;
  color: #444444;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.thread-rows {
  max-height: calc(100vh - 238px);
  overflow: auto;
}

.thread-row {
  min-height: 49px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  text-align: left;
  color: #424242;
  cursor: pointer;
  font-size: 16px;
}

.thread-row.selected {
  background: #f4fbff;
}

.check-box {
  width: 21px;
  height: 21px;
  border: 2px solid #d2d2d2;
  border-radius: 3px;
  margin-left: 19px;
}

.from-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.reply-icon {
  color: #666666;
  font-size: 23px;
  width: 24px;
  text-align: center;
}

.sender-name,
.subject-line,
.date-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-star,
.message-star {
  border: 0;
  background: transparent;
  color: #9b9b9b;
  font-size: 22px;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
}

.thread-star.is-starred,
.message-star.is-starred {
  color: var(--star);
}

.subject-line {
  display: flex;
  align-items: baseline;
  gap: 26px;
  min-width: 0;
}

.subject-title {
  flex: 0 0 auto;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4a4a4a;
}

.preview {
  color: #858585;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-pill,
.folder-pill,
.source-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  background: #eeeeee;
  color: #333333;
  font-size: 13px;
}

.date-cell {
  justify-self: end;
  padding-right: 10px;
  color: #4b4b4b;
}

.empty-state {
  padding: 44px;
  color: var(--muted);
  text-align: center;
}

.detail-toolbar {
  gap: 16px;
}

.detail-view {
  min-height: 100%;
  background: #ffffff;
}

.thread-detail {
  height: calc(100vh - 126px);
  overflow: auto;
  padding: 26px 42px 48px 28px;
}

.detail-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
}

.detail-heading h1 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0;
}

.detail-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-card {
  max-width: 860px;
  margin-bottom: 28px;
}

.message-card.latest {
  margin-bottom: 42px;
}

.message-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pink);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
}

.avatar.sent {
  background: #1473a7;
}

.sender-title {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 4px;
}

.sent-line,
.to-line,
.source-line {
  color: #53616b;
  font-size: 14px;
}

.to-line {
  margin: 20px 0 0 28px;
}

.source-line {
  margin: 8px 0 0 28px;
}

.message-body {
  margin: 43px 0 34px;
  font-size: 18px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.message-card:not(.latest) .message-body {
  margin-top: 24px;
  font-size: 16px;
  color: #4e5961;
}

.message-separator {
  width: 225px;
  border: 0;
  border-top: 1px solid #9e9e9e;
  margin: 0 0 28px;
}

.history-meta {
  color: #46515a;
  font-size: 16px;
  line-height: 1.45;
}

.history-meta strong {
  color: #3e4850;
}

.footer {
  grid-column: 1 / -1;
  grid-row: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  font-size: 13px;
}

.footer span {
  text-align: center;
  color: #5d5d5d;
}

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

  .main-nav a {
    padding: 0 10px;
    font-size: 16px;
  }

  .search-box {
    width: 260px;
  }

  .table-head,
  .thread-row {
    grid-template-columns: 42px 170px 40px minmax(180px, 1fr) 88px;
  }

  .thread-detail {
    padding-right: 22px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 64px auto 1fr 92px;
  }

  .topbar {
    overflow-x: auto;
  }

  .brand {
    flex: 0 0 64px;
  }

  .main-nav {
    flex: 0 0 auto;
  }

  .profile-icon {
    flex: 0 0 36px;
    margin-right: 12px;
  }

  .sidebar {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    overflow-x: auto;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid #e8e8e8;
  }

  .compose-btn,
  .folder {
    flex: 0 0 auto;
    width: auto;
    height: 42px;
    margin: 0;
    padding: 0 14px;
    white-space: nowrap;
  }

  .folder-group,
  .last-viewed {
    display: none;
  }

  .workspace {
    grid-column: 1;
    grid-row: 3;
    min-width: 0;
  }

  .inbox-toolbar,
  .detail-toolbar {
    padding: 8px 10px;
    overflow-x: auto;
  }

  .search-box {
    flex: 0 0 235px;
  }

  .filter-line {
    padding: 0 12px;
  }

  .message-table {
    margin: 0 8px;
    overflow-x: auto;
  }

  .table-head,
  .thread-row {
    min-width: 720px;
  }

  .thread-detail {
    height: calc(100vh - 182px);
    padding: 20px 16px 40px;
  }

  .detail-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .detail-actions {
    margin-left: 0;
  }

  .footer {
    grid-row: 4;
    gap: 12px;
    padding: 12px;
  }
}
