/* SNOW MIKU Chronicle: colours and type follow snowmiku-chronicle.com */
@font-face {
  font-family: 'SMC Lato';
  src: url('fonts/Lato-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  --smc-navy: #0b1d3a;
  --smc-deep: rgba(6, 14, 32, 1);
  --smc-blue: #1e5a9f;
  --smc-ice: #76edff;
  --smc-line: #a9bccf;
  --smc-en: 'SMC Lato', 'Lato', sans-serif;
}

/* ---------- login page ---------- */
body.task-login {
  background: #000;
  color: #fff;
}
body.task-login #layout {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 96px clamp(24px, 6vw, 96px) 48px;
  box-sizing: border-box;
  background: transparent;
}

.smc-hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.smc-hero-bg {
  position: absolute;
  inset: 0;
  background: url('hero-snowmiku.jpg') center 20% / cover no-repeat;
  animation: smc-hero-zoom 3s cubic-bezier(0.4, 0.4, 0, 1) 200ms both;
}
.smc-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 14, 32, 0.25) 0%, rgba(6, 14, 32, 0.15) 45%, rgba(6, 14, 32, 0.65) 100%),
    linear-gradient(180deg, rgba(6, 14, 32, 0.55) 0%, rgba(6, 14, 32, 0.25) 30%, rgba(6, 14, 32, 0.5) 70%, rgba(6, 14, 32, 0.75) 100%);
}
@keyframes smc-hero-zoom {
  from { transform: scale(1.05); }
  to { transform: scale(1); }
}

.smc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 24px 48px;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(102, 102, 102, 0));
}
.smc-header-logo,
.smc-header-logo:hover {
  font-family: var(--smc-en);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: #fff;
  text-decoration: none;
}

.smc-billboard {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.smc-billboard-title {
  margin: 0;
  font-family: var(--smc-en);
  font-weight: 600;
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 1.15;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 8px 32px rgba(0, 0, 0, 0.6);
}
.smc-billboard-sub {
  margin: 0;
  font-family: var(--smc-en);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--smc-ice);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.smc-pill,
.smc-pill:hover {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 40px;
  background: rgba(6, 14, 32, 0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
}
.smc-arrow {
  font-size: 18px;
  line-height: 1;
}

/* the login card */
body.task-login #layout-content {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 420px;
  max-width: 100%;
  height: auto;
  margin: 0;
  text-align: left;
  padding: 40px 36px 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  background: rgba(6, 14, 32, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  color: #fff;
  overflow: visible;
}
body.task-login #layout-content #logo {
  display: none;
}
.smc-card-head {
  margin-bottom: 28px;
  text-align: left;
}
.smc-card-title {
  margin: 0 0 8px;
  font-family: var(--smc-en);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.15em;
  color: #fff;
}
.smc-card-lead {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}
body.task-login #login-form {
  top: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}
body.task-login #login-form .form-group,
body.task-login #login-form .row {
  margin-bottom: 16px;
}
body.task-login #login-form .input-group {
  flex-wrap: nowrap;
}
body.task-login #login-form .input-group-text {
  min-height: 48px;
  border: 1px solid var(--smc-line);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #eaf5fb;
  color: var(--smc-navy);
}
body.task-login #login-form input.form-control {
  min-height: 48px;
  font-size: 16px;
  border: 1px solid var(--smc-line);
  border-radius: 0 4px 4px 0;
  background: #fff;
  color: var(--smc-navy);
}
body.task-login #login-form input.form-control:focus {
  border-color: var(--smc-ice);
  box-shadow: 0 0 0 3px rgba(118, 237, 255, 0.35);
}
body.task-login #login-form .formbuttons {
  margin: 24px 0 0;
}
body.task-login #login-form .formbuttons .button.mainaction {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--smc-ice);
  color: var(--smc-navy);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.1em;
  transition: filter 0.2s;
}
body.task-login #login-form .formbuttons .button.mainaction:hover,
body.task-login #login-form .formbuttons .button.mainaction:focus {
  filter: brightness(1.08);
  background: var(--smc-ice);
  color: var(--smc-navy);
}
body.task-login #login-footer {
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}
body.task-login #login-footer a {
  color: rgba(255, 255, 255, 0.8);
}
body.task-login #messagestack {
  z-index: 10;
}

@media (max-width: 860px) {
  body.task-login #layout {
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 32px;
    padding: 96px 16px 32px;
  }
  .smc-header {
    padding: 20px 16px;
  }
  .smc-header-logo {
    font-size: 15px;
    letter-spacing: 0.04em;
  }
  .smc-billboard {
    align-items: center;
    width: 100%;
    text-align: center;
    gap: 12px;
  }
  .smc-billboard-title {
    font-size: clamp(30px, 10vw, 44px);
  }
  .smc-pill {
    display: none;
  }
  body.task-login #layout-content {
    width: 100%;
    padding: 28px 20px 20px;
  }
  .smc-hero-bg {
    background-position: 30% 15%;
  }
}

/* ---------- mail UI accents ---------- */
html:not(.dark-mode) .button.mainaction,
html:not(.dark-mode) .btn-primary {
  background-color: var(--smc-blue);
  border-color: var(--smc-blue);
}

/* main menu: navy like the official site's header/footer */
#layout-menu,
#taskmenu .special-buttons,
#layout-menu .popover-header {
  background: linear-gradient(180deg, #0b1d3a 0%, #06142a 100%) !important;
}
#layout-menu #logo {
  padding: 0.6rem 0.4rem;
}
#taskmenu a {
  color: rgba(255, 255, 255, 0.78);
}
#taskmenu a:hover,
#taskmenu a.selected,
#taskmenu a.selected:hover {
  color: #fff;
  background: rgba(118, 237, 255, 0.12);
  box-shadow: inset 3px 0 0 var(--smc-ice);
}
#taskmenu .action-buttons a,
#taskmenu .action-buttons a:hover {
  color: var(--smc-ice);
}

/* folder & message lists */
html:not(.dark-mode) .listing li.selected,
html:not(.dark-mode) .listing tr.selected td {
  color: var(--smc-navy);
  background-color: #e6f1fb;
}
html:not(.dark-mode) #folderlist-content li.selected > a {
  box-shadow: inset 3px 0 0 var(--smc-blue);
}
html:not(.dark-mode) .listing tr.unread td .subject a {
  color: var(--smc-navy);
}

/* accents that were Roundcube blue */
html:not(.dark-mode) .floating-action-buttons a.button,
html:not(.dark-mode) .quota-widget .value {
  background: var(--smc-blue);
}
html:not(.dark-mode) .popover .menu li a:not(.disabled):hover,
html:not(.dark-mode) .ui-menu .ui-state-active {
  background-color: var(--smc-blue) !important;
}
