/* =================================
   LOGIN PAGE
================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #243544;
  background: #f6f4ee;
  overflow-x: hidden;
}

/* =========================
           ANIMATED MESH BACKGROUND
        ========================== */

.mesh-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f6f0 0%, #efe9da 55%, #f5f2e9 100%);
}

.mesh-background::before,
.mesh-background::after {
  content: "";
  position: absolute;
  width: 75vw;
  height: 75vw;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.8;
  animation: meshMove 13s ease-in-out infinite alternate;
}

.mesh-background::before {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9),
    transparent 70%
  );
  top: -30%;
  left: -20%;
}

.mesh-background::after {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.5),
    transparent 70%
  );
  bottom: -35%;
  right: -20%;
  animation-delay: -6s;
  animation-direction: alternate-reverse;
}

@keyframes meshMove {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(15%, 20%) scale(1.2);
  }
  100% {
    transform: translate(-10%, 10%) scale(0.9);
  }
}

@keyframes darkMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-20%, 15%);
  }
}

/* =================================
   LOGIN CONTAINER
================================= */

.login-container {
  position: relative;
  z-index: 6;

  min-height: 100vh;
  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 40px 20px;
}

/* =================================
   LOGIN CARD
================================= */

.login-card {
  position: relative;

  width: 100%;
  max-width: 800px;

  padding: 40px 38px;

  border: 1px solid rgba(38, 52, 65, 0.12);
  border-radius: 28px;

  background: rgba(255, 255, 255, 0.8);

  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  box-shadow:
    0 20px 60px rgba(33, 41, 47, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);

  animation: loginAppear 0.8s ease forwards;
}

@keyframes loginAppear {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =================================
   LOGO
================================= */

.login-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.8;
  margin-bottom: 22px;
}

.login-logo img {
  width: 100px;
  height: 100px;

  object-fit: contain;

  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.12));
}

/* =================================
   HEADER
================================= */

.login-header {
  text-align: center;
  margin-bottom: 35px;
}

.login-header h1 {
  font-family: "DM Sans", sans-serif;

  font-size: 27px;
  font-weight: 900;

  letter-spacing: 2px;

  color: #1f2d3a;
}

.login-header p {
  font-family: "DM Sans", sans-serif;

  font-size: 11px;
  font-weight: 600;

  letter-spacing: 3px;

  color: #5d6d7a;

  margin-top: 8px;
}

/* =================================
   INPUT GROUP
================================= */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 23px;
}

.login-message {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 73, 73, 0.08);
  border: 1px solid rgba(196, 74, 74, 0.45);
  color: #7a1f1f;
  font-size: 14px;
  font-weight: 600;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group label {
  font-family: "DM Sans", sans-serif;

  font-size: 13px;
  font-weight: 700;

  color: #33414d;
}

.input-group input {
  width: 100%;
  height: 50px;

  padding: 0 16px;

  border: 1px solid rgba(38, 52, 65, 0.18);
  border-radius: 12px;

  outline: none;

  background: rgba(246, 244, 238, 0.9);

  color: #1e2b35;

  font-family: "DM Sans", sans-serif;
  font-size: 13px;

  transition: 0.3s ease;
}

.input-group input::placeholder {
  color: #758291;
}

.input-group input:focus {
  border-color: #8d6013;

  background: #fff;

  box-shadow: 0 0 0 4px rgba(141, 96, 19, 0.08);
}

/* =================================
   PASSWORD
================================= */

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 65px;
}

.toggle-password {
  position: absolute;

  top: 50%;
  right: 14px;

  transform: translateY(-50%);

  border: none;
  background: none;

  color: #33414d;

  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 800;

  cursor: pointer;

  transition: 0.3s;
}

.toggle-password:hover {
  opacity: 0.65;
}

/* =================================
   REMEMBER ME
================================= */

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-top: -5px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 9px;

  font-family: "DM Sans", sans-serif;
  font-size: 12px;

  color: #33414d;

  cursor: pointer;
}

.remember-me input {
  accent-color: #8d6013;

  width: 14px;
  height: 14px;

  cursor: pointer;
}

/* =================================
   LOGIN BUTTON
================================= */

.login-button {
  width: 100%;
  height: 52px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  border: 1px solid #243544;
  border-radius: 13px;

  background: #243544;

  color: #fff;

  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 900;

  letter-spacing: 2px;

  cursor: pointer;

  transition: all 0.35s ease;
}

