* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  background: #081b27;
}

/* BACKGROUND */
.login-page {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #081b27;
}

.page-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
}

/* CENTER */
.login-center {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* BACK BUTTON */
.back-button {
  position: absolute;
  top: 30px;
  left: 40px;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* MAIN CARD */
.login-container {
  display: flex;
  flex-wrap: wrap;
  width: min(1100px, calc(100vw - 40px));
  max-width: 95%;
  max-height: calc(100vh - 80px);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}

/* LEFT SIDE */
.login-left {
width: 50%;
padding: 50px 50px;
background: rgba(163,203,216,0.5);
position: relative;

display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
}

.login-left::before {
content: "";
position: absolute;
inset: 0;
background: url('/images/mix.png') center/contain no-repeat; /* FIX size */
opacity: 0.15;
}

.login-left * {
position: relative;
z-index: 1;
}

/* LOGO */
.logo {
width: 400px;
margin-bottom: 20px;
}

/* HEADING */
.brand-heading {
font-size: 34px; /* FIX bigger */
font-weight: 700;
line-height: 1.3;
margin-bottom: 20px;
max-width: 420px;
}

/* SPLIT COLOR */
.brand-heading {
color: black;
}

.brand-heading br + span {
color: #145267;
}

/* DESCRIPTION */
.brand-description {
font-size: 15px;
color: #3a4a57;
line-height: 1.8;
margin-bottom: 35px;
max-width: 420px;
text-align: justify;
text-indent: 25px;
}

/* TESTIMONIAL */
.testimonial-card {
  background: rgba(255,255,255,0.95);
  padding: 24px;
  border-radius: 16px;
  width: min(420px, 100%);
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  text-align: left;
}

.testimonial-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-image {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-right: 0;
  font-size: 18px;
  line-height: 1;
  text-indent: 0;
}

.testimonial-text {
  margin: 0;
  color: #334155;
  line-height: 1.75;
  font-size: 14px;
}

/* RIGHT SIDE */
.login-right {
  width: 50%;
  padding: 50px 50px;
  overflow: auto;
}

@media (max-width: 1100px) {
  .login-container {
    flex-direction: column;
    width: min(100%, calc(100vw - 32px));
    max-height: none;
  }

  .login-left,
  .login-right {
    width: 100%;
    padding: 40px 30px;
  }

  .login-left {
    border-radius: 18px 18px 0 0;
  }

  .login-right {
    border-radius: 0 0 18px 18px;
  }
}

/* FORM */
.form-title {
font-size: 28px;
font-weight: 700;
margin-bottom: 10px;
color: #145267; /* FIX color */
}

.form-subtitle {
font-size: 15px;
color: #777;
margin-bottom: 30px;
}

.form-label {
font-size: 12px;
font-weight: 600;
margin-bottom: 6px;
display: block;
}

/* INPUT GROUP */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 25px;
  color: #a0a9b3;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 25px;
  color: #a0a9b3;
  font-size: 16px;
  cursor: pointer;
  z-index: 1;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: #145267;
}

/* INPUT */
.form-input {
  width: 100%;
  padding: 14px 45px 14px 45px;
  margin-top: 10px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 2px solid #e3e6ea;
  background: #f7f9fc;
  font-size: 14px;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 186, 203, 0.1);
}

.form-input:invalid:not(:placeholder-shown) {
  border: 2px solid #ef4444;
}

.success-message {
  color: #28a745;
  font-size: 13px;
  margin-bottom: 12px;
}

/* PASSWORD HEADER */
.password-header {
display: flex;
justify-content: space-between;
align-items: center;
}

.forgot-password {
font-size: 12px;
color: #145267;
text-decoration: none;
}

/* CHECKBOX */
.checkbox-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #145267;
  cursor: pointer;
  vertical-align: middle;
}

.checkbox-group label {
  margin: 0;
  color: #334155;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
}

/* BUTTON CUSTOMIZATION */
.back-button {
  position: absolute;
  top: 30px;
  left: 40px;
}

.btn-signin {
  width: 100%;
}

