/* =========================================================
   LOGIN PAGE - Modern & Compact (80% Scale)
========================================================= */
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-image: url("../a/img/BG1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

/* Background Image Fullscreen */
.login-page {
  position: relative;
  min-height: 100vh;
}

.login-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 30px;
  margin-top: 5px;
  transition: all 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-right a {
  color: #004d9d;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  font-size: 11px;
  transition: color 0.3s ease;
}

.nav-right a:hover {
  color: #0062cc;
}

.login-box {
  max-width: 320px;
  margin: 64px auto 40px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  transform: scale(0.8);
  transform-origin: center;
  z-index: 1;
}

/* Hide the background image inside login-box */
.login-box .background {
  display: none;
}

.logo-login {
  display: block;
  margin: 0 auto 20px;
  max-width: 104px;
}

.login-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 8px;
  border: 2px solid #e8eef5;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.25s ease;
  color: #666;
}

.tab-btn:hover {
  border-color: #004d9d;
  color: #004d9d;
  background: #f8fbfd;
}

.tab-btn.active {
  background: linear-gradient(135deg, #004d9d, #0062cc);
  color: white;
  border-color: #004d9d;
  box-shadow: 0 2px 6px rgba(0, 77, 157, 0.3);
}

.login-form {
  display: none;
}

.login-form.active {
  display: block;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.toggle-password img {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.toggle-password:hover img {
  opacity: 1;
}

.input-group {
  margin-bottom: 13px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: 600;
  font-size: 11px;
}

.input-group input {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid #d6dee9;
  border-radius: 6px;
  font-size: 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: #004d9d;
  box-shadow: 0 0 5px rgba(0, 77, 157, 0.2);
}

.btn-login {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #004d9d, #0062cc);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 77, 157, 0.2);
}

.btn-login:hover {
  background: linear-gradient(135deg, #003b7a, #004d9d);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 77, 157, 0.3);
}

/* Messages */
p[style*="color:red"] {
  background: #fee;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #f44336;
  font-size: 11px;
  margin: 10px 0;
}

p[style*="color:green"] {
  background: #e7f3e7;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #2ecc71;
  font-size: 11px;
  margin: 10px 0;
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .login-box {
    max-width: 380px;
    transform: scale(0.85);
  }
}

/* Mobile Large (481px - 768px) */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  header {
    height: 50px;
  }

  .container {
    padding: 0 15px;
  }

  .logo img {
    height: 35px;
    margin-top: 7px;
  }

  .nav-right a {
    font-size: 13px;
  }

  .login-box {
    max-width: 90%;
    margin: 70px auto 30px;
    padding: 25px 20px;
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  .logo-login {
    max-width: 120px;
    margin-bottom: 25px;
  }

  .login-box h2 {
    font-size: 22px !important;
    margin-bottom: 20px !important;
  }

  .login-tabs {
    gap: 10px;
    margin-bottom: 20px;
  }

  .tab-btn {
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
  }

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

  .input-group label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .input-group input {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 8px;
  }

  .password-wrapper input {
    padding-right: 45px;
  }

  .toggle-password {
    right: 14px;
  }

  .toggle-password img {
    width: 18px;
    height: 18px;
  }

  .btn-login {
    padding: 14px;
    font-size: 15px;
    border-radius: 8px;
    margin-top: 5px;
  }

  /* Messages Mobile */
  p[style*="color:red"],
  p[style*="color:green"] {
    font-size: 13px;
    padding: 10px 12px;
    margin: 12px 0;
  }

  /* Link text */
  .login-form p {
    font-size: 14px !important;
    margin-top: 18px !important;
  }

  .login-form p a {
    font-weight: 600;
  }
}

/* Mobile Medium (376px - 480px) */
@media (max-width: 480px) {
  header {
    height: 55px;
  }

  .container {
    padding: 0 12px;
  }

  .logo img {
    height: 32px;
  }

  .nav-right a {
    font-size: 12px;
  }

  .login-box {
    max-width: 92%;
    margin: 75px auto 25px;
    padding: 22px 18px;
  }

  .logo-login {
    max-width: 110px;
    margin-bottom: 20px;
  }

  .login-box h2 {
    font-size: 20px !important;
    margin-bottom: 18px !important;
  }

  .login-tabs {
    gap: 8px;
    margin-bottom: 18px;
  }

  .tab-btn {
    padding: 11px;
    font-size: 13px;
  }

  .input-group {
    margin-bottom: 15px;
  }

  .input-group label {
    font-size: 12px;
  }

  .input-group input {
    padding: 11px 13px;
    font-size: 13px;
  }

  .toggle-password img {
    width: 16px;
    height: 16px;
  }

  .btn-login {
    padding: 13px;
    font-size: 14px;
  }

  p[style*="color:red"],
  p[style*="color:green"] {
    font-size: 12px;
    padding: 9px 11px;
  }

  .login-form p {
    font-size: 13px !important;
  }
}

/* Mobile Small (320px - 375px) */
@media (max-width: 375px) {
  header {
    height: 50px;
  }

  .logo img {
    height: 28px;
  }

  .nav-right a {
    font-size: 11px;
  }

  .login-box {
    max-width: 95%;
    margin: 65px auto 20px;
    padding: 20px 15px;
    border-radius: 10px;
  }

  .logo-login {
    max-width: 100px;
    margin-bottom: 18px;
  }

  .login-box h2 {
    font-size: 18px !important;
    margin-bottom: 16px !important;
  }

  .login-tabs {
    gap: 6px;
    margin-bottom: 16px;
  }

  .tab-btn {
    padding: 10px;
    font-size: 12px;
    border-radius: 6px;
  }

  .input-group {
    margin-bottom: 14px;
  }

  .input-group label {
    font-size: 11px;
    margin-bottom: 5px;
  }

  .input-group input {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
  }

  .password-wrapper input {
    padding-right: 40px;
  }

  .toggle-password {
    right: 12px;
  }

  .toggle-password img {
    width: 15px;
    height: 15px;
  }

  .btn-login {
    padding: 12px;
    font-size: 13px;
    border-radius: 6px;
  }

  p[style*="color:red"],
  p[style*="color:green"] {
    font-size: 11px;
    padding: 8px 10px;
    margin: 10px 0;
  }

  .login-form p {
    font-size: 12px !important;
    margin-top: 15px !important;
  }
}

/* Extra Small Mobile (< 320px) */
@media (max-width: 319px) {
  .login-box {
    margin: 60px auto 15px;
    padding: 18px 12px;
  }

  .logo-login {
    max-width: 90px;
  }

  .login-box h2 {
    font-size: 16px !important;
  }

  .tab-btn {
    padding: 9px;
    font-size: 11px;
  }

  .input-group input {
    padding: 9px 11px;
    font-size: 12px;
  }

  .btn-login {
    padding: 11px;
    font-size: 12px;
  }
}

/* Landscape Mode untuk Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  body {
    min-height: auto;
  }

  header {
    height: 45px;
  }

  .logo img {
    height: 30px;
  }

  .login-box {
    margin: 60px auto 20px;
    padding: 20px;
    max-width: 450px;
  }

  .logo-login {
    max-width: 90px;
    margin-bottom: 15px;
  }

  .login-box h2 {
    font-size: 18px !important;
    margin-bottom: 15px !important;
  }

  .login-tabs {
    margin-bottom: 15px;
  }

  .tab-btn {
    padding: 10px;
    font-size: 13px;
  }

  .input-group {
    margin-bottom: 12px;
  }

  .input-group label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .input-group input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .btn-login {
    padding: 11px;
    font-size: 14px;
  }

  .login-form p {
    font-size: 12px !important;
    margin-top: 12px !important;
  }
}

/* Touch improvements for mobile */
@media (max-width: 768px) {
  .tab-btn,
  .btn-login,
  .toggle-password {
    -webkit-tap-highlight-color: rgba(0, 77, 157, 0.1);
  }

  .input-group input {
    -webkit-appearance: none;
    appearance: none;
  }

  /* Better touch targets */
  .tab-btn {
    min-height: 44px;
    touch-action: manipulation;
  }

  .btn-login {
    min-height: 48px;
    touch-action: manipulation;
  }

  .toggle-password {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Prevent zoom on input focus (iOS) */
  .input-group input {
    font-size: 16px !important;
  }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .login-box {
    backdrop-filter: blur(12px);
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================
   FOOTER
============================= */

footer {
  background: #333;
  color: #fff;
  padding: 15px 20px;
  text-align: center;
  font-size: 14px;
}

footer p {
  margin: 0;
  line-height: 1.4;
}
