/* Tyler Starr — webmail.tylerstarr.ca branding */

/* ---------- Login page ---------- */
html body.task-login {
  min-height: 100vh;
  background-color: #12294a;
  background-image:
    radial-gradient(ellipse 65% 55% at 6% 0%, rgba(160, 198, 240, 0.55) 0%, rgba(160, 198, 240, 0) 62%),
    radial-gradient(ellipse 70% 70% at 100% 100%, rgba(6, 16, 34, 0.85) 0%, rgba(6, 16, 34, 0) 70%),
    url("bg-math.svg"),
    linear-gradient(135deg, #2d5785 0%, #1e3f66 45%, #12294a 100%);
  background-size: auto, auto, 560px 380px, auto;
  background-attachment: fixed;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

html body.task-login #layout,
html body.task-login #layout-content {
  background: transparent !important;
  border: 0 !important;
}

html body.task-login #layout-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  overflow: auto;
}

/* Signature logo */
html body.task-login #logo {
  position: static;
  top: auto;
  opacity: 1;
  width: min(360px, 82vw);
  max-width: none;
  max-height: none;
  height: auto;
  margin: 0 0 1.6rem;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.35));
  animation: ts-fade-down 0.9s ease both;
}

/* Glass card */
html body.task-login #login-form {
  position: static;
  top: auto;
  width: min(410px, 92vw);
  max-width: none;
  margin: 0;
  padding: 2.1rem 2rem 1.4rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 34px 70px -24px rgba(2, 8, 22, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: ts-rise 0.8s 0.15s ease both;
}

html body.task-login .ts-heading {
  text-align: center;
  margin: 0 0 1.4rem;
  color: #fff;
}

html body.task-login .ts-heading h2 {
  margin: 0 0 0.3rem;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}

html body.task-login .ts-heading p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(226, 236, 248, 0.78);
}

/* Fields */
html body.task-login #login-form table,
html body.task-login #login-form tbody {
  display: block;
  width: 100%;
}

html body.task-login #login-form tr.form-group {
  display: block;
  margin: 0 0 0.9rem;
}

html body.task-login #login-form td.input {
  display: flex;
  width: 100%;
  padding: 0;
}

html body.task-login #login-form .input-group-text {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  color: rgba(226, 236, 248, 0.85);
  min-width: 3rem;
  justify-content: center;
}

html body.task-login #login-form input.form-control {
  height: 3.1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  color: #fff;
  font-size: 1rem;
  box-shadow: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

html body.task-login #login-form input.form-control::placeholder {
  color: rgba(226, 236, 248, 0.6);
}

html body.task-login #login-form .input-group:focus-within .input-group-text,
html body.task-login #login-form input.form-control:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(190, 214, 245, 0.75);
}

html body.task-login #login-form .input-group:focus-within {
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(150, 190, 240, 0.22);
}

/* Keep browser autofill on-theme */
html body.task-login #login-form input.form-control:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(36, 70, 110, 0.95) inset;
  caret-color: #fff;
}

/* Button */
html body.task-login #login-form .formbuttons {
  margin: 1.3rem 0 0;
}

html body.task-login #rcmloginsubmit {
  height: 3.1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #e4edf8 100%);
  color: #16325a;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

html body.task-login #rcmloginsubmit:hover,
html body.task-login #rcmloginsubmit:focus {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.65), 0 0 0 4px rgba(150, 190, 240, 0.25);
}

html body.task-login #rcmloginsubmit:active {
  transform: translateY(0);
}

/* Footer */
html body.task-login #login-footer {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: rgba(226, 236, 248, 0.55);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

html body.task-login #login-footer a {
  color: rgba(226, 236, 248, 0.8);
}

/* Error / info toasts on the login page */
html body.task-login #messagestack div {
  border-radius: 12px;
}

@keyframes ts-fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ts-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html body.task-login #logo,
  html body.task-login #login-form { animation: none; }
}

@media (max-width: 480px) {
  html body.task-login #login-form { padding: 1.6rem 1.25rem 1.1rem; border-radius: 18px; }
  html body.task-login #logo { margin-bottom: 1.1rem; }
}

/* ---------- Inside the mailbox: signature in the menu ---------- */
#layout-menu #logo {
  object-fit: contain;
}

html.dark-mode #layout-menu #logo {
  filter: brightness(0) invert(1);
}