/* FOOTER */
.form-footer {
text-align: center;
margin-top: 20px;
font-size: 14px;
}

.form-footer a {
color: #145267; /* FIX */
}

/* INFO BOX */
.info-box {
display: flex;
gap: 10px;
margin-top: 25px;
padding: 14px;
background: #eef7fa;
border-left: 4px solid #10bacb;
border-radius: 10px;
font-size: 13px;
color: #555;
}

.info-box p {
text-align: justify;
text-indent: 0;
margin: 0;
}

/* FOOTER LINKS */
.footer-links {
margin-top: 25px;
text-align: center;
font-size: 12px;
color: #888;
}

.footer-links span {
margin: 0 10px; /* FIX spacing */
}

/* ================= FIELD GROUP & ERROR STYLES ================= */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.field-group.field-error .form-input {
    border: 2px solid #ef4444;
    background: #fff7f7;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Import standardized form input styles */
@import url('../../css/components/form-inputs.css');

/* ================= FLOATING ERROR ALERT ================= */
.floating-error-alert {
  position: fixed;
  top: 20px;
  right: 40px;
  z-index: 9999;
  max-width: 500px;
  width: min(500px, calc(100vw - 80px));
  animation: slideDown 0.3s ease forwards;
}

.error-alert-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.15);
  backdrop-filter: blur(10px);
}

.error-alert-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  font-size: 18px;
  flex-shrink: 0;
}

.error-alert-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.error-alert-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
}

.error-alert-message {
  margin: 0;
  font-size: 13px;
  color: #b91c1c;
  line-height: 1.4;
}

.error-alert-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #ef4444;
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.error-alert-close:hover {
  color: #dc2626;
}

/* ================= FLOATING SUCCESS ALERT ================= */
.floating-success-alert {
  position: fixed;
  top: 20px;
  right: 40px;
  z-index: 9999;
  max-width: 500px;
  width: min(500px, calc(100vw - 80px));
  animation: slideDown 0.3s ease forwards;
}

.success-alert-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
  border: 1.5px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.1);
  backdrop-filter: blur(10px);
}

.success-alert-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  font-size: 18px;
  flex-shrink: 0;
}

.success-alert-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.success-alert-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #16a34a;
}

.success-alert-message {
  margin: 0;
  font-size: 13px;
  color: #15803d;
  line-height: 1.4;
}

.success-alert-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #22c55e;
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.success-alert-close:hover {
  color: #16a34a;
}

/* ================= LOADING OVERLAY ================= */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 27, 39, 0.95);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease forwards;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.loading-spinner i {
  font-size: 28px;
  color: #10bacb;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.loading-text.success {
  color: #22c55e;
  opacity: 1;
  animation: scaleIn 0.3s ease forwards;
}

.loading-text.success i {
  margin-right: 8px;
  font-size: 20px;
}

/* ================= BUTTON LOADING STATES ================= */
.btn-signin {
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-signin:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-signin:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-text {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.btn-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.btn-loading i {
  font-size: 16px;
  animation: spin 1s linear infinite;
}

.btn-icon {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.btn-icon i {
  font-size: 16px;
  color: currentColor;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .floating-error-alert,
  .floating-success-alert {
    top: 20px;
    right: 20px;
    max-width: 450px;
    width: min(450px, calc(100vw - 40px));
  }

  .error-alert-content,
  .success-alert-content {
    padding: 16px 20px;
    gap: 12px;
  }

  .error-alert-icon,
  .success-alert-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .floating-error-alert,
  .floating-success-alert {
    top: 15px;
    right: 12px;
    max-width: 320px;
    width: min(320px, calc(100vw - 30px));
  }

  .error-alert-content,
  .success-alert-content {
    grid-template-columns: auto 1fr;
    padding: 14px 16px;
  }

  .error-alert-close,
  .success-alert-close {
    display: none;
  }

  .error-alert-icon,
  .success-alert-icon {
    width: 36px;
    height: 36px;
  }

  .error-alert-title,
  .success-alert-title {
    font-size: 13px;
  }

  .error-alert-message,
  .success-alert-message {
    font-size: 12px;
  }
}
