html {
  letter-spacing: 0;
}

body {
  font-family: "Inter", "Google Sans", "Roboto", "Segoe UI", Arial, sans-serif;
}

#logo {
  max-width: 170px;
  max-height: 120px;
  object-fit: contain;
  border-radius: 18px;
}

body.task-login #layout-content {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

body.task-login #login-form {
  border-radius: 18px;
}

@media screen and (min-width: 769px) {
  html,
  body {
    min-height: 100%;
  }

  body.task-mail,
  body.task-settings,
  body.task-addressbook,
  body.task-login {
    background: url("../images/bgimage.jpg") center center / cover fixed no-repeat !important;
  }

  body.task-mail::before,
  body.task-settings::before,
  body.task-addressbook::before,
  body.task-login::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: saturate(125%);
  }

  #layout {
    position: relative;
    background: transparent !important;
  }

  #taskmenu,
  #layout-sidebar {
    background: rgba(18, 27, 43, 0.38) !important;
    color: #fff;
    backdrop-filter: blur(15px);
    border: 0 !important;
  }

  #layout-sidebar a,
  #layout-sidebar .username,
  #mailboxlist li a,
  #mailboxlist li span {
    color: rgba(255, 255, 255, 0.94) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.26);
  }

  #mailboxlist li.selected > div,
  #mailboxlist li.selected > a,
  #mailboxlist li:hover > div,
  #mailboxlist li:hover > a {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 20px 20px 0;
  }

  #layout-list,
  #layout-content {
    background: rgba(248, 250, 252, 0.72) !important;
    backdrop-filter: blur(12px);
  }

  body.task-mail #layout-list {
    margin: 64px 56px 16px 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.16);
  }

  body.task-mail #messagelist-header,
  body.task-mail .tableheaderseb {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 0 !important;
  }

  #mailsearchform,
  #mailsearchform input,
  .searchbar,
  .searchbar input {
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.62) !important;
    border-color: transparent !important;
  }

  #messagelist-content,
  #messagelist,
  #messagelist tbody,
  #messagelist tr,
  #messagelist td {
    background: transparent !important;
  }

  #messagelist tr {
    border-bottom-color: rgba(148, 163, 184, 0.28) !important;
  }

  #messagelist tr:hover td,
  #messagelist tr.selected td {
    background: rgba(255, 255, 255, 0.52) !important;
  }

  #layout-sidebar::before {
    content: "OMail";
    display: flex;
    align-items: center;
    min-height: 56px;
    margin: 6px 18px 4px;
    padding-left: 46px;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    background: url("../images/OMail.jpg") left center / 34px 39px no-repeat;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  }

  #layout-sidebar .compose.button {
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #334155 !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  }

  body.task-mail #layout-content {
    background: transparent !important;
    box-shadow: none;
  }

  body.task-mail #layout-content.selected {
    margin: 64px 56px 16px 0;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.16);
  }

  body.task-mail #layout-content > .header,
  body.task-mail #layout-content .header_back {
    min-height: 48px;
    background: rgba(255, 255, 255, 0.42) !important;
    border: 0 !important;
  }

  body.task-mail #layout-content .iframe-wrapper {
    margin: 0;
    background: transparent !important;
  }

  body.task-mail #messagecontframe {
    background: transparent !important;
  }

  body.task-mail.action-show #layout-content {
    min-height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.78) !important;
  }

  body.task-mail.action-show #layout-content > .content.frame-content {
    margin: 0 16px 16px;
    padding: 0 0 180px;
    min-height: calc(100vh - 128px);
    background: #fff !important;
    border-radius: 0 0 8px 8px;
    overflow: auto;
  }

  body.task-mail.action-show #message-header {
    padding: 22px 56px 8px 72px;
    background: #fff !important;
    border: 0;
  }

  body.task-mail.action-show #message-header > .subject {
    margin: 0 0 18px;
    color: #202124;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 400;
  }

  body.task-mail.action-show #message-header > .header,
  body.task-mail.action-show #message-content {
    background: #fff !important;
  }

  body.task-mail.action-show #message-header .contactphoto {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
  }

  body.task-mail.action-show #message-header .header-summary,
  body.task-mail.action-show #message-header .header-headers {
    color: #202124;
    font-size: 13px;
    line-height: 1.45;
  }

  body.task-mail.action-show #message-content {
    padding: 6px 72px 64px;
  }

  body.task-mail.action-show #messagebody {
    color: #202124;
    font-size: 13px;
    line-height: 1.45;
  }

  body.task-mail.action-show .footer-mail-small {
    padding: 28px 72px 0;
    background: #fff !important;
  }

  body.task-mail.action-show .footer-mail-small .toolbar a {
    min-width: 104px;
    height: 38px;
    margin-right: 8px;
    border: 1px solid #747775 !important;
    border-radius: 999px !important;
    color: #3c4043 !important;
    background: #fff !important;
  }
}

@media screen and (max-width: 768px) {
  body {
    background: #f3f4f8 !important;
  }

  #layout,
  #layout-list,
  #layout-content {
    background: #f3f4f8 !important;
  }

  .tableheaderseb {
    background: #f3f4f8 !important;
    padding: 10px 8px 12px !important;
  }

  #mailsearchform,
  #mailsearchform input,
  .searchbar,
  .searchbar input {
    min-height: 48px;
    border-radius: 24px !important;
    background: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
  }

  #messagelist-content {
    padding: 0 8px 88px !important;
  }

  #messagelist,
  #messagelist tbody,
  #messagelist tr,
  #messagelist td {
    background: transparent !important;
  }

  #messagelist tr {
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  }

  #messagelist tr td {
    background: #fff !important;
    border-top: 0 !important;
    border-bottom: 5px solid #f3f4f8 !important;
  }

  #messagelist tr.selected td,
  #messagelist tr:hover td {
    background: #eef4ff !important;
  }

  #layout-sidebar {
    background: #fff !important;
  }

  #layout-sidebar::before {
    content: "OMail";
    display: flex;
    align-items: center;
    min-height: 54px;
    margin: 8px 18px;
    padding-left: 44px;
    color: #202124;
    font-size: 22px;
    font-weight: 600;
    background: url("../images/OMail.jpg") left center / 34px 39px no-repeat;
  }

  #layout-sidebar .compose.button {
    position: fixed;
    right: 16px;
    bottom: 72px;
    z-index: 1000;
    width: auto !important;
    min-width: 134px;
    height: 52px;
    border-radius: 18px !important;
    background: #dbe7ff !important;
    color: #29436f !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  }

  body.task-login #layout-content {
    background: #fff !important;
    border-radius: 20px;
    margin: 18px;
  }

  #logo {
    max-width: 136px;
    max-height: 110px;
  }

  body.task-mail.action-show #layout-content,
  body.task-mail #layout-content.selected {
    background: #fff !important;
  }

  body.task-mail.action-show #layout-content > .content.frame-content {
    background: #fff !important;
    padding-bottom: 72px;
  }

  body.task-mail.action-show #message-header {
    padding: 16px 16px 8px;
    background: #fff !important;
  }

  body.task-mail.action-show #message-header > .subject {
    margin: 0 0 16px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 400;
  }

  body.task-mail.action-show #message-content {
    padding: 4px 16px 36px;
    background: #fff !important;
  }

  body.task-mail.action-show .footer-mail-small {
    padding: 18px 16px 28px;
    background: #fff !important;
  }

  body.task-mail.action-show .footer-mail-small .toolbar a {
    min-width: 96px;
    height: 38px;
    border: 1px solid #747775 !important;
    border-radius: 999px !important;
    color: #3c4043 !important;
    background: #fff !important;
  }
}
