* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 50%, #a5d6a7 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(0, 140, 58, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 166, 81, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.login-container {
  display: flex; 
  max-width: 960px;
  width: min(94vw, 960px);
  margin: clamp(12px, 3vw, 24px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

.login-left {
  background: linear-gradient(135deg, #008c3a 0%, #00a651 100%);
  color: white;
  padding: 60px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.login-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.logo-container {
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
}

.denr-logo {
  width: clamp(84px, 16vw, 120px);
  height: clamp(84px, 16vw, 120px);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.denr-logo img {
  width: clamp(56px, 12vw, 80px);
  height: clamp(56px, 12vw, 80px);
  object-fit: contain;
}

.system-title {
  position: relative;
  z-index: 2;
}

.system-title h1 {
  font-size: clamp(18px, 4.8vw, 24px);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.system-title p {
  font-size: clamp(13px, 4vw, 16px);
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 500;
}

.location {
  font-size: clamp(12px, 3.6vw, 14px);
  opacity: 0.8;
  font-weight: 400;
}

.login-right {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: clamp(28px, 4vw, 60px) clamp(24px, 4vw, 50px);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-icon {
  width: clamp(56px, 12vw, 80px);
  height: clamp(56px, 12vw, 80px);
  background: linear-gradient(135deg, #008c3a 0%, #00a651 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 25px rgba(0, 140, 58, 0.3);
}

.login-icon i {
  font-size: clamp(22px, 5vw, 32px);
  color: white;
}

.login-header h2 {
  font-size: clamp(20px, 5.5vw, 28px);
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  font-size: 14px;
}

.input-container {
  position: relative;
}

.input-container i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 16px;
  z-index: 2;
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: clamp(12px, 3.5vw, 16px) clamp(12px, 3.5vw, 16px) clamp(12px, 3.5vw, 16px) clamp(42px, 10vw, 50px);
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
  outline: none;
  border-color: #008c3a;
  box-shadow: 0 0 0 4px rgba(0, 140, 58, 0.1);
  background: white;
}

.form-control:focus + i {
  color: #008c3a;
}

.password-toggle {
  position: absolute;
  right: clamp(16px, 4vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #999;
  z-index: 3;
  transition: color 0.2s ease, background-color 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
}

.password-toggle i {
  font-size: 18px;
}

.password-toggle:hover {
  color: #008c3a;
  background: rgba(0, 140, 58, 0.06);
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 140, 58, 0.15);
}

.form-control[type="password"],
.form-control[name="password"] {
  padding-right: clamp(64px, 14vw, 84px);
}

.show-password {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.show-password input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #008c3a;
}

.show-password label {
  font-size: 13px;
  color: #666;
  margin: 0;
  cursor: pointer;
}

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, #008c3a 0%, #00a651 100%);
  color: white;
  border: none;
  padding: clamp(12px, 3.5vw, 16px);
  border-radius: 12px;
  font-size: clamp(14px, 4.5vw, 16px);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 140, 58, 0.3);
  margin-top: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 140, 58, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.forgot-password {
  text-align: center;
  margin-top: 25px;
}

.forgot-password a {
  color: #008c3a;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #006c2c;
  text-decoration: underline;
}

.register-link {
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  color: #555;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.register-link a {
  color: #008c3a;
  font-weight: 600;
  text-decoration: none;
}

.register-link a:hover {
  color: #006c2c;
  text-decoration: underline;
}

.error-message {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.success-message {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    width: min(96vw, 420px);
  }
  .login-right {
    order: -1;
  }
  .login-left {
    order: 0;
  }
  .login-left {
    padding: 36px 24px;
  }
  .login-right {
    padding: 32px 24px;
  }
}

@media (max-width: 420px) {
  .login-container {
    width: 100vw;
    margin: 0;
    border-radius: 0;
  }
  .login-left {
    padding: 28px 20px;
  }
  .login-right {
    padding: 24px 20px;
  }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
