* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #36506C 0%, #2a5298 100%);
  min-height: 100vh;
  color: #333;
}

.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-header {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-section {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.logo {
  width: 80px;
  height: 80px;
  margin-right: 20px;
}

.title-section h1 {
  color: #1e3c72;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 5px;
}

.title-section h2 {
  color: #2a5298;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.title-section p {
  color: #666;
  font-size: 14px;
  font-style: italic;
}

.login-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.login-box {
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  
  padding: 40px;
  width: 100%;
  max-width: 450px;
}

.logo-container {
  position: absolute;
  top: 40px; /* menempatkan logo keluar dari kotak */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.logo-container img.logo {
  width: 175px;
  height: auto;
  border-radius: 50%;
  background: white;
  padding: 5px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.logo {
  width: 165px; /* sesuaikan ukuran */
  height: auto;
  border-radius: 50%;
  background: white;
  padding: 5px;
}

.login-form-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-form-header h3 {
  color: #1e3c72;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.login-form-header h3 i {
  margin-right: 10px;
}

.login-form-header p {
  color: #666;
  font-size: 14px;
}

.alert {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.alert i {
  margin-right: 10px;
}

.alert-error {
  background: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.alert-success {
  background: #efe;
  color: #363;
  border: 1px solid #cfc;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #333;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group label i {
  margin-right: 8px;
  color: #1e3c72;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.password-input {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 5px;
}

.toggle-password:hover {
  color: #1e3c72;
}

.error-text {
  color: #c33;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.remember-me input {
  margin-right: 8px;
}

.forgot-password {
  color: #1e3c72;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn i {
  margin-right: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

/* Register Section */
.register-section {
  margin-top: 25px;
  text-align: center;
}

.divider {
  position: relative;
  margin: 20px 0;
  text-align: center;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e1e5e9;
}

.divider span {
  background: white;
  padding: 0 15px;
  color: #666;
  font-size: 14px;
  position: relative;
}

.register-btn {
  width: 100%;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 10px;
}

.register-btn i {
  margin-right: 10px;
}

.register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
  color: white;
  text-decoration: none;
}

.register-text {
  color: #666;
  font-size: 13px;
  margin: 0;
}

.login-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.help-section h4 {
  color: #1e3c72;
  font-size: 16px;
  margin-bottom: 15px;
}

.help-section h4 i {
  margin-right: 8px;
}

.help-section ul {
  list-style: none;
}

.help-section li {
  color: #666;
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.help-section li i {
  margin-right: 10px;
  color: #1e3c72;
  width: 16px;
}

.login-bottom {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 0;
  text-align: center;
}

.system-info p {
  color: #666;
  font-size: 12px;
  margin-bottom: 5px;
}

.captcha-container {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.captcha-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.captcha-image-wrapper {
  position: relative;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  width: 120px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#captcha-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.captcha-fallback {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: #666;
  background: #f8f9fa;
}

.refresh-captcha {
  background: #2a5298;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
}

.refresh-captcha:hover {
  background: #1e3c72;
  transform: translateY(-1px);
}

.refresh-captcha i {
  transition: transform 0.3s ease;
}

.refresh-captcha:hover i {
  transform: rotate(180deg);
}

.captcha-right {
  flex: 1;
}

.captcha-right input {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  text-align: center;
}

.captcha-image-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive captcha */
@media (max-width: 480px) {
  .captcha-image {
    flex-direction: column;
    text-align: center;
  }

  .captcha-image img {
    align-self: center;
  }
}


@media (max-width: 768px) {
  .logo-section {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .login-box {
    padding: 30px 20px;
    margin: 20px;
  }

  .form-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}
