/* =====================================================
   SRA GROUP ERP - PAS LOGIN
   File: login.css
   Version: 1.0.0

   Responsive:
   Desktop : >= 1101px (base)
   Tablet  : 601px - 1100px
   Mobile  : <= 600px
===================================================== */

:root {
  --navy: #0b3d84;
  --navy-dark: #092c61;
  --green: #00a653;
  --green-dark: #008d47;
  --text: #23334d;
  --muted: #6b7d99;
  --input: #e8f0fc;
  --border: #dce5f2;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #dceaf7;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(0, 166, 83, 0.4);
  outline-offset: 2px;
}

/* BACKGROUND */

.login-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 36px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: -12px;
  z-index: -2;
  background-image: url("assets/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px);
  transform: scale(1.025);
}

.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(241, 247, 255, 0.28);
}

/* LOGIN CARD */

.login-card {
  width: 100%;
  max-width: 410px;
  padding: 34px 36px 26px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 22px 60px rgba(8, 37, 81, 0.25),
    0 5px 20px rgba(8, 37, 81, 0.08);

  animation: cardEnter 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* BRAND */

.brand-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand-logo {
  display: block;
  width: 220px;
  height: 112px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  margin: 0 auto 9px;
}

/*
   logo.png is a square asset.
   Its content is centered with transparent padding.
   Use object-fit instead of absolute positioning.
*/

.brand-area h1 {
  margin: 5px 0 5px;
  color: var(--green);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.company-name {
  margin: 0;
  max-width: 320px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.5;
  color: var(--navy);
  text-align: center;
}

.login-subtitle {
  margin: 17px 0 29px;
  color: #66758d;
  font-weight: 700;
  font-size: 17px;
}

/* FORM */

.form-group {
  margin-bottom: 19px;
}

.form-group label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 700;
  color: #25354e;
}

.form-input {
  display: block;
  width: 100%;
  height: 47px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--input);
  color: var(--text);
  font-size: 14px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.form-input::placeholder {
  color: #8b9bb2;
}

.form-input:focus {
  outline: none;
  background: #f5f9ff;
  border-color: #4b99db;
  box-shadow: 0 0 0 3px rgba(38, 119, 206, 0.12);
}

.password-wrap {
  position: relative;
}

.password-input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #8798b3;
}

.password-toggle:hover {
  color: var(--navy);
  background: rgba(11, 61, 132, 0.06);
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.form-options {
  display: flex;
  justify-content: flex-end;
  margin: -3px 0 22px;
}

.text-button {
  padding: 2px 0;
  border: none;
  background: transparent;
  color: #0756ab;
  font-size: 12px;
  font-weight: 700;
}

.text-button:hover {
  text-decoration: underline;
}

/* LOGIN BUTTON */

.login-button {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #04ac5c, #008d47);
  color: white;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0, 152, 77, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 14px 26px rgba(0, 152, 77, 0.26);
}

.login-button:active {
  transform: translateY(0);
}

/* ALERT */

.alert {
  padding: 12px 14px;
  margin-bottom: 19px;
  border-radius: 10px;
  line-height: 1.6;
  font-size: 12px;
}

.alert-error {
  background: #fff0f0;
  color: #a32d38;
  border: 1px solid #f5c5ca;
}

.alert-info {
  background: #eaf4ff;
  color: #194f8a;
  border: 1px solid #bfdcf9;
}

/* FOOTER */

.login-footer {
  margin-top: 26px;
  text-align: center;
  color: #8290a8;
  font-size: 10px;
  line-height: 1.7;
}

.login-footer p {
  margin: 0 0 5px;
}

.login-footer span {
  color: #9aa8bb;
}

/* MODAL */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 24, 51, 0.6);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  width: min(100%, 420px);
  border-radius: 17px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.25);
  transform: translateY(18px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 17px 21px;
  border-bottom: 1px solid #e5eaf1;
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
  color: #163b79;
}

.modal-close {
  width: 33px;
  height: 33px;
  border: none;
  border-radius: 8px;
  background: #f1f4f8;
  color: #64748b;
  font-size: 25px;
  line-height: 1;
}

.modal-close:hover {
  background: #e5eaf2;
}

.modal-body {
  padding: 26px 24px;
  text-align: center;
}

.modal-symbol {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  background: #e8f5ff;
  color: #1262b5;
  font-size: 27px;
  font-weight: 800;
}

.modal-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #57677e;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid #e5eaf1;
}

.modal-confirm {
  min-width: 90px;
  padding: 10px 18px;
  border: none;
  border-radius: 9px;
  background: var(--navy);
  color: white;
  font-weight: 700;
}

body.modal-open {
  overflow: hidden;
}

/* ANIMATION */

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* TABLET */

@media (min-width: 601px) and (max-width: 1100px) {
  .login-card {
    max-width: 400px;
    padding: 32px 32px 25px;
  }

  .login-page::before {
    background-position: 55% center;
  }
}

/* MOBILE */

@media (max-width: 600px) {
  .login-page {
    padding: 20px 14px;
  }

  .login-page::before {
    background-position: 52% center;
  }

  .login-card {
    max-width: 390px;
    padding: 25px 23px 22px;
    border-radius: 18px;
  }

  .brand-logo {
    width: 195px;
    height: 100px;
  }

  .brand-area h1 {
    font-size: 25px;
  }

  .login-subtitle {
    margin-bottom: 23px;
    font-size: 16px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-input {
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
