/* =========================
   VARIABLES
========================= */
:root {
  --login-primary: #0b2a5b;
  --login-card: #ffffff;
  --login-text: #222;
}

/* =========================
   PAGE LAYOUT
========================= */
.login-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)),
    url("../images/login-bg.jpg") center/cover no-repeat;
  color: var(--login-text);
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 15px;
}

/* =========================
   SIGNUP BOX
========================= */
.login-box {
  width: 440px;
  max-width: 95%;
  padding: 30px;
  background: var(--login-card);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  text-align: center;
  animation: fadeIn .5s ease;
}

.login-box h2 {
  margin: 0 0 20px;
  color: var(--login-primary);
}

/* =========================
   FORM CONTROLS
========================= */
.login-box input,
.login-box select {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}

.login-box input:focus,
.login-box select:focus {
  outline: none;
  border-color: var(--login-primary);
  box-shadow: 0 0 0 3px rgba(11,42,91,.15);
}

.login-box button {
  width: 100%;
  padding: 12px;
  margin-top: 18px;
  border: none;
  border-radius: 5px;
  background: var(--login-primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: .25s;
}

.login-box button:hover {
  background: #143c7d;
  transform: translateY(-1px);
}

/* =========================
   PROFILE IMAGE
========================= */
.profile-upload {
  width: 120px;
  margin: 0 auto 20px;
  position: relative;
}

.profile-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ddd;
  background: #f5f5f5;
  cursor: pointer;
  transition: .25s;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.profile-preview:hover {
  border-color: var(--login-primary);
}

.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.choose-photo-btn {
  width: auto !important;
  margin-top: 12px !important;
  padding: 10px 18px !important;
}

.remove-photo {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 28px !important;
  height: 28px;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50%;
  background: #e53935 !important;
  color: #fff;
  font-size: 18px;
  line-height: 28px;
  cursor: pointer;
  display: none;
}

.remove-photo:hover {
  background: #c62828 !important;
}

/* =========================
   INLINE FIELDS
========================= */
.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.form-row label {
  width: 110px;
  flex-shrink: 0;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.form-row select,
.form-row input[type="date"] {
  flex: 1;
  margin-top: 0;
}

.form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, #666 50%),
    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* =========================
   ERROR
========================= */
.login-error {
  margin-bottom: 15px;
  color: #dc3545;
  font-size: 14px;
}

/* =========================
   SIGNUP LINK
========================= */
.signup-link {
  margin-top: 18px;
  font-size: 14px;
}

.signup-link a {
  color: var(--login-primary);
  text-decoration: none;
  font-weight: 600;
}

.signup-link a:hover {
  text-decoration: underline;
}

/* =========================
   ANIMATION
========================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 480px) {

  .login-box {
    width: 100%;
    padding: 22px;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .form-row label {
    width: 100%;
  }
}