/* =========================================================
   LEDGERS — ADMIN LOGIN
   File: css/admin/login.css
========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #0a0a4f;
  background: #151545;
  font-family: "Montserrat", sans-serif;
}

button,
input {
  font: inherit;
}


/* =========================================================
   PAGE
========================================================= */

.admin-login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 20px;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 14% 18%,
      rgba(247, 221, 131, 0.13),
      transparent 28%
    ),
    radial-gradient(
      circle at 88% 84%,
      rgba(247, 221, 131, 0.08),
      transparent 26%
    ),
    linear-gradient(
      135deg,
      #171747,
      #252565
    );
}

.admin-login-page::before,
.admin-login-page::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(247, 221, 131, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.admin-login-page::before {
  top: -210px;
  right: -130px;
  width: 470px;
  height: 470px;
}

.admin-login-page::after {
  bottom: -260px;
  left: -170px;
  width: 570px;
  height: 570px;
}


/* =========================================================
   CARD
========================================================= */

.admin-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 46px;
  background: #ffffff;
  border: 1px solid rgba(10, 10, 79, 0.06);
  border-radius: 24px;

  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.1);
}


/* =========================================================
   BRAND
========================================================= */

.admin-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: fit-content;
  margin: 0 auto 24px;
  color: #0a0a4f;
  text-decoration: none;
}

.admin-login-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.admin-login-brand span {
  padding-left: 14px;
  border-left: 2px solid #f7dd83;
  font-family: 'Montserrat', serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 2px;
}


/* =========================================================
   HEADING
========================================================= */

.admin-access-label {
  width: fit-content;
  margin: 0 auto 16px;
  padding: 7px 13px;
  color: #0a0a4f;
  background: rgba(247, 221, 131, 0.42);
  border: 1px solid rgba(214, 178, 71, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.admin-login-card h1 {
  margin: 0 0 12px;
  color: #737381;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.15;
  text-align: center;
}

.admin-login-subtitle {
  max-width: 370px;
  margin: 0 auto 30px;
  color: #737381;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}


/* =========================================================
   FORM
========================================================= */

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-field label {
  color: #0a0a4f;
  font-size: 13px;
  font-weight: 650;
}

.admin-field input {
  width: 100%;
  padding: 15px 17px;
  color: #0a0a4f;
  background: #fafafa;
  border: 1px solid #e5e5ec;
  border-radius: 12px;
  outline: none;

  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.admin-field input::placeholder {
  color: #9a9aa6;
}

.admin-field input:focus {
  background: #ffffff;
  border-color: #e2bf52;
  box-shadow:
    0 0 0 4px rgba(247, 221, 131, 0.22);
}

.admin-password-field {
  position: relative;
}

.admin-password-field input {
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 13px;
  padding: 5px;
  color: #0a0a4f;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: #a47e16;
}

.password-toggle:focus-visible {
  outline: 2px solid #d1a82e;
  outline-offset: 2px;
  border-radius: 4px;
}

.admin-field-error {
  min-height: 14px;
  color: #b3261e;
  font-size: 12px;
}


/* =========================================================
   OPTIONS
========================================================= */

.admin-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6d6d79;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.admin-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #f7dd83;
  cursor: pointer;
}

.admin-forgot-link {
  color: #0a0a4f;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.admin-forgot-link:hover {
  color: #a47e16;
}


/* =========================================================
   BUTTON
========================================================= */

.admin-signin-button {
  width: 100%;
  margin-top: 4px;
  padding: 15px 24px;
  color: #0a0a4f;
  background: #f7dd83;
  border: 0;
  border-radius: 12px;
  font-weight: 750;
  cursor: pointer;

  box-shadow:
    0 11px 26px rgba(247, 221, 131, 0.25);

  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.admin-signin-button:hover {
  background: #f3d56f;
  transform: translateY(-2px);
  box-shadow:
    0 15px 32px rgba(247, 221, 131, 0.32);
}

.admin-signin-button:active {
  transform: translateY(0);
}

.admin-signin-button:focus-visible {
  outline: 3px solid rgba(10, 10, 79, 0.32);
  outline-offset: 3px;
}


/* =========================================================
   LOWER LINKS
========================================================= */

.client-login-link {
  position: relative;
  margin: 30px 0 0;
  padding-top: 23px;
  color: #868692;
  font-size: 13px;
  text-align: center;
}

.client-login-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 68px;
  height: 1px;
  background: #e7e7ed;
  transform: translateX(-50%);
}

.client-login-link a {
  margin-left: 4px;
  color: #0a0a4f;
  font-weight: 700;
  text-decoration: none;
}

.client-login-link a:hover {
  color: #a47e16;
}

.admin-security-note {
  margin: 17px 0 0;
  color: #9a9aa5;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 560px) {
  .admin-login-page {
    padding: 24px 16px;
  }

  .admin-login-card {
    padding: 38px 24px 29px;
    border-radius: 20px;
  }

  .admin-login-brand img {
    width: 52px;
    height: 52px;
  }

  .admin-login-brand span {
    font-size: 21px;
  }

  .admin-login-card h1 {
    font-size: 35px;
  }

  .admin-login-options {
    align-items: flex-start;
  }

  .admin-remember,
  .admin-forgot-link {
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  .admin-login-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.login-message {
  min-height: 22px;
  margin: 14px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.login-message.error {
  color: #c0392b;
}

.login-message.success {
  color: #177245;
}

.admin-field input[aria-invalid="true"] {
  border-color: #c0392b;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

.admin-signin-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}