/* CourierBrook child skin for Roundcube Elastic 1.7.2
 * Extends Elastic; distributed under CC BY-SA 3.0.
 */

:root {
  --lc-ink: #29272f;
  --lc-ink-soft: #655f70;
  --lc-violet-950: #17142a;
  --lc-violet-900: #211b3d;
  --lc-violet-800: #302653;
  --lc-violet-600: #7456dd;
  --lc-violet-500: #8d6cf2;
  --lc-lavender: #cbb7fb;
  --lc-lavender-soft: #eee9fb;
  --lc-cream: #f3efe7;
  --lc-surface: #ffffff;
  --lc-surface-soft: #f8f7fa;
  --lc-border: #e4e0e8;
  --lc-success: #278764;
  --lc-danger: #c9485b;
  --lc-shadow: 0 22px 70px rgba(24, 17, 50, .18);
}

html,
body,
button,
input,
select,
textarea {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  color: var(--lc-ink);
  background: var(--lc-surface-soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- App chrome --------------------------------------------------------- */
#layout-menu {
  background: linear-gradient(180deg, var(--lc-violet-950), #201938 72%, #17142a);
  border-right-color: rgba(203, 183, 251, .16);
}

#taskmenu a,
#taskmenu .action-buttons a {
  color: rgba(255, 255, 255, .72);
  border-radius: 10px;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

#taskmenu a:hover,
#taskmenu a:focus,
#taskmenu a.selected {
  color: #fff;
  background: rgba(203, 183, 251, .14);
}

#taskmenu a.selected {
  box-shadow: inset 3px 0 0 var(--lc-lavender);
}

#taskmenu .action-buttons a {
  color: var(--lc-lavender);
}

#layout > div > .header,
#layout > div > .footer {
  background: rgba(255, 255, 255, .92);
  border-color: var(--lc-border);
  backdrop-filter: blur(16px);
}

#layout-sidebar,
#layout-list,
#layout-content {
  background-color: var(--lc-surface);
  border-color: var(--lc-border);
}

.searchbar {
  background: var(--lc-surface-soft);
  border-color: var(--lc-border);
  border-radius: 10px;
}

.searchbar:focus-within {
  border-color: var(--lc-violet-500);
  box-shadow: 0 0 0 3px rgba(141, 108, 242, .14);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  border-color: #d8d3de;
  border-radius: 9px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--lc-violet-500) !important;
  box-shadow: 0 0 0 3px rgba(141, 108, 242, .16) !important;
}

.btn-primary,
button.mainaction,
input.mainaction,
#rcmloginsubmit {
  color: #fff !important;
  background: var(--lc-violet-600) !important;
  border-color: var(--lc-violet-600) !important;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(116, 86, 221, .22);
  font-weight: 650;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.btn-primary:hover,
button.mainaction:hover,
input.mainaction:hover,
#rcmloginsubmit:hover {
  background: #6546ce !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(116, 86, 221, .28);
}

.listing li,
.listing tbody td {
  border-color: #eeebf1;
}

.listing li.selected,
.listing li.selected > a,
.listing tr.selected td,
.messagelist tr.selected td {
  color: var(--lc-ink);
  background: var(--lc-lavender-soft) !important;
}

.messagelist tr:hover td,
.listing li > a:hover {
  background-color: #f7f4fc;
}

.messagelist tr.unread td.subject span.subject {
  color: #3d2c76;
  font-weight: 700;
}

.badge,
.listing .badge {
  background: var(--lc-violet-600);
}

/* --- Premium login ----------------------------------------------------- */
body.task-login {
  min-height: 100vh;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 12%, rgba(141, 108, 242, .24), transparent 34%),
    radial-gradient(circle at 84% 82%, rgba(203, 183, 251, .12), transparent 30%),
    var(--lc-violet-950);
}

.task-login #layout {
  min-height: 100vh;
  width: 100%;
  padding: clamp(18px, 3.5vw, 52px);
  display: block;
  background: transparent;
}

.task-login #layout-content {
  width: 100%;
  min-height: calc(100vh - clamp(36px, 7vw, 104px));
  display: block;
  text-align: left;
  background: transparent;
  border: 0;
}

.lc-login-shell {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - clamp(36px, 7vw, 104px)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  overflow: hidden;
  border: 1px solid rgba(222, 214, 239, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}

.lc-login-story {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: clamp(34px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(255, 255, 255, .96);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .04), transparent 55%),
    linear-gradient(160deg, #241b45 0%, #17142a 58%, #302653 120%);
}

.lc-login-story::before,
.lc-login-story::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.lc-login-story::before {
  width: 380px;
  height: 380px;
  right: -140px;
  top: -155px;
  border: 1px solid rgba(203, 183, 251, .14);
  box-shadow: 0 0 0 54px rgba(203, 183, 251, .025), 0 0 0 108px rgba(203, 183, 251, .018);
}

.lc-login-story::after {
  width: 180px;
  height: 180px;
  left: 24%;
  bottom: -115px;
  background: rgba(141, 108, 242, .18);
  filter: blur(4px);
}

.lc-status {
  position: relative;
  z-index: 1;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(203, 183, 251, .22);
  border-radius: 8px;
  color: rgba(255, 255, 255, .76);
  background: rgba(255, 255, 255, .04);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

.lc-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #73d4ad;
  box-shadow: 0 0 0 4px rgba(115, 212, 173, .1);
}

.lc-story-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.lc-eyebrow {
  margin: 0 0 22px;
  color: var(--lc-lavender);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
}

.lc-story-copy h2 {
  margin: 0;
  color: rgba(255, 255, 255, .98);
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -.055em;
}

.lc-story-copy h2 span {
  display: block;
  white-space: nowrap;
}

.lc-story-copy > p:last-child {
  max-width: 430px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, .62);
  font-size: 16px;
  line-height: 1.65;
}