.login-button span {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.login-button:hover {
  background: #1a2733;
  color: #fff;

  box-shadow: 0 0 25px rgba(36, 53, 68, 0.12);
}

.login-button:hover span {
  transform: translateX(5px);
}

.login-button:active {
  transform: scale(0.98);
}

/* =================================
   FOOTER
================================= */

.login-footer {
  margin-top: 30px;

  text-align: center;
}

.login-footer p {
  font-family: "DM Sans", sans-serif;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 2px;

  color: #5b646d;

  margin-bottom: 15px;
}

.login-footer a {
  font-family: "DM Sans", sans-serif;

  font-size: 12px;

  color: #1f2d3a;

  text-decoration: none;

  transition: 0.3s;
}

.login-footer a:hover {
  opacity: 0.65;
}

/* =================================
   MOBILE
================================= */

@media (max-width: 480px) {
  .login-container {
    padding: 25px 18px;
  }

  .login-card {
    padding: 35px 25px;
    border-radius: 23px;
  }

  .login-logo img {
    width: 85px;
    height: 85px;
  }

  .login-header h1 {
    font-size: 23px;
  }
}

/* =================================
   REDUCE MOTION
================================= */

@media (prefers-reduced-motion: reduce) {
  .login-card,
  .login-button,
  .toggle-password {
    animation: none;
    transition: none;
  }
}

/* Login page refresh */
body {
  min-width: 320px;
  min-height: 100vh;
  color: #263745;
  background: #f5f3ed;
}

.mesh-background {
  z-index: 0;
  background: #5aa4d5 url("assets/login-background.png") center center / cover no-repeat;
  pointer-events: none;
}

.mesh-background::before,
.mesh-background::after {
  display: none;
}

.mesh-dark {
  display: none;
}

.login-container {
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  padding: 20px;
}

.login-card {
  width: min(100%, 810px);
  max-width: 810px;
  padding: 36px 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 27px;
  background: linear-gradient(
    145deg,
    rgba(247, 251, 255, 0.72),
    rgba(232, 244, 251, 0.56) 52%,
    rgba(214, 233, 244, 0.66)
  );
  box-shadow:
    0 24px 70px rgba(37, 46, 52, 0.1),
    0 3px 12px rgba(37, 46, 52, 0.035),
    inset 0 1px 1px rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.login-logo {
  width: 112px;
  height: 112px;
  margin: 0 auto 13px;
  padding: 0;
  border: 1px solid rgba(38, 55, 69, 0.08);
  border-radius: 12px;
  background: #fff;
  opacity: 1;
  box-shadow: 0 8px 22px rgba(37, 46, 52, 0.09);
  overflow: hidden;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}

.login-header {
  margin-bottom: 26px;
}

.login-header h1 {
  color: #243544;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: 2.2px;
}

.login-header p {
  margin-top: 7px;
  color: #78838b;
  font-size: 10px;
  letter-spacing: 3px;
}

.login-form {
  gap: 16px;
}

.input-group {
  gap: 8px;
}

.input-group label {
  color: #344452;
  font-size: 12px;
}

.input-group input {
  height: 48px;
  border-color: #deddd8;
  border-radius: 12px;
  background: #f7f6f2;
  font-size: 13px;
}

.input-group input:focus {
  border-color: #a68a56;
  box-shadow: 0 0 0 4px rgba(166, 138, 86, 0.12);
}

.toggle-password {
  color: #344452;
}

.toggle-password:focus-visible,
.login-button:focus-visible,
.login-footer a:focus-visible {
  outline: 3px solid rgba(166, 138, 86, 0.45);
  outline-offset: 3px;
}

.login-options {
  margin-top: -3px;
}

.remember-me {
  gap: 8px;
  color: #596773;
  font-size: 12px;
}

.remember-me input {
  width: 15px;
  height: 15px;
  accent-color: #344452;
}

.login-message {
  padding: 12px 14px;
  border: 1px solid #e8c8c3;
  border-radius: 10px;
  background: #fff5f3;
  color: #8c3932;
  font-size: 12px;
  line-height: 1.5;
}

.login-button {
  min-height: 52px;
  border-color: #263846;
  border-radius: 12px;
  background: #263846;
  font-size: 12px;
  letter-spacing: 2px;
}

.login-button:hover {
  background: #1d2c38;
  box-shadow: 0 10px 24px rgba(38, 56, 70, 0.16);
}

.login-footer {
  margin-top: 22px;
}

.login-footer p {
  margin-bottom: 10px;
  color: #899198;
  font-size: 9px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.login-footer a {
  color: #455561;
  font-size: 12px;
}

@media (max-width: 560px) {
  .mesh-background {
    background-position: 78% center;
  }

  .login-container {
    padding: 22px 16px;
  }

  .login-card {
    padding: 32px 24px 28px;
    border-radius: 22px;
  }

  .login-logo {
    width: 94px;
    height: 94px;
  }

  .login-header {
    margin-bottom: 27px;
  }

  .login-header h1 {
    font-size: 21px;
    letter-spacing: 1.6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card {
    animation: none;
  }
}