.lc-story-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .045em;
}

.lc-story-foot span::before {
  content: "·";
  margin-right: 8px;
  color: var(--lc-lavender);
}

.lc-login-panel {
  padding: clamp(30px, 5vw, 70px);
  display: grid;
  place-items: center;
  background: #fbfafc;
}

.lc-auth-card {
  width: min(370px, 100%);
}

.task-login #logo {
  position: static;
  top: auto;
  display: block;
  width: 228px;
  max-width: 100%;
  max-height: 52px;
  margin: 0 0 52px;
  filter: none;
}

/* The SVG wordmark is light for the twilight login surface. On the light card,
   keep only the icon visible and use the text heading as the accessible brand. */
.lc-login-panel #logo {
  width: 52px;
  height: 52px;
  object-position: left;
  object-fit: cover;
}

.lc-auth-intro {
  margin-bottom: 28px;
}

.lc-auth-intro h2 {
  margin: 0 0 9px;
  color: var(--lc-ink);
  font-size: 30px;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.lc-auth-intro p {
  margin: 0;
  color: var(--lc-ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.task-login #login-form {
  position: static;
  top: auto;
  width: 100%;
  max-width: none;
  margin: 0;
}

.task-login #login-form .row {
  margin: 0 0 16px;
}

.task-login #login-form label {
  display: block;
  margin: 0 0 7px;
  color: #514b5c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.task-login #login-form .form-control {
  min-height: 50px;
  padding: 12px 14px;
  color: var(--lc-ink);
  background: #fff;
  border: 1px solid #dcd7e2;
  border-radius: 10px;
  box-shadow: none;
}

.task-login #login-form .form-control:hover {
  border-color: #bcb3ca;
}

.task-login #login-form .formbuttons {
  margin-top: 24px;
}

.task-login #rcmloginsubmit {
  width: 100%;
  min-height: 50px;
  margin: 0;
  border-radius: 10px;
}

.lc-auth-note {
  margin-top: 17px;
  color: #8a8492;
  font-size: 11px;
  text-align: center;
}

.task-login #login-footer {
  margin-top: 28px;
  color: #9993a1;
  font-size: 11px;
  text-align: center;
}

.task-login #login-footer > div {
  margin-top: 12px;
  padding: 12px;
  background: #f1eef5;
  border-radius: 9px;
}

.task-login #messagestack {
  max-width: 420px;
  margin: 14px auto;
}

/* --- Dark mode --------------------------------------------------------- */
html.dark-mode body:not(.task-login) {
  --lc-ink: #e8e4ef;
  --lc-ink-soft: #aca4ba;
  --lc-surface: #181620;
  --lc-surface-soft: #121019;
  --lc-border: #332e3c;
  color: var(--lc-ink);
  background: var(--lc-surface-soft);
}

html.dark-mode #layout-sidebar,
html.dark-mode #layout-list,
html.dark-mode #layout-content,
html.dark-mode #layout > div > .header,
html.dark-mode #layout > div > .footer {
  background-color: var(--lc-surface);
  border-color: var(--lc-border);
}

html.dark-mode .searchbar,
html.dark-mode .form-control,
html.dark-mode input,
html.dark-mode select,
html.dark-mode textarea {
  color: #eeeaf4;
  background-color: #201d29;
  border-color: #443e4e;
}

html.dark-mode .listing li,
html.dark-mode .listing tbody td {
  border-color: #292530;
}

html.dark-mode .listing li.selected,
html.dark-mode .listing li.selected > a,
html.dark-mode .listing tr.selected td,
html.dark-mode .messagelist tr.selected td {
  color: #eeeaf4;
  background: #302653 !important;
}

html.dark-mode .messagelist tr:hover td,
html.dark-mode .listing li > a:hover {
  background-color: #25212d;
}

html.dark-mode .messagelist tr.unread td.subject span.subject {
  color: #d8c9ff;
}

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

  .lc-login-story {
    min-height: 310px;
    padding: 36px;
  }

  .lc-story-copy h2 {
    font-size: clamp(38px, 8vw, 50px);
  }

  .lc-story-copy h2 span {
    white-space: normal;
  }

  .lc-story-copy > p:last-child,
  .lc-story-foot {
    display: none;
  }

  .lc-login-panel {
    padding: 44px 36px 52px;
  }
}

@media (max-width: 520px) {
  .task-login #layout {
    padding: 0;
  }

  .task-login #layout-content,
  .lc-login-shell {
    min-height: 100vh;
  }

  .lc-login-shell {
    border: 0;
    border-radius: 0;
  }

  .lc-login-story {
    min-height: 245px;
    padding: 26px 24px 30px;
  }

  .lc-status,
  .lc-eyebrow {
    font-size: 10px;
  }

  .lc-story-copy h2 {
    font-size: 36px;
  }

  .lc-login-panel {
    padding: 36px 24px 46px;
  }

  .task-login #logo {
    margin-bottom: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
